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

plugin pom overloads maven properties for evil things

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: plugin-pom
    • Labels:
      None
    • Similar Issues:

      Description

      The plugin pom has profiles and other things that are setup by virtue of a plugin specific flag being set.

      For example javadoc publishig is skiped with "skipTests" property.
      Similar for findbugs.

      This is very bad as you may want to speed a release by skipping tests (using the standard maven way[1]) in the perform goal yet this leads to the surprising thing that javadocs are missing. This is very costly and it is NOT the maven way. The POM has even invented its own workaround for this that again is not what maven users would expect

      If you want to bind things to "tests not being run" then they should be bound to general maven properties like maven.test.skip and NOT a plugin specific property.

      If we want to be helpful to people so that they do not have to type long flags then we set a profile with an id of "quickBuild" that configures specific plugin flags

      [1] -Darguments=-DskipTests

        Attachments

          Issue Links

            Activity

            Hide
            teilo James Nord added a comment -

            Or in summary do things the expected Maven way - do not invent our own way.

            Show
            teilo James Nord added a comment - Or in summary do things the expected Maven way - do not invent our own way.
            Hide
            andresrc Andres Rodriguez added a comment -

            Ping Jesse Glick (proposer of the current approach)

            Show
            andresrc Andres Rodriguez added a comment - Ping Jesse Glick (proposer of the current approach)
            Hide
            jglick Jesse Glick added a comment -

            speed a release by skipping tests

            Seriously?! Do not mess with release builds.

            We skip Javadoc in developer mode because we are not doing anything with the Javadoc—we run the goal merely to fail the build in case of Javadoc errors. Ditto anything else that does not contribute to build artifacts except insofar as the build might fail.

            Show
            jglick Jesse Glick added a comment - speed a release by skipping tests Seriously?! Do not mess with release builds. We skip Javadoc in developer mode because we are not doing anything with the Javadoc—we run the goal merely to fail the build in case of Javadoc errors. Ditto anything else that does not contribute to build artifacts except insofar as the build might fail.
            Hide
            teilo James Nord added a comment -

            skipTests is not developerMode 

            it is a surefire flag nothing more nothing less....

            if we want to build quickly it should be mvn -P quickBuild  and not overload an existing flag

             

             

             

            Show
            teilo James Nord added a comment - skipTests is not developerMode  it is a surefire flag nothing more nothing less.... if we want to build quickly it should be mvn -P quickBuild   and not overload an existing flag      
            Hide
            jglick Jesse Glick added a comment -

            There was a long discussion about the topic in a plugin-pom PR, and core also has a similar usage of skipTests. I find the current state convenient and harmless, but if you have strong opinions about purity of flag usage then introduce a new profile that turns on all the flags which would skip mojos not contributing to artifact identity.

            Show
            jglick Jesse Glick added a comment - There was a long discussion about the topic in a plugin-pom PR, and core also has a similar usage of skipTests . I find the current state convenient and harmless, but if you have strong opinions about purity of flag usage then introduce a new profile that turns on all the flags which would skip mojos not contributing to artifact identity.
            Hide
            teilo James Nord added a comment -
            Show
            teilo James Nord added a comment - the javadoc issue was removed in https://github.com/jenkinsci/plugin-pom/pull/109/files

              People

              • Assignee:
                Unassigned
                Reporter:
                teilo James Nord
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: