Java11Exec: Quick fix for test dependencies.

This commit is contained in:
Maximilian Paß
2022-04-24 17:14:56 +02:00
parent 7af17c87d3
commit 09b90a4555
2 changed files with 9 additions and 2 deletions

View File

@ -35,8 +35,13 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
<version>4.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
</dependency>
</dependencies>

View File

@ -70,6 +70,8 @@ class SimpleMakefile {
.map(s -> s.startsWith("@") ? s.substring(1) : s)
.map(s -> s.contains("#") ? s.substring(0, s.indexOf("#")) : s)
.filter(s -> !s.isEmpty())
.map(s -> s.replaceAll("/usr/java/lib/hamcrest-core-1.3.jar", "/var/task/lib/org.hamcrest.hamcrest-core-1.3.jar"))
.map(s -> s.replaceAll("/usr/java/lib/junit-4.11.jar", "/var/task/lib/junit.junit-4.11.jar"))
.toArray(String[]::new);
rules.put(ruleName, trimmedCommands);