desruisseaux commented on code in PR #985:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/985#discussion_r2459698840


##########
src/it/default-fork-windows/src/test/java/MyTest.java:
##########
@@ -18,6 +18,4 @@
  */
 package foo;
 
-import junit.framework.TestCase;

Review Comment:
   Actually, it would be nice to keep a dependency to something. It doesn't 
need to be JUnit 3. It can be JUnit 5 or anything else, even a dummy JAR. The 
goal is to test that a dependency declared with `<scope>test</scope>` is really 
on the classpath during the compilation of tests.
   
   I would suggest to replace the JUnit 3 dependency by a JUnit 5 API 
dependency, and just put a dummy method with the `@Test` annotation. For 
example:
   
   ```java
   import org.junit.jupiter.api.Test;
   
   public class MyTest {
       @Test
       public void testSomething() {}
   }
   ```
   
   It should be sufficient for causing the test to fail if the compiler did not 
put the JUnit 5 dependency on the classpath, which is what we really want to 
test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to