Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-60474] streamline the pom and support the jenkins-bom #269

Merged
merged 36 commits into from
Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e5b32d4
remove findbugs legacy and skip profile
jtnord Dec 13, 2019
a0be78d
always run integration tests for this pom
jtnord Dec 13, 2019
9ca3bdb
remove old concurrency override
jtnord Dec 13, 2019
fdc501e
junit-dep is not provided by jenkins-test-harness anymore
jtnord Dec 16, 2019
0b4fdac
add a quick-build profile that skips enforcer,tests,spotbugs and anim…
jtnord Dec 16, 2019
09cde37
findbugs is dead
jtnord Dec 16, 2019
38a5f3c
executable-war is not needed, just use the war
jtnord Dec 16, 2019
320374a
[JENKINS-60474] unconditionally enable the jenkins-bom for library de…
jtnord Dec 16, 2019
4569982
there is no excuse for allowing evry single plugin to have falky tests.
jtnord Dec 16, 2019
50bfd73
remove an unneeded property (plugin.minimumJavaVersion)
jtnord Dec 16, 2019
11afd7d
inline trimStackTrace and add failsafe to the build.
jtnord Dec 16, 2019
f21e6cb
whitespace changes to make following easier
jtnord Dec 16, 2019
1115636
remove support for jgit provider
jtnord Dec 16, 2019
9afd792
leave a better reference for people about timestamped snapshots
jtnord Dec 16, 2019
5efade2
InjectedTest is a generated test source and these are already excluded.
jtnord Dec 16, 2019
755371c
enforce no snapshots for releases.
jtnord Dec 17, 2019
97cabd7
the snapshot rule needs special handling so we can run an ITs against a
jtnord Dec 17, 2019
367d4e9
remove old animal sniffer versions we only need to support 1.8 or newer
jtnord Dec 17, 2019
48070e4
you can not activate profiles based on properties defined in a project
jtnord Dec 17, 2019
a498d8a
tidy up some comments
jtnord Dec 18, 2019
b28f137
define spotbugs plugin version in pluginManagement
jtnord Dec 18, 2019
2e284e7
make this a beta version as suggested by @oleg-nenashev
jtnord Dec 18, 2019
793f39f
no need to enable the profile - its always active now
jtnord Dec 18, 2019
3e62514
skip the invoker plugin in the quick-build profile
jtnord Dec 18, 2019
586d740
Merge branch 'master' into JENKINS-60474
jtnord Dec 19, 2019
7dc1c18
turns out the executable-war is magic.
jtnord Dec 20, 2019
bb4f3e2
Merge remote-tracking branch 'origin/master' into JENKINS-60474
jtnord Dec 23, 2019
642ef9d
Fix up building now that we always run the integration tests
jtnord Dec 23, 2019
d246f1c
there is no information and that URL is garbage so just remove it
jtnord Dec 23, 2019
59018c0
just activate the benchmark profile with a standard profile activation
jtnord Dec 23, 2019
bf90d59
Update README
jtnord Dec 23, 2019
15e346f
change version to 4.0-beta-1-SNAPSHOT
jtnord Dec 23, 2019
19dab6c
benchmark activation is via profile
jtnord Dec 23, 2019
8c9203c
make it easier to consume a plugin-pom PR in a incrementals PR
jtnord Dec 23, 2019
b9b10c3
Merge branch 'master' into JENKINS-60474
oleg-nenashev Dec 23, 2019
c13f626
Restore the release drafter link
oleg-nenashev Dec 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ For major changes we usually expect a reference implementation to be provided in

To run and build the repository with integration tests, you can execute

mvn -Prun-plugin-pom-its clean verify
mvn clean verify

## Building and using snapshots

Snapshots might be needed to provide reference implementations for Plugin POM patches.
If you are a plugin maintainer with account on Jenkins artifactory,
you can deploy a Plugin POM snapshot using this command:

mvn clean deploy
mvn clean deploy

Once the snapshot is deployed, you will see a timestamped snapshot version in Maven console output.
Then you can just replace the Plugin POM version in your downstream PRs by this version so that you can demonstrate the build on ci.jenkins.io

Expand All @@ -31,7 +31,6 @@ Then you can just replace the Plugin POM version in your downstream PRs by this
### Managing release notes

* Changelog drafts are automatically by link:https://github.com/toolmantim/release-drafter[Release Drafter]
* See the documentation about Jenkins Release Drafter configuration link:https://github.com/jenkinsci/.github/blob/master/docs/release-drafter.adoc[here]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* When merging pull requests...
** Make sure to modify pull request titles to make them user-friendly
** Set proper labels so the changelog is categorized
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node('maven') {
// TODO Azure mirror
ansiColor('xterm') {
withEnv(['MAVEN_OPTS=-Djansi.force=true']) {
sh 'mvn -B -Dstyle.color=always -ntp -Prun-plugin-pom-its clean verify'
sh 'mvn -B -Dstyle.color=always -ntp clean verify'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer a profile it is in the main definition

}
}
}
Expand Down
39 changes: 8 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

