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

Update dependencies to migrate from Java 8 to 11 #87

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Changelog

See the https://github.com/jenkinsci/build-timeout-plugin/releases[Github releases page].
See the https://github.com/jenkinsci/build-timeout-plugin/releases[GitHub releases page].

Old changelogs:

Expand Down
8 changes: 5 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// for https://ci.jenkins.io/
buildPlugin(configurations: [
[platform: 'linux', jdk: '8'],
#!/usr/bin/env groovy

/* For https://ci.jenkins.io/ */
/* The `buildPlugin` step has been provided by: https://github.com/jenkins-infra/pipeline-library */
buildPlugin(useContainerAgent: true, configurations: [
[platform: 'linux', jdk: '11'],
[platform: 'windows', jdk: '11'],
])
122 changes: 110 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.1</version>
<version>4.33</version>
</parent>

<artifactId>build-timeout</artifactId>
<version>1.21-SNAPSHOT</version>
<packaging>hpi</packaging>

<name>Build Timeout</name>
<description>Aborts a build if it's taking too long</description>
<description>Terminates a build if it is taking too long</description>
<url>https://github.com/jenkinsci/build-timeout-plugin</url>
<licenses>
<license>
Expand All @@ -31,41 +31,101 @@
</scm>

<properties>
<jenkins.version>2.222.1</jenkins.version>
<java.level>8</java.level>
<!-- Dependency org.jenkins-ci.plugins:mailer:jar:412.v7deeda_155287 requires Jenkins 2.331 or higher. -->
Copy link
Member

Choose a reason for hiding this comment

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

It sounds strange to me that mailer-plugin requires so newer core.

  • The latest stable mailer-plugin looks 408.vd726a_1130320 and requires 2.289.1.
  • What requires mailer-plugin? I believe mailer-plugin isn't used from build-timeout.

Copy link
Member

Choose a reason for hiding this comment

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

<jenkins.version>2.334</jenkins.version>
<java.level>11</java.level>
<!-- To be removed once Jenkins.MANAGE permission gets out of beta -->
<useBeta>true</useBeta>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
<!-- Start for debugging -->
<!-- Please feel free to uncomment during debugging -->
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- End for debugging -->
</configuration>
</plugin>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>3.22</version>
<configuration>
<minimumJavaVersion>11</minimumJavaVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.21</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>token-macro</artifactId>
<version>1.5.1</version>
<groupId>org.jenkins-ci</groupId>
<artifactId>symbol-annotation</artifactId>
<version>1.23</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>naginator</artifactId>
<version>1.16</version>
<version>1.18.1</version>
<optional>true</optional>
</dependency>
<dependency>
<!-- naginator -->
<!-- Required by Naginator as a dependency -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>1.4</version>
<version>1.20</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.10</version>
<version>1.53</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.8.5</version>
<version>4.3.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -74,18 +134,56 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.78</version>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

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

You might just want to resolve RequireUpperBoundDeps.
It's not good way to add explicit dependencies to resolve that.
Following documents may help you:

Targetting LTS core and using BOM is the easiest way.

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>412.v7deeda_155287</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>token-macro</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

token-macro is declared twice.

<version>267.vcdaea6462991</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>625.v2e7cf5fc4211</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>308.v852b473a2b8c</version>
</dependency>
</dependencies>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
<repository>
<id>repo.jenkins-ci.org/incrementals</id>
<url>https://repo.jenkins-ci.org/incrementals/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
<pluginRepository>
<id>repo.jenkins-ci.org/incrementals</id>
<url>https://repo.jenkins-ci.org/incrementals/</url>
</pluginRepository>
</pluginRepositories>
</project>