Skip to content

Commit

Permalink
Upgrades to support Struts 7 (#12901)
Browse files Browse the repository at this point in the history
PR updates oss-fuzz to support the latest Struts 7 which uses Java 17
and JakartaEE 6.0
  • Loading branch information
lukaszlenart authored Jan 3, 2025
1 parent 3fce4b3 commit 2ef5c1f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 64 deletions.
2 changes: 1 addition & 1 deletion projects/struts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pushd "/tmp"
${MVN} --no-transfer-progress install:install-file -Dfile=${JAZZER_API_PATH} \
-DgroupId="com.code-intelligence" \
-DartifactId="jazzer-api" \
-Dversion="0.15.0" \
-Dversion="0.23.0" \
-Dpackaging=jar
popd

Expand Down
49 changes: 16 additions & 33 deletions projects/struts/struts2-fuzzer/fuzzer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
</parent>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<jetty.version>11.0.24</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -26,7 +27,7 @@
mvn install:install-file -Dfile=${JAZZER_API_PATH} \
-DgroupId="com.code-intelligence" \
-DartifactId="jazzer-api" \
-Dversion="0.14.0" \
-Dversion="0.23.0" \
-Dpackaging=jar
in order to avoid mismatching driver/api versions.
Expand All @@ -36,41 +37,29 @@
<artifactId>jazzer-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.51.v20230217</version>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.51.v20230217</version>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>9.4.51.v20230217</version>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp</artifactId>
<version>9.2.30.v20200428</version>
<exclusions>
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b12</version>
<artifactId>apache-jsp</artifactId>
<version>${jetty.version}</version>
</dependency>
</dependencies>

Expand All @@ -79,7 +68,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<configuration>
<filters>
<filter>
Expand All @@ -104,25 +93,19 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.51.v20230217</version>
<version>11.0.18</version>
<configuration>
<stopKey>CTRL+C</stopKey>
<stopPort>8999</stopPort>
<systemProperties>
<systemProperty>
<name>slf4j</name>
<value>false</value>
</systemProperty>
</systemProperties>
<httpConnector>
<port>8080</port>
</httpConnector>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scan>10</scan>
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppConfig>
<webApp>
<contextPath>/</contextPath>
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
</webAppConfig>
</webApp>
</configuration>
</plugin>
</plugins>
Expand Down
19 changes: 10 additions & 9 deletions projects/struts/struts2-fuzzer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<packaging>pom</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<struts.version>${fuzzedLibraryVersion}</struts.version>
</properties>
Expand All @@ -24,18 +24,19 @@
<dependency>
<groupId>com.code-intelligence</groupId>
<artifactId>jazzer-api</artifactId>
<version>0.15.0</version>
<version>0.23.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
29 changes: 10 additions & 19 deletions projects/struts/struts2-fuzzer/webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</parent>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -39,16 +39,15 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
<version>2.24.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
</dependency>
</dependencies>

Expand All @@ -59,33 +58,25 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
</configuration>
</plugin>


<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>

<version>9.3.29.v20201019</version>
<version>11.0.18</version>
<configuration>
<webApp>
<contextPath>/${project.build.finalName}</contextPath>
</webApp>
<stopKey>CTRL+C</stopKey>
<stopPort>8999</stopPort>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
</scanTargets>

<scan>10</scan>
</configuration>
</plugin>


</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package org.apache.struts.test;


import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ActionSupport;

public class TestAction extends ActionSupport {
private String subject = "World (from Java)";
Expand Down

0 comments on commit 2ef5c1f

Please sign in to comment.