This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new a4dcc9e Remove old JUnit 3.x reference
a4dcc9e is described below
commit a4dcc9ee76c2c11482d6bf771b1c358533e31462
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Jul 1 20:20:38 2024 +0200
Remove old JUnit 3.x reference
---
pom.xml | 6 ------
.../apache/maven/plugins/compiler/it/AppTest.java | 23 +++-------------------
.../plugin/compiler/CompilerMojoTestCase.java | 8 +++-----
3 files changed, 6 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index dbafd25..707b530 100644
--- a/pom.xml
+++ b/pom.xml
@@ -237,12 +237,6 @@ under the License.
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit4Version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
diff --git
a/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
b/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
index af3a454..0954cf2 100644
---
a/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
+++
b/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
@@ -18,33 +18,16 @@
*/
package org.apache.maven.plugins.compiler.it;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.jupiter.api.Test;
/**
* Unit test for simple App.
*/
-public class AppTest extends TestCase {
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest(String testName) {
- super(testName);
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite() {
- return new TestSuite(AppTest.class);
- }
-
+public class AppTest {
/**
* Rigourous Test :-)
*/
+ @Test
public void testApp() {
assertTrue(true);
}
diff --git
a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index 8d6c532..0dd6c99 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -486,13 +486,11 @@ public class CompilerMojoTestCase {
Path artifactFile;
String localRepository = System.getProperty("localRepository");
if (localRepository != null) {
- artifactFile = Paths.get(localRepository,
"junit/junit/3.8.1/junit-3.8.1.jar");
+ artifactFile = Paths.get(
+ localRepository,
"org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar");
} else {
// for IDE
- String junitURI = junit.framework.Test.class
- .getResource("Test.class")
- .toURI()
- .toString();
+ String junitURI =
Test.class.getResource("Test.class").toURI().toString();
junitURI = junitURI.substring("jar:".length(),
junitURI.indexOf('!'));
artifactFile = new File(URI.create(junitURI)).toPath();
}