matthiasblaesing commented on issue #7345:
URL: https://github.com/apache/netbeans/issues/7345#issuecomment-2086907044

   From my POV this project is broken:
   
   1. The version of the surefire plugin is not configured. Resulting in 
undefined behavior. I have mvn 3.8.1 installed and NetBeans bundles 3.9.6. Runs 
with the former give me surefire 2.12.4, with the latter 3.2.2. Run this: `mvn 
test -Dtest=ArticlePageParserTest#testParse 
org.apache.maven.plugins:maven-surefire-plugin:3.2.2:test 
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test`. I get:
       ```
       [INFO] --- surefire:3.2.2:test (default-test) @ NoTests ---
       [INFO] Using auto detected provider 
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
       [INFO] 
       [INFO] -------------------------------------------------------
       [INFO]  T E S T S
       [INFO] -------------------------------------------------------
       [INFO] 
       [INFO] Results:
       [INFO] 
       [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
       [INFO] 
       [INFO] 
       [INFO] --- surefire:2.12.4:test (default-cli) @ NoTests ---
       [INFO] Surefire report directory: 
/home/matthias/Downloads/NoTests/target/surefire-reports
       
       -------------------------------------------------------
        T E S T S
       -------------------------------------------------------
       Running bt.notests.parser.ArticlePageParserTest
       parse
       Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec
       
       Results :
       
       Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
       ```
   2. `pdfbox` in version `3.0.1` is broken as it pulls in junit5 onto the 
compile path
   
   Fixing the `pom.xml` to this:
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
       <modelVersion>4.0.0</modelVersion>
       <groupId>bt</groupId>
       <artifactId>NoTests</artifactId>
       <version>1.0-SNAPSHOT</version>
       <packaging>jar</packaging>
       <properties>
           <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
           <!--        <maven.compiler.source>21</maven.compiler.source>
           <maven.compiler.target>21</maven.compiler.target>-->
   
           <maven.compiler.source>1.8</maven.compiler.source>
           <maven.compiler.target>1.8</maven.compiler.target>
       </properties>
       <dependencies>
           <dependency>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
               <version>4.13.2</version>
               <scope>test</scope>
           </dependency>
           <dependency>
               <groupId>org.hamcrest</groupId>
               <artifactId>hamcrest-core</artifactId>
               <version>1.3</version>
               <scope>test</scope>
           </dependency>
           <dependency>
               <groupId>org.knowm.xchart</groupId>
               <artifactId>xchart</artifactId>
               <version>3.8.7</version>
           </dependency>
           <dependency>
               <groupId>org.apache.pdfbox</groupId>
               <artifactId>pdfbox</artifactId>
               <version>3.0.2</version>
           </dependency>
       </dependencies>
   </project>
   ```
   
   Is already enough as surefire 3.x then correctly detects only JUnit4 and 
invokes the 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to