Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
9.0
-
None
-
NetBeans 9, JDK 10
Description
Using Lombok in a Maven JAR project (using JDK 8 or JDK 10), you can't run a test file after making changes to it. When saving the changes and running the test, the following error shows:
--- maven-surefire-plugin:2.12.4:test (default-cli) @ lombok-netbeans9 ---
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.368 s
Finished at: 2018-09-23T22:43:47-03:00
Final Memory: 7M/34M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-cli) on project lombok-netbeans9: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
After that, you have to clean the whole project to run the tests again.
I've attached a simple project that reproduces this problem.
How to reproduce
- Open NetBeans 9
- Go to File > New project > Maven > Java Application and create a basic project
- Open pom.xml and add lombok as depedency:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<scope>provided</scope>
</dependency> - Create a simple JUnit test with a test method (@Test)
- Run the test and confirm it runs fine.
- Make a simple change to the test method and save it.
- Run the test, and the error shows.