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, 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.
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] 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.
--
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 jenkinsci-de...@googlegroups.com.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS2EAbk6%2BjW9bCQ2ow1RtFKdEaz%3DU0-YP9sHWn3etunraw%40mail.gmail.com.
--
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 jenkinsci-de...@googlegroups.com.
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.
--
+1
Interested by jenkins.version sure, but also (even more?) by the fact it will be far easier to add things in that new parent that will be able to propagate far far quicker than upgrading to a more recent Jenkins base a like we have to do currently. (Example: upgrading the maven-hpi-plugin for one, and so on).
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/45406653-4295-4BD6-AC1B-B8624354F0A6%40fortysix.ch.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a21ab9f3-2371-4893-a89e-5fe4cfaa0daf%40googlegroups.com.
On Mon, Jan 18, 2016 at 4:35 AM, <arodr...@cloudbees.com> wrote:
> The current proposal is being pushed to
> https://github.com/andresrc/plugin-pom.
Since there is no PR for the POM itself, I am putting comments here.
`<issueManagement>` does not seem like it belongs. The POM need not be
used by plugins hosted under the Jenkins organization.
AFAIK the test dependency on `jenkins-war` should be on
`<classifier>war-for-test</classifier>`, not `<type>war</type>`.
I would suggest `<preparationGoals>javadoc:javadoc clean
install</preparationGoals>` rather than `<preparationGoals>clean
install javadoc:javadoc</preparationGoals>` since Javadoc generation
is likely a lot faster than running tests, and more likely to be
failing without anyone knowing about it before.
Consider https://github.com/jenkinsci/workflow-plugin/blob/master/pom.xml#L201-L211
which I have found invaluable. Could be added later of course.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0ZHQrbgT1QP5G3DxgifLTO4M1g3ZkMv-H7aVK3_1g_XQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Tue, Jan 19, 2016 at 6:27 AM, <arodr...@cloudbees.com> wrote:
> Decide the final artifact maven coordinates: following the criteria used in
> jenkins-test-harness, we could keep the same groupId / artifactId than
> before and bump version to 2.0.
Yes I think making it be `org.jenkins-ci.plugins:plugin:pom:2.0` would
be appropriate. If nothing else, this advertises it as an upgrade for
people who use standard Maven tools or IDEs to look for new versions
of artifacts (in this case parent POM). Of course you need to make
certain changes to your plugin’s POM to use it (in most cases you
would want to define `jenkins.version` at a minimum), but that seems
OK—the bump in major version should be sufficient indication that
something noteworthy has changed.
> Create a repository in the jenkinsci GitHub org (by someone with permissions
> forking the existing one).
I can do this if there are no objections. The main question is the
repository name. `plugin-pom`?
> Perform a release.
And I suggest that `jenkinsci/jenkins/plugins/pom.xml` be deleted.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0A6jrobt2phksSqC9cE_qh%3D56wEnhOmurhFerj5DgRmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Jan 18, 2016 at 4:35 AM, <arodr...@cloudbees.com> wrote:
> The current proposal is being pushed to
> https://github.com/andresrc/plugin-pom.
Since there is no PR for the POM itself, I am putting comments here.
`<issueManagement>` does not seem like it belongs. The POM need not be
used by plugins hosted under the Jenkins organization.
AFAIK the test dependency on `jenkins-war` should be on
`<classifier>war-for-test</classifier>`, not `<type>war</type>`.
I would suggest `<preparationGoals>javadoc:javadoc clean
install</preparationGoals>` rather than `<preparationGoals>clean
install javadoc:javadoc</preparationGoals>` since Javadoc generation
is likely a lot faster than running tests, and more likely to be
failing without anyone knowing about it before.
Consider https://github.com/jenkinsci/workflow-plugin/blob/master/pom.xml#L201-L211
which I have found invaluable. Could be added later of course.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0ZHQrbgT1QP5G3DxgifLTO4M1g3ZkMv-H7aVK3_1g_XQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr05ksqCt7UJmKd4FWnZUMtNAXASO6ESShWt-3hmqAYXUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAM9%3DZ%2B7OJrWbhsLFkTavDqDTeZhkkM0tyYfy8hC1jKyxL1FZmA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS20iY1vg0nkRW8P5dBDgctCdnGP%3DC8O%2B1mYZg3u4bBJVw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS2MTGRfjBDdvBjae9hUWqVwPwGApY7cyoirzpCOw7OXNQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS20iY1vg0nkRW8P5dBDgctCdnGP%3DC8O%2B1mYZg3u4bBJVw%40mail.gmail.com.
Update: we are up to 2.2, and 1.645 will have been the last release of
the old POM.
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1ZCqu8FAz7M254cFPWb4KPw9uXZx7aPjtdkOT2fe_EUA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS6oZkExqbd%3DxzmTKVL-W%3DrX5LW_-5tHCHoqEceoQBOHug%40mail.gmail.com.