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

CLONE - Maven job config page loses 'use private repository' setting for 'invoke top-level maven targets'

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • maven-plugin
    • None

      Using Jenkins 2.16, I am seeing an issue in a Maven project, when I use the 'Invoke top-level Maven targets' pre-build step.

      When I add this pre-build step, it comes with the 'Use private Maven repository' option unchecked. If I check this option, then save the job, when I re-open the job, I see it is unchecked again. So it appears that the config page is losing my persisted setting, and always setting it back to the unchecked mode.

      The net result is that if you are using the 'Invoke top-level Maven targets' pre-build step, and don't check the 'use private maven repository' option, then each time you change your maven job, you need to go and check that option before you click save.

      Seems that the binding of the page to the <usePrivateRepository> setting in the model is missing on loading the page.

          [JENKINS-37850] CLONE - Maven job config page loses 'use private repository' setting for 'invoke top-level maven targets'

          Erich Mauerböck added a comment - - edited

          similar to the linked issue, but the opposite effect

          Erich Mauerböck added a comment - - edited similar to the linked issue, but the opposite effect

          enrice I confirm your bug, I reproduced it (and JENKINS-14613 at the same time). In fact they are the same. The default value of "Use private Maven repository" seems to be forced by the global configuration "Manage Jenkins" > "Maven Project Configuration" > "Local Maven Repository"
          If you use "Local to the workspace" or "Local to the executor" the option "Use private Maven repository" of 'Invoke top-level Maven targets' pre-build or post build step will be always activated ( JENKINS-14613 )
          If you use "Default ( ~/.m2/repository)" the option "Use private Maven repository" of 'Invoke top-level Maven targets' pre-build or post build step will be always deactivated ( JENKINS-37850 )
          As far as I can see the value of "Use private Maven repository" is correctly saved in the job configuration thus there is a side effect in the loading of the value when we are displaying the form

          Arnaud Héritier added a comment - enrice I confirm your bug, I reproduced it (and JENKINS-14613 at the same time). In fact they are the same. The default value of "Use private Maven repository" seems to be forced by the global configuration "Manage Jenkins" > "Maven Project Configuration" > "Local Maven Repository" If you use "Local to the workspace" or "Local to the executor" the option "Use private Maven repository" of 'Invoke top-level Maven targets' pre-build or post build step will be always activated ( JENKINS-14613 ) If you use "Default ( ~/.m2/repository)" the option "Use private Maven repository" of 'Invoke top-level Maven targets' pre-build or post build step will be always deactivated ( JENKINS-37850 ) As far as I can see the value of "Use private Maven repository" is correctly saved in the job configuration thus there is a side effect in the loading of the value when we are displaying the form

          I mark it as duplicated

          Arnaud Héritier added a comment - I mark it as duplicated

            Unassigned Unassigned
            enrice Erich Mauerböck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: