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

plugin pom overloads maven properties for evil things

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • plugin-pom
    • None

      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

          [JENKINS-48058] plugin pom overloads maven properties for evil things

          James Nord created issue -

          James Nord added a comment -

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

          James Nord added a comment - Or in summary do things the expected Maven way - do not invent our own way.

          Ping jglick (proposer of the current approach)

          Andres Rodriguez added a comment - Ping jglick (proposer of the current approach)
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal CJP-7960 (Web Link)" [ 18975 ]

          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.

          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.

          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

           

           

           

          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      

          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.

          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.
          Jesse Glick made changes -
          Assignee Original: Andres Rodriguez [ andresrc ]
          James Nord made changes -
          Link New: This issue is duplicated by JENKINS-37657 [ JENKINS-37657 ]

          James Nord added a comment -

          James Nord added a comment - the javadoc issue was removed in https://github.com/jenkinsci/plugin-pom/pull/109/files

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

              Created:
              Updated: