Skip to content

Commit 2da2264

Browse files
committed
Update dependencies used in test to more recent ones with less CVE
1 parent 6946b95 commit 2da2264

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,17 @@
186186
<artifactItem>
187187
<groupId>org.apache.ant</groupId>
188188
<artifactId>ant</artifactId>
189-
<version>1.9.0</version>
189+
<version>1.10.13</version>
190190
</artifactItem>
191191
<artifactItem>
192-
<groupId>commons-logging</groupId>
193-
<artifactId>commons-logging</artifactId>
194-
<version>1.0.3</version>
192+
<groupId>org.apache.logging.log4j</groupId>
193+
<artifactId>log4j-api</artifactId>
194+
<version>2.20.0</version>
195195
</artifactItem>
196196
<artifactItem>
197-
<groupId>xml-apis</groupId>
198-
<artifactId>xml-apis</artifactId>
199-
<version>1.3.02</version>
197+
<groupId>jakarta.xml.bind</groupId>
198+
<artifactId>jakarta.xml.bind-api</artifactId>
199+
<version>4.0.0</version>
200200
</artifactItem>
201201
</artifactItems>
202202
<outputDirectory>${project.build.directory}/test-lib</outputDirectory>

src/test/java/org/codehaus/plexus/classworlds/launcher/ConfiguratorTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,14 @@ void testConfigure_Valid()
169169

170170
assertSame( null, antRealm.getImportClassLoader( "org.apache.tools.Ant" ) );
171171

172-
assertSame( xmlRealm, antRealm.getImportClassLoader( "org.xml.sax.SAXException" ) );
172+
// Ant has dependency to xerces:xercesImpl (test)
173+
assertSame( null, antRealm.getImportClassLoader( "org.xml.sax.SAXException" ) );
174+
175+
assertSame( xmlRealm, antRealm.getImportClassLoader( "jakarta.xml.bind.JAXBException" ) );
173176

174177
assertSame( null, mavenRealm.getImportClassLoader( "org.apache.maven.app.App" ) );
175178

176-
assertSame( xmlRealm, mavenRealm.getImportClassLoader( "org.xml.sax.SAXException" ) );
179+
assertSame( xmlRealm, mavenRealm.getImportClassLoader( "jakarta.xml.bind.JAXBException" ) );
177180

178181
URL[] urls = globRealm.getURLs();
179182

@@ -233,7 +236,7 @@ void testConfigure_Optionally_Existent()
233236

234237
assertEquals( 1, urls.length , "one url");
235238

236-
assertSame( null, optRealm.getImportClassLoader( "org.xml.sax.SAXException" ) );
239+
assertSame( null, optRealm.getImportClassLoader( "jakarta.xml.bind.JAXBException" ) );
237240
}
238241

239242
@Test

src/test/test-data/optionally-existent.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ main is org.apache.maven.app.App from opt
1010
# ------------------------------------------------------------
1111

1212
[opt]
13-
optionally ${basedir}/target/test-lib/xml-apis-1.3.02.jar
13+
optionally ${basedir}/target/test-lib/jakarta.xml.bind-api-4.0.0.jar
1414

src/test/test-data/valid.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ main is org.apache.maven.app.App from maven
1010
# ------------------------------------------------------------
1111

1212
[xml]
13-
load ${basedir}/target/test-lib/xml-apis-1.3.02.jar
13+
load ${basedir}/target/test-lib/jakarta.xml.bind-api-4.0.0.jar
1414

1515
[ant]
16-
import org.xml.sax from xml
17-
load ${basedir}/target/test-lib/ant-1.9.0.jar
16+
import jakarta.xml.bind from xml
17+
load ${basedir}/target/test-lib/ant-1.10.13.jar
1818

1919
[maven]
20-
import org.xml.sax from xml
21-
load ${basedir}/target/test-lib/commons-logging-1.0.3.jar
20+
import jakarta.xml.bind from xml
21+
load ${basedir}/target/test-lib/log4j-api-2.20.0.jar
2222

2323
[glob]
2424
load ${basedir}/src/test/test-data/*.jar

0 commit comments

Comments
 (0)