Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
12.0
-
None
-
None
-
Win 10, Java 14, NB 12.0 Beta 2, OpenFX 15-ea+2
Description
In nbaction.xml the entry:
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>clean</goal>
<goal>javafx:run</goal>
</goals>
</action>
should be
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>clean</goal>
<goal>test</goal> <!-- MISSING -->
<goal>javafx:run</goal>
</goals>
</action>
All goals between clean and javafx:run should be executed. For unknown reasons javafx:run excludes testing. This was discovered when the goals in a Maven pom of clean javafx:run would not run tests. Add test to the pom or the nbactions.xml resolved this. If the project does not have any test classes then there is no issue and the FX app starts up normally.
There is a side effect. A project that does not yet have a main method ends the build without running the tests. There needs to be a dummy class with a main in it.