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.

Bug 210400 - ant clean fails in JavaFX project if JavaFX platform is not recognized
Summary: ant clean fails in JavaFX project if JavaFX platform is not recognized
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 22:48 UTC by kcr
Modified: 2012-04-16 13:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kcr 2012-03-29 22:48:12 UTC
Running "ant clean" on a saved JavaFX project where the project/private directory is stripped out or where the JavaFX platform is otherwise invalid will cause "ant clean" to fail.

$ ant clean
Buildfile: C:\Users\kcr\Documents\NetBeansProjects\MyJavaFXApp\build.xml

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

BUILD FAILED
C:\Users\kcr\Documents\NetBeansProjects\MyJavaFXApp\nbproject\build-impl.xml:87: The J2SE Platform is not correctly set up.
 Your active platform is: Default_JavaFX_Platform, but the corresponding property "platforms.Default_JavaFX_Platform.home" is not found in the project's properties files. 
 Either open the project in the IDE and setup the Platform with the same name or add it manually.
 For example like this:
     ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.Default_JavaFX_Platform.home" in a .properties file)
  or ant -Dplatforms.Default_JavaFX_Platform.home=<path_to_JDK_home> jar (where no properties file is used)

Total time: 0 seconds

===========================================================================

This is a regression from NB 7.1.1 and is causing the following JavaFX build-time bug:

http://javafx-jira.kenai.com/browse/RT-20694
Comment 1 kcr 2012-03-29 22:50:52 UTC
Raising to P2 since there is really no good workaround for us (we are likely going to have to override the "clean" target in build.xml for every project). This really needs to be fixed either in 7.1.2 or 7.2.
Comment 2 kcr 2012-04-03 12:55:01 UTC
The particular error we are running into is different than what I reported above.

I looked into what we are doing in our actual development build files more closely, and the problem isn't with the setting of the platform.

Our dev build file for our apps repo is setting javafx.sdk, javafx.runtime, and platform.home. The platform.home variable is correctly being set to $JAVA_HOME. When running ant clean, the javafx.sdk and javafx.runtime variables are pointing to a path that doesn't (yet) exist, but that didn't used to cause "ant init" to fail.

The change in jfx-impl.xml that is causing our problem looks like a new check for a valid JavaFX runtime jar as part of the init check, such that we now get the following error:

C:\Users\kcr\javafx\2.1-kcr-gfx\jfx\artifacts\apps\ga-samples\src\BrickBreaker\nbproject\jfx-impl.xml:511: Error:
JavaFX runtime JAR not found.
Comment 3 Petr Somol 2012-04-04 12:27:11 UTC
fixed in jet-main:
http://hg.netbeans.org/jet-main/rev/0037c026384c

postponed FX artifact checks in project build scripts to be invoked no sooner than necessary
Comment 4 Stepan Zebra 2012-04-04 16:00:29 UTC
verified in trunk, please transplant to 7.1.2
Comment 5 Petr Somol 2012-04-04 17:20:50 UTC
transplanted to release71_fixes:
http://hg.netbeans.org/releases/rev/5e951b2d81e2
Comment 6 Quality Engineering 2012-04-05 01:19:42 UTC
Integrated into 'releases', will be available in build *201204042205* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/5e951b2d81e2
User: Petr Somol <psomol@netbeans.org>
Log: #210400 moving fx checks in jfx-impl from init to targets where they are in fact needed
Comment 7 Quality Engineering 2012-04-05 09:43:11 UTC
Integrated into 'main-golden', will be available in build *201204050400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0037c026384c
User: Petr Somol <psomol@netbeans.org>
Log: #210400 moving fx checks in jfx-impl from init to targets where they are in fact needed
Comment 8 Stepan Zebra 2012-04-16 13:00:11 UTC
verified in 7.1.2