Skip to content

Commit

Permalink
[JENKINS-73278] Migrate core from EE 8 to EE 9 (jenkinsci#9672)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Guerroudj <[email protected]>
Co-authored-by: Daniel Beck <[email protected]>
  • Loading branch information
3 people authored Sep 3, 2024
1 parent 4e9b6d8 commit 7006cde
Show file tree
Hide file tree
Showing 341 changed files with 3,991 additions and 1,872 deletions.
11 changes: 0 additions & 11 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@
"org.jfree:jfreechart"
]
},
{
"description": "Starting with 6.x, Spring requires Java 17 at a minimum.",
"matchManagers": [
"maven"
],
"allowedVersions": "<6.0.0",
"matchPackageNames": [
"org.springframework:spring-framework-bom",
"org.springframework.security:spring-security-bom"
]
},
{
"description": "Starting with 7.x, Guice switches from javax.* to jakarta.* bindings. See https://github.com/google/guice/wiki/Guice700",
"matchManagers": [
Expand Down
9 changes: 3 additions & 6 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ THE SOFTWARE.

<properties>
<commons-fileupload2.version>2.0.0-M2</commons-fileupload2.version>
<stapler.version>1896.v8170998149d0</stapler.version>
<stapler.version>1903.v994a_db_314d58</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand All @@ -62,15 +62,15 @@ THE SOFTWARE.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>5.3.39</version>
<version>6.1.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- https://docs.spring.io/spring-security/site/docs/5.5.4/reference/html5/#getting-maven-no-boot -->
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>5.8.14</version>
<version>6.3.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -154,12 +154,12 @@ THE SOFTWARE.
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>4.0.4</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>1.2.7</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
Expand Down Expand Up @@ -295,7 +295,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>commons-jelly-tags-define</artifactId>
<version>1.1-jenkins-20240510</version>
<version>1.1-jenkins-20240903</version>
</dependency>
<dependency>
<groupId>org.jvnet.localizer</groupId>
Expand Down
20 changes: 19 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ THE SOFTWARE.
<!-- needed by Jelly -->
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jaxen</groupId>
Expand Down Expand Up @@ -288,7 +302,7 @@ THE SOFTWARE.
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-fileupload2-javax</artifactId>
<artifactId>commons-fileupload2-jakarta-servlet5</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
Expand Down Expand Up @@ -427,6 +441,10 @@ THE SOFTWARE.
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<exclusions>
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/DescriptorExtensionList.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public T newInstanceFromRadioList(JSONObject config) throws FormException {
if (config.isNullObject())
return null; // none was selected
int idx = config.getInt("value");
return get(idx).newInstance(Stapler.getCurrentRequest(), config);
return get(idx).newInstance(Stapler.getCurrentRequest2(), config);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/ExpressionFactory2.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.apache.commons.jelly.expression.ExpressionSupport;
import org.apache.commons.jexl.JexlContext;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;
import org.springframework.security.access.AccessDeniedException;

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ public Object evaluate(JellyContext context) {
// let the security exception pass through
throw e;
} catch (Exception e) {
StaplerRequest currentRequest = Stapler.getCurrentRequest();
StaplerRequest2 currentRequest = Stapler.getCurrentRequest2();
LOGGER.log(Level.WARNING, "Caught exception evaluating: " + expression + " in " + (currentRequest != null ? currentRequest.getOriginalRequestURI() : "?") + ". Reason: " + e, e);
return null;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/FilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ public FormValidation validateRelativePath(String value, boolean errorIfNotExist
}

private static void checkPermissionForValidate() {
AccessControlled subject = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class);
AccessControlled subject = Stapler.getCurrentRequest2().findAncestorObject(AbstractProject.class);
if (subject == null)
Jenkins.get().checkPermission(Jenkins.MANAGE);
else
Expand Down
Loading

0 comments on commit 7006cde

Please sign in to comment.