Skip to content

Commit

Permalink
Require Jenkins 2.479.1 or newer
Browse files Browse the repository at this point in the history
Compile with Java 17 and Jakarta EE 9
  • Loading branch information
MarkEWaite committed Dec 11, 2024
1 parent a0de40c commit 71a75f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 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>4.88</version>
<version>5.3</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -51,8 +51,9 @@
<properties>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<jenkins.baseline>2.452</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.479</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>1.13.1</revision>
<spotbugs.effort>Max</spotbugs.effort>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import hudson.model.SimpleParameterDefinition;
import hudson.model.labels.LabelExpression;
import hudson.util.FormValidation;
import jakarta.servlet.ServletException;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.servlet.ServletException;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.apache.commons.lang.StringUtils;
Expand All @@ -26,7 +26,7 @@
import org.jvnet.jenkins.plugins.nodelabelparameter.wrapper.TriggerNextBuildWrapper;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

/**
* Defines a build parameter used to restrict the node a job will be executed on. Such a label works
Expand Down Expand Up @@ -220,7 +220,7 @@ public String apply(Node n) {
}

@Override
public ParameterValue createValue(StaplerRequest req, JSONObject jo) {
public ParameterValue createValue(StaplerRequest2 req, JSONObject jo) {
LabelParameterValue value = req.bindJSON(LabelParameterValue.class, jo);
value.setDescription(getDescription());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.jvnet.jenkins.plugins.nodelabelparameter.node.NodeEligibility;
import org.jvnet.jenkins.plugins.nodelabelparameter.wrapper.TriggerNextBuildWrapper;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

/**
* Defines a build parameter used to select the node where a job should be executed. Although it is
Expand Down Expand Up @@ -250,7 +250,7 @@ public NodeEligibility getDefaultNodeEligibility() {
}

@Override
public ParameterValue createValue(StaplerRequest req, JSONObject jo) {
public ParameterValue createValue(StaplerRequest2 req, JSONObject jo) {
// as String from UI: {"labels":"built-in","name":"HOSTN"}
// as JSONArray: {"name":"HOSTN","value":["built-in","host2"]}
// as String from script: {"name":"HOSTN","value":"built-in"}
Expand Down

0 comments on commit 71a75f0

Please sign in to comment.