Skip to content

Commit

Permalink
Require 2.452.x or newer (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Nov 8, 2024
1 parent 77c75c7 commit 7917e9c
Show file tree
Hide file tree
Showing 32 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/it/JENKINS-45740-metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</scm>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
<!--Examples of real use-cases-->
Expand Down
6 changes: 3 additions & 3 deletions src/it/JENKINS-58771-packaged-plugins-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<packaging>hpi</packaging>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -23,8 +23,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<artifactId>bom-2.452.x</artifactId>
<version>3010.vec758b_8e7da_3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions src/it/JENKINS-58771-packaged-plugins-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<packaging>hpi</packaging>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -23,8 +23,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<artifactId>bom-2.452.x</artifactId>
<version>3010.vec758b_8e7da_3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions src/it/JENKINS-58771-packaged-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<packaging>hpi</packaging>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -23,8 +23,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<artifactId>bom-2.452.x</artifactId>
<version>3010.vec758b_8e7da_3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/it/assemble-dependencies-as-jpi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<packaging>pom</packaging>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/assemble-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<packaging>pom</packaging>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
8 changes: 4 additions & 4 deletions src/it/check-core-version-failure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -22,9 +22,9 @@
<version>2.14.1-313.v504cdd45c18b</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>1214.v1de940103927</version>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>1460.v28178c1ef6e6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/it/check-core-version-failure/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

assert new File(basedir, 'build.log').getText('UTF-8').contains("Dependency org.jenkins-ci.plugins:credentials:jar:1214.v1de940103927 requires Jenkins 2.375 or higher.")
assert new File(basedir, 'build.log').getText('UTF-8').contains("Dependency org.jenkins-ci.plugins.workflow:workflow-job:jar:1460.v28178c1ef6e6 requires Jenkins 2.479.1 or higher.")

return true;
2 changes: 1 addition & 1 deletion src/it/check-core-version-success/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/compile-fork-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<name>MyNewPlugin</name>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/compile-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<name>MyNewPlugin</name>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/compile-multimodule-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<module>plugin2</module>
</modules>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/ensure-java-level-marker-11-migration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>hpi</packaging>
<name>MyNewPlugin</name>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/ensure-java-level-marker-11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>hpi</packaging>
<name>MyNewPlugin</name>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/java-level/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>hpi</packaging>
<name>MyNewPlugin</name>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<java.level>11</java.level>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
Expand Down
2 changes: 1 addition & 1 deletion src/it/jenkins-version/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>hpi</packaging>
<name>MyNewPlugin</name>
<properties>
<jenkins.version>2.360</jenkins.version>
<jenkins.version>2.451</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/jenkins-version/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

assert new File(basedir, 'build.log').getText('UTF-8').contains('This version of maven-hpi-plugin requires Jenkins 2.361 or later')
assert new File(basedir, 'build.log').getText('UTF-8').contains('This version of maven-hpi-plugin requires Jenkins 2.452 or later')

return true
2 changes: 1 addition & 1 deletion src/it/metadata-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</scm>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<gitHubRepo>jenkinsci/maven-hpi-plugin</gitHubRepo>
<spotless.check.skip>false</spotless.check.skip>
Expand Down
8 changes: 4 additions & 4 deletions src/it/metadata-it/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ try (JarFile j1 = new JarFile(p1)) {
// there may be other attribute like 'Created-By' that we do not care about we are not checking everything
assert attributes.getValue('Manifest-Version').equals('1.0') // if this changes then Jenkins may not be able to parse it.

assert attributes.getValue('Hudson-Version').equals('2.361.4')
assert attributes.getValue('Jenkins-Version').equals('2.361.4')
assert attributes.getValue('Hudson-Version').equals('2.452.4')
assert attributes.getValue('Jenkins-Version').equals('2.452.4')

assert attributes.getValue('Group-Id').equals('org.jenkins-ci.tools.hpi.its.git-metadata')
assert attributes.getValue('Artifact-Id').equals('plugin1')
Expand Down Expand Up @@ -48,8 +48,8 @@ try (JarFile j2 = new JarFile(p2)) {
Attributes attributes = mf.getMainAttributes()
assert attributes.getValue('Manifest-Version').equals('1.0') // if this changes then Jenkins may not be able to parse it.

assert attributes.getValue('Hudson-Version').equals('2.361.4')
assert attributes.getValue('Jenkins-Version').equals('2.361.4')
assert attributes.getValue('Hudson-Version').equals('2.452.4')
assert attributes.getValue('Jenkins-Version').equals('2.452.4')

assert attributes.getValue('Group-Id').equals('org.jenkins-ci.tools.hpi.its.git-metadata')
assert attributes.getValue('Artifact-Id').equals('multimodule-it-plugin2')
Expand Down
2 changes: 1 addition & 1 deletion src/it/minimum-java-version/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>hpi</packaging>
<name>MyNewPlugin</name>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/missing-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<name>MyNewPlugin</name>
<description>Deprecated spot for plugin description.</description>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/override-test-dependencies-release-failure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/override-test-dependencies-smokes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<!-- TODO cannot include `invoker.goals=-DoverrideVersions=…,… test` in invoker.properties since then that is misinterpreted as multiple arguments for invoker.goals -->
<overrideVersions>org.jenkins-ci.plugins.workflow:workflow-step-api:2.11,org.jenkins-ci.plugins.workflow:workflow-api:2.17,org.jenkins-ci.plugins.workflow:workflow-cps:2.32</overrideVersions>
Expand Down
2 changes: 1 addition & 1 deletion src/it/override-war-with-snapshot/dependant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
</dependency>
</dependencies>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
</properties>
</project>
2 changes: 1 addition & 1 deletion src/it/override-war-with-snapshot/war-with-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</profiles>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<revision>1.0.0-SNAPSHOT</revision>
</properties>
</project>
2 changes: 1 addition & 1 deletion src/it/process-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<name>MyNewPlugin</name>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/process-test-classes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<module>process-test-classes-foo</module>
</modules>
<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/snapshot-version-override/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</scm>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/it/verify-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</scm>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions src/it/verify-it/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Files.newInputStream(new File(basedir, 'target/verify-it/META-INF/MANIFEST.MF').
assert manifest.getMainAttributes().getValue('Extension-Name') == null // was provided by Maven 2, but core prefers Short-Name
assert manifest.getMainAttributes().getValue('Group-Id').equals('org.jenkins-ci.tools.hpi.its')
assert manifest.getMainAttributes().getValue('Artifact-Id').equals('verify-it')
assert manifest.getMainAttributes().getValue('Hudson-Version').equals('2.361.4')
assert manifest.getMainAttributes().getValue('Hudson-Version').equals('2.452.4')
assert manifest.getMainAttributes().getValue('Implementation-Title').equals('MyNewPlugin') // was project.artifactId in previous versions, now project.name
assert manifest.getMainAttributes().getValue('Implementation-Version').equals('1.0-SNAPSHOT')
assert manifest.getMainAttributes().getValue('Jenkins-Version').equals('2.361.4')
assert manifest.getMainAttributes().getValue('Jenkins-Version').equals('2.452.4')
assert manifest.getMainAttributes().getValue('Long-Name').equals('MyNewPlugin')
assert manifest.getMainAttributes().getValue('Manifest-Version').equals('1.0')
assert manifest.getMainAttributes().getValue('Plugin-Developers').equals('Noam Chomsky:nchomsky:[email protected]')
Expand Down
2 changes: 1 addition & 1 deletion src/it/war-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</scm>

<properties>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<spotless.check.skip>false</spotless.check.skip>
<!-- used for filtering -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void execute() throws MojoExecutionException {
}
}

if (new VersionNumber(findJenkinsVersion()).compareTo(new VersionNumber("2.361")) < 0) {
throw new MojoExecutionException("This version of maven-hpi-plugin requires Jenkins 2.361 or later");
if (new VersionNumber(findJenkinsVersion()).compareTo(new VersionNumber("2.452")) < 0) {
throw new MojoExecutionException("This version of maven-hpi-plugin requires Jenkins 2.452 or later");
}

MavenProject parent = project.getParent();
Expand Down

0 comments on commit 7917e9c

Please sign in to comment.