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

Require Java 11 or newer #398

Merged
merged 2 commits into from
Nov 30, 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: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ updates:
# Must remain within Jetty 9.x until Java 8 support is removed
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
versions: [">=10.0.0"]
# Requires Java 11 starting with version 1711.v5b_1b_03f0fcf2.
- dependency-name: "org.kohsuke.stapler:stapler-groovy"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def runTests(Map params = [:]) {
}

parallel(
'linux-8': runTests(platform: 'linux', jdk: 8),
'linux-11': runTests(platform: 'linux', jdk: 11)
'linux-11': runTests(platform: 'linux', jdk: 11),
'linux-17': runTests(platform: 'linux', jdk: 17)
)
infra.maybePublishIncrementals()
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ mvn -f ../some-plugin -Dhpi-plugin.version=2.XXX-SNAPSHOT -DskipTests -DjenkinsH
You can also rerun one test:

```bash
mvn -Prun-its mrm:start invoker:run mrm:stop -Dinvoker.test=parent-3x
mvn -Prun-its mrm:start invoker:run mrm:stop -Dinvoker.test=parent-4x
```

To rerun just the verification script:

```bash
groovy -e "basedir='$(pwd)/target/its/parent-3x'; evaluate new File('src/it/parent-3x/verify.groovy')"
groovy -e "basedir='$(pwd)/target/its/parent-4x'; evaluate new File('src/it/parent-4x/verify.groovy')"
```

Also make sure `project.parent.version` in `src/it/parent-3x/pom.xml` is the latest.
Also make sure `project.parent.version` is the latest in every integration test except `src/it/parent-4-40/pom.xml`.

## Updating Jetty
`hpi:run` mojo is a variant of `jetty:run` mojo, and because of the way plugin descriptor is generated, this module copies some code from Jetty Maven plugin, specifically `AbstractJettyMojo.java` and `ConsoleScanner.java`.
Expand Down
76 changes: 8 additions & 68 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<end>$}</end>
<dollar>$</dollar>
<openbracket>{</openbracket>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gitHubRepo>jenkinsci/${project.artifactId}</gitHubRepo>
<aether.version>1.1.0</aether.version>
<maven.version>3.8.6</maven.version>
Expand Down Expand Up @@ -82,6 +81,11 @@
<artifactId>maven-model</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
Expand Down Expand Up @@ -135,7 +139,7 @@
<dependency>
<groupId>io.jenkins.lib</groupId>
<artifactId>support-log-formatter</artifactId>
<version>1.1</version>
<version>1.2</version>
</dependency>
<dependency>
<groupId>net.java.sezpoz</groupId>
Expand Down Expand Up @@ -192,12 +196,12 @@
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>version-number</artifactId>
<version>1.10</version>
<version>1.11</version>
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler-groovy</artifactId>
<version>1685.v3b_5035c4ce05</version>
<version>1747.v9580b_2f1d80b</version>
</dependency>
<dependency>
<groupId>org.twdata.maven</groupId>
Expand Down Expand Up @@ -234,7 +238,6 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -309,23 +312,12 @@
<rules>
<requireUpperBoundDeps>
<excludes combine.children="append">
<exclude>commons-io:commons-io</exclude>
<exclude>commons-lang:commons-lang</exclude>
<exclude>org.apache.commons:commons-compress</exclude>
<exclude>org.apache.maven.wagon:wagon-provider-api</exclude>
<exclude>org.codehaus.plexus:plexus-container-default</exclude>
<exclude>org.eclipse.sisu:org.eclipse.sisu.plexus</exclude>
<exclude>org.ow2.asm:asm</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
</excludes>
</requireUpperBoundDeps>
<!-- TODO When the minimum Jenkins baseline is bumped past 2.357, this can be deleted. -->
<requireJavaVersion>
<version>[1.8.0,]</version>
</requireJavaVersion>
<enforceBytecodeVersion>
<maxJdkVersion>1.8</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
</configuration>
</execution>
Expand Down Expand Up @@ -475,57 +467,5 @@
<invoker.streamLogs>true</invoker.streamLogs>
</properties>
</profile>
<!-- TODO When the minimum Jenkins baseline is bumped past 2.357, this can be deleted. -->
<profile>
<id>jdk-8-and-below</id>
<activation>
<jdk>(,1.8]</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<testSource>1.8</testSource>
<testTarget>1.8</testTarget>
<release combine.self="override" />
<testRelease combine.self="override" />
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>1.8</source>
<release combine.self="override" />
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk-9-and-above</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
<testRelease>8</testRelease>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
4 changes: 2 additions & 2 deletions src/it/JENKINS-45740-metadata/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.40</version>
<version>4.51</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.tools.hpi.its</groupId>
<artifactId>JENKINS-45740-metadata</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<!--Examples of real use-cases-->
<hpi.pluginChangelogUrl>https://github.com/jenkinsci/configuration-as-code-plugin/releases</hpi.pluginChangelogUrl>
Expand Down
8 changes: 4 additions & 4 deletions src/it/JENKINS-58771-packaged-plugins-2/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.40</version>
<version>4.51</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.tools.hpi.its</groupId>
<artifactId>JENKINS-58771-packaged-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
</properties>

Expand Down Expand Up @@ -83,8 +83,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.249.x</artifactId>
<version>984.vb5eaac999a7e</version>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
12 changes: 5 additions & 7 deletions src/it/JENKINS-58771-packaged-plugins-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.57</version>
<version>4.51</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.tools.hpi.its</groupId>
<artifactId>JENKINS-58771-packaged-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.249.1</jenkins.version>
<java.level>8</java.level>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
<enforcer.skip>true</enforcer.skip>
</properties>

<repositories>
Expand All @@ -43,16 +41,16 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>google-oauth-plugin</artifactId>
<version>0.10</version>
<version>1.0.7</version>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.249.x</artifactId>
<version>984.vb5eaac999a7e</version>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/it/JENKINS-58771-packaged-plugins/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.40</version>
<version>4.51</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.tools.hpi.its</groupId>
<artifactId>JENKINS-58771-packaged-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
</properties>

Expand Down Expand Up @@ -46,8 +46,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.249.x</artifactId>
<version>984.vb5eaac999a7e</version>
<artifactId>bom-2.361.x</artifactId>
<version>1580.v47b_429a_c853a</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions src/it/assemble-dependencies-as-jpi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.51</version>
<relativePath />
</parent>

Expand All @@ -18,7 +18,7 @@
<packaging>pom</packaging>

<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
</properties>

Expand Down
16 changes: 3 additions & 13 deletions src/it/assemble-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.51</version>
<relativePath />
</parent>

Expand All @@ -18,25 +18,15 @@
<packaging>pom</packaging>

<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>symbol-annotation</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ssh-credentials</artifactId>
<version>1.18.1</version>
<version>305.v8f4381501156</version>
</dependency>
</dependencies>

Expand Down
12 changes: 6 additions & 6 deletions src/it/check-core-version-failure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.51</version>
<relativePath />
</parent>
<artifactId>check-core-version-failure</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<hpi-plugin.version>@project.version@</hpi-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.13.2-260.v43d711474c77</version>
<version>2.14.1-313.v504cdd45c18b</version>
</dependency>
<dependency>
<groupId>io.jenkins</groupId>
<artifactId>configuration-as-code</artifactId>
<version>1414.v878271fc496f</version>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>1214.v1de940103927</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 io.jenkins:configuration-as-code:jar:1414.v878271fc496f requires Jenkins 2.289.3 or higher.")
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.")

return true;