lprimak opened a new issue, #3462:
URL: https://github.com/apache/maven-surefire/issues/3462

   ### Affected version
   
   3.6.0
   
   ### Bug description
   
   Starting with 3.16.0, there is a warning printed that suggests wrong target/ 
directory is being read. This is especially true when there are no classes 
being compiled from `src/main/java` and the module contains just tests.
   
   Reproducer: https://github.com/lprimak/maven-test-compiler-reproducer
   `./mvnw package -Dexception.from.testng=false`
   
   Messages message:
   ```
   [INFO] --- surefire:3.6.0:test (default-test) @ maven-testng-reproducer ---
   [INFO] Using auto detected provider 
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
   [INFO] TestNG is present. Adding per default 
org.junit.support:testng-engine:1.1.0
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   MyTestNGExtension: onStart called for suite: Command line suite
   MyTestNGExtension: onFinish called for suite: Command line suite
   MyTestNGExtension: onStart called for suite: Command line suite
   MyTestNGExtension: onFinish called for suite: Command line suite
   MyTestNGExtension: onStart called for suite: Command line suite
   MyTestNGExtension: onFinish called for suite: Command line suite
   [INFO] Running com.flowlogix.maven.jupiter.JupiterTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 
s -- in com.flowlogix.maven.jupiter.JupiterTest
   MyTestNGExtension: onStart called for suite: Command line suite
   [INFO] Running com.flowlogix.maven.testng.NextGenTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 
s -- in com.flowlogix.maven.testng.NextGenTest
   MyTestNGExtension: onFinish called for suite: Command line suite
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   ```
   
   The methods should only be called one time, as with the previous plugin:
   `./mvnw package -Pprevious-testng`
   ```
   [INFO] --- surefire:3.5.6:test (default-test) @ maven-testng-reproducer ---
   [INFO] Using configured provider 
org.apache.maven.surefire.testng.TestNGProvider
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running TestSuite
   MyTestNGExtension: onStart called for suite: Surefire suite
   MyTestNGExtension: onFinish called for suite: Surefire suite
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.141 
s -- in TestSuite
   ```
   
   The issue is reproducible via maven 3.9.16 and 4-rc-6


-- 
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