Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41296

Use private Maven repository does not work in pre-build steps

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • Jenkins 2.7.1, Microsoft Windows 7 Enterprise , Firefox browser

      Enabling 'Use private Maven repository' option in a pre-build maven step does not seem to work. Jenkins does not seem to save that setting. Every time i turn on the option, click on save and then return back to the configuration page for the job, the option is unchecked! It only seems to save that setting in the "build" step. I do have the Maven Local repository option set to "Local to the workspace" in the maven project configuration setting. What am i doing wrong?

      Raj

          [JENKINS-41296] Use private Maven repository does not work in pre-build steps

          Do you have the docker-slaves plugin 1.0.5 installed ? (JENKINS-40410)

          Arnaud Héritier added a comment - Do you have the docker-slaves plugin 1.0.5 installed ? ( JENKINS-40410 )

          I have the same issue and I don't have the docker-slaves-plugin installed.

          It seems to be an issue with reading the setting from the config.xml – when I set the "Use private Maven repository" option and click save, the build actually does use a private repo, so the setting is correctly applied in memory. It also adds <usePrivateRepository>true</usePrivateRepository> to the config.

          However, upon re-editing the config, it always unchecks the option and a subsequent save of the config then disable the private repo.

          (Jenkins 2.46.2, maven-plugin 2.14)

          Henning Hoefer added a comment - I have the same issue and I  don't have the  docker-slaves-plugin installed. It seems to be an issue with reading the setting from the config.xml – when I set the "Use private Maven repository" option and click save, the build actually does use a private repo, so the setting is correctly applied in memory. It also adds <usePrivateRepository>true</usePrivateRepository> to the config. However, upon re-editing the config, it always unchecks the option and a subsequent save of the config then disable the private repo. (Jenkins 2.46.2, maven-plugin 2.14)

            Unassigned Unassigned
            r0jkumar raj kumar
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: