Hi all,
Please find below a proposal for a new parent POM for Jenkins Plugins. Motivation The main driver to propose a revision of the parent plugin POM is to decouple this artifact from the Jenkins Core: - Simplifying the mechanism to build and test a plugin against different core versions. - Decoupling build-related aspects, such as static analysis tools, JRE signatures, etc. from the baseline core versions, as they are totally independent concerns, reducing the need to include otherwise common configuration in each plugin POM just because we want to support and older baseline. One use case that would greatly benefit from this change is for example, jenkins#1530 <https://github.com/jenkinsci/jenkins/pull/1530>, where it is necessary to propose API changes in core and matching plugin usages. The current plugins/pom.xml does not work if you mvn deploy a SNAPSHOT revision. Plugin Compatibility Testing can also benefit from this change. Approach As stated above the approach is based in making the plugin parent POM independent of the main Jenkins core project, and performing the following actions: - Make the Jenkins Core version to use configurable via a property, so that a simple mvn -Djenkins.version=xxxx hpi:run is enough to compile and run a plugin with a different core version. - Make the Jenkins Test Harness version to use also configurable (the default being the same Jenkins core version), for those cases that may need it, such as copyartifact#76 <https://github.com/jenkinsci/copyartifact-plugin/pull/76>. - Reduce the number of Maven plugin pinned versions to those really used. - Reduce the number of number of elements (versions, etc) overridable via properties to those that have a specific reason, setting the values to those intended to be used. There’s no reason to make everything overridable as the parent pom evolution is now independent of the baseline Jenkins Core versions. Other aspects included: - Default configuration for findbugs, including the possibility of automatically activating exclusions, and a property to define if findbug errors should break the build (default true). - JRE signature verification configured to the Java level defined for the build (using a property as well). - Regarding releases: - Launching javadoc:javadoc in the prepare phase, in order to avoid the inconvenience “stricter” Java 8 javadoc breaking builds in the release phase. - Skipping tests in the release phase, cutting release build times for plugins with a great number of tests. - General cleanup. Ok, show me the code The current proposal is being pushed to https://github.com/andresrc/plugin-pom. It is not deployed to any repository yet, so in order to test it a local install is required. The artifactId is intentionally changed to avoid confusion. JIRA issue [JENKINS-32493] <https://issues.jenkins-ci.org/browse/JENKINS-32493> has been filed. Some plugins have been used to verify the current proposal, including: - Branch-API: https://github.com/jenkinsci/branch-api-plugin/pull/25 - Copyartifact: https://github.com/jenkinsci/copyartifact-plugin/pull/78 - Workflow: https://github.com/jenkinsci/workflow-plugin/pull/303 - Script Security: https://github.com/jenkinsci/script-security-plugin/pull/36 - Support Core: https://github.com/jenkinsci/support-core-plugin/pull/53 There is also an update on the Maven archetype at https://github.com/jenkinsci/maven-hpi-plugin/pull/27. Next Steps After collecting feedback from the community and if there’s certain consensus about going forward the next steps would be: - Create a repository for the artifact in jenkinsci. - Decide the final artifact maven coordinates. - Perform a release. - Update the documentation (wiki, etc.) - Upgrade some plugins to use the new POM in order to drive adoption. - Upgrade to PCT to support it. Thanks! -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a0668ee9-908d-42c1-9b18-a98751869572%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