This new parent POM is decoupled from the core Jenkins project, both from the Maven and repository perspectives.

Since version 4.0 the plugin pom supports Jenkins 2.200 and higher and a select few older LTS lines (TBD)

The main changes are:
* Reduced number of overridable properties. All references (e.g. dependencies and plugin versions) not
thought to be overridden are no longer based on properties. The main remaining overridable properties are:
Expand All @@ -15,12 +17,11 @@ thought to be overridden are no longer based on properties. The main remaining o
See [Java Support](#java-support) for more info.
* `jenkins-test-harness.version`: The [JTH version](https://github.com/jenkinsci/jenkins-test-harness/releases) used to test plugin.
Uses split test-harness (see [JENKINS-32478](https://issues.jenkins-ci.org/browse/JENKINS-32478)).
If the required Jenkins version is 1.580.1 or higher, JTH 2.1+ is recommended.
* `hpi-plugin.version`: The HPI Maven Plugin version used by the plugin.
(Generally you should not set this to a version _lower_ than that specified in the parent POM.)
* `stapler-plugin.version`: The Stapler Maven plugin version required by the plugin.
* `java.level.test`: The Java version to use to build the plugin tests.
* In order to make their versions the same as the used core version, `slf4jVersion`, `node.version` and `npm.version`
* In order to make their versions the same as the used core version, `node.version` and `npm.version`
properties are provided.
* Tests are skipped during the `perform` phase of a release (can be overridden by setting `release.skipTests` to false).
* Javadoc has been set to _quiet_ by default in 2.20+, which means it will only log errors and warnings.
Expand Down Expand Up @@ -60,27 +61,9 @@ If you had a `jar:test-jar` execution, delete it and add to `properties`:

The plugin POM is designed for plugin builds with JDK 8 or above,
but target `java.level` for a plugin may differ from a JDK version used for the build.
Starting from Plugin POM `3.44`, support of Java 7 targets in Plugin POM is deprecated,
`java.level=8` and `jenkins.version>2.59` are expected to be used for most plugins.
Starting from Plugin POM `3.44`, support of Java 7 targets in Plugin POM is deprecated and has been removed in `4.0`,
`java.level=8` and `jenkins.version>2.204.1` are expected to be used for most plugins.

### Using deprecated Java targets

If recent plugin POM versions are required for a plugin with older baselines,
a developer can use dependency version system properties to downgrade components incompatible with Java 7.

Example:

```xml
<properties>
<jenkins.version>2.32.3</jenkins.version>
<java.level>7</java.level>
<!-- Animal Sniffer Annotations 1.18 is not compatible with Java 7 anymore -->
<animal.sniffer.version>1.17</animal.sniffer.version>
</properties>
```

Such mode is no longer tested in the repository,
and the list of incompatible dependencies will expand without further notice in new releases.

## Incrementals

Expand All @@ -92,9 +75,9 @@ See [Incrementals](https://github.com/jenkinsci/incrementals-tools) for details.
To run JMH benchmarks from JUnit tests, you must run you must activate the `benchmark`
profile. For example:
```bash
mvn -Dbenchmark test
mvn -P jmh-benchmark test
```
When the `benchmark` property is set, no tests apart from JMH benchmarks will be run.
When the `jmh-benchmark` profile is enabled, no tests apart from JMH benchmarks will be run.
The names of the classes containing the benchmark runners should either begin with or
end with the word `Benchmark`. For example, `FooBenchmark` and `BenchmarkFoo` will
be detected when using `-Dbenchmark`, however, `FooBar` will be ignored.
Expand Down Expand Up @@ -213,13 +196,7 @@ By default, the setup wizard (Jenkins >= 2.0) is skipped when using `hpi:run`. I
## Jenkins Core BOM

Since version 2.195, Jenkins provides a [Maven Bill Of Materials (BOM)](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
that centrally defines versions of various libraries used by Jenkins Core.
The default behaviour of `plugin-pom` is to _not_ use the BOM, but when jenkins.version>=2.195 (and plugin-pom>=3.54) you can switch on Jenkins BOM support by setting the Maven property `use-jenkins-bom`.
For example:

`mvn -Djenkins.version=2.195 -Duse-jenkins-bom package`

This will import the BOM for Jenkins 2.195
that centrally defines versions of various libraries used by Jenkins Core and should make it easier to update to newer Jenkins Core versions

For more information, see the [Dependency Management](https://jenkins.io/doc/developer/plugin-development/dependency-management/) section of the
[plugin development guide](https://jenkins.io/doc/developer/plugin-development/).
Loading