This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. After setting up the JavaFX platform, create a new JavaFX project 2. From the command line, run ant in the project's root directory The build fails with the following message: BUILD FAILED /Users/petrjiricka/NetBeansProjects/JavaFXApplication2/nbproject/build-impl.xml:955: The following error occurred while executing this line: /Users/petrjiricka/NetBeansProjects/JavaFXApplication2/nbproject/build-impl.xml:371: The <classpath> for <junit> must include junit.jar if not in Ant's own classpath
And you have JUnit installed, correct? Just making sure ;-)
Yes I do. The workaround is to create a new JUnit test with a test method - after that, the build passes.
Works for me. Could you please check you <userdir>\build.properties? It should contain: libs.junit.classpath=<path to junit.jar> Otherwise you didn't download JUnit.
Yes, I have installed the JUnit plugin and my <userdir>/build.properties contains: libs.junit.classpath=/Users/petrjiricka/software/netbeans_webmain_6156/java/modules/ext/junit-3.8.2.jar libs.junit_4.classpath=/Users/petrjiricka/software/netbeans_webmain_6156/platform/modules/ext/junit-4.10.jar But it still does not work for me. I am comparing a standard Java SE project with a JavaFX project, and the difference is that an empty FX project contains the "test" directory - Java SE project does not. Consequently, the Projects view of FX project contains the Test Packages and Test Libraries nodes - again Java SE project does not. Then I see this in the build-impl.xml file: <condition property="have.tests"> <or> <available file="${test.src.dir}"/> </or> </condition> So this evaluates to true in an empty FX project, and false in an empty Java SE project, and based on this, some extra targets in the FX project are executed which are not executed in Java SE project. Could this be the problem?
The pure J2SE Project does not create the test folder (as the JUnit may not be installed). It's created on demand when user creates a test. The condition described by Petr prevents the build script to execute testing when there are no tests. But if the junit is installed it should work fine, I will verify.
Fixed by not creating "test" dir for FX project by default. But Tomas, I believe there is still minor issue in J2SE build infrastructure (with junit installed and "test" dir created for new project). http://hg.netbeans.org/jet-main/rev/497b1eb500d8
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/497b1eb500d8 User: Anton Chechel <manowar@netbeans.org> Log: #203051 do not create 'test' dir by default