Skip to content

Commit

Permalink
support building against jdk 11 (#33)
Browse files Browse the repository at this point in the history
* support jdk 11

* build with jdk 11

* Use <code> tag rather than <tt> as <tt> is deprecated

* remove javaLevel parameter
  • Loading branch information
donhui authored Oct 2, 2022
1 parent 861727c commit 341c50e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 48 deletions.
10 changes: 9 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
buildPlugin(tests: [skip: 'true'])
def jenkinsVersion = '2.277.4'

def configurations = [
[ platform: "linux", jdk: "8", jenkins: null ],
[ platform: "linux", jdk: "8", jenkins: jenkinsVersion ],
[ platform: "linux", jdk: "11", jenkins: jenkinsVersion ]
]

buildPlugin(configurations: configurations, timeout: 180, tests: [skip: 'true'])
46 changes: 2 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.36</version>
<version>4.42</version>
<relativePath />
</parent>

Expand All @@ -17,7 +17,7 @@
<revision>1</revision>
<changelist>999999-SNAPSHOT</changelist>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jenkins.version>1.625.3</jenkins.version>
<jenkins.version>2.277.4</jenkins.version>
<java.level>8</java.level>
</properties>

Expand Down Expand Up @@ -77,48 +77,6 @@
<artifactId>structs</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.39</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.11.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
<version>2.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.20</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>2.14</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.*;
import java.nio.charset.Charset;
import java.util.regex.Matcher;
Expand Down Expand Up @@ -113,7 +113,7 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis
* @param taskListener
*/
@Override
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener taskListener) {
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull TaskListener taskListener) {
if (getCheck()) {
run.addAction(new MavenSnapshotCheckAction(CHECKED));
String message = "[Maven SNAPSHOT Check], pomFiles: " + getPomFiles();
Expand Down Expand Up @@ -145,7 +145,7 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnul
* The class is marked as public so that it can be accessed from views.
*
* <p>
* See <tt>src/main/resources/hudson/plugins/hello_world/HelloWorldBuilder/*.jelly</tt>
* See <code>src/main/resources/jenkins/plugins/mvn_snapshot_check/MavenSnapshotCheck/config.jelly</code>
* for the actual HTML fragment for the configuration screen.
*/
@Symbol("mavenSnapshotCheck")
Expand Down

0 comments on commit 341c50e

Please sign in to comment.