Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4120

nbactions.xml use of clean and javafx:run goals blocks unit tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 12.0
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            omniprof Kenneth Fogel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: