Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 220520 - No option for adding an fxml file to a maven project.
No option for adding an fxml file to a maven project.
Product: javafx
Classification: Unclassified
Component: Project
All All
: P2 with 1 vote (vote)
: 7.4
Assigned To: Petr Somol
Depends on: 226836 226842
Blocks: 221184
  Show dependency treegraph
Reported: 2012-10-21 21:54 UTC by kecampbell
Modified: 2013-04-21 02:18 UTC (History)
5 users (show)

See Also:

SCREENSHOT showing javafx support is enabeld. (142.53 KB, image/jpeg)
2012-10-22 08:47 UTC, kecampbell
Screenshot showing no javafx option (196.73 KB, image/jpeg)
2012-10-22 08:51 UTC, kecampbell

Note You need to log in before you can comment on or make changes to this bug.
Description kecampbell 2012-10-21 21:54:38 UTC
Product Version = NetBeans IDE 7.3 Beta (Build 201210011125)
Operating System = Mac OS X version 10.8.2 running on x86_64
Java; VM; Vendor = 1.7.0_10-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04

I tried to add a new fxml file to an existing maven project (one the already contains other FXML components). 

I did not see a menu command to do so. I ended up doing "other->empty file"
Comment 1 Stepan Zebra 2012-10-22 08:43:52 UTC
There should be "Empty FXML" type under "JavaFX" category in "New File" wizard.

If it's not there, maybe JavaFX support is not activated - verify in "Tools | Plugins" under "Installed (#)" tab (tick Show details and look for JavaFX 2 Support).
Comment 2 kecampbell 2012-10-22 08:47:51 UTC
Created attachment 126297 [details]
SCREENSHOT showing javafx support is enabeld.
Comment 3 kecampbell 2012-10-22 08:51:47 UTC
Created attachment 126299 [details]
Screenshot showing no javafx option
Comment 4 kecampbell 2012-10-22 08:53:05 UTC
Does not work for me. I suspect javafx support is only enabled if a project is organized in a particular way.
Comment 5 Stepan Zebra 2012-10-22 10:03:59 UTC
(In reply to comment #4)
> Does not work for me. I suspect javafx support is only enabled if a project is
> organized in a particular way.

Indeed, the JavaFX category is completely missing on Maven projects.
Comment 6 Petr Somol 2012-10-31 14:35:32 UTC
Actually so far there has been no specific JavaFX support in Maven projects, we have supported only the Ant-based "JavaFX Application" project type. See Issue #221184 for more details. For the same reason there has been so far no explicit support added in New File dialog to create FX artifacts in Maven project - this action is technically not the same as in the Ant project and requires different implementation. Maven requires strict distinguishing between source and resource artifacts, what would have various consequences, e.g., the New File wizard creating FXML would have to produce artifacts in different locations than is the case in current FX Application project, the "create controller from fxml" editor action would have to be changed in Maven context, etc. For this reason I am changing this issue to be a part of a bigger Enhancement issue targeted at adding complex JavaFX2 support in Maven projects.
Comment 7 Petr Somol 2013-02-28 14:03:42 UTC
New File dialogs need to be adjusted for Maven in order to generate the various non-java artifacts (fxml, css) to places expected by Maven. Will depend on the planned javafx maven archetype and project template.
Comment 8 Petr Somol 2013-04-19 22:42:10 UTC
fixed in jetmain

all FX New File dialogs are now available in Maven projects. The biggest change is in New FXML dialog which is now improved both in Ant and Maven projects. It creates FXML file and optionally a controller and css file. In Maven the resource files are placed to resource source root. In both Ant and Maven projects it is now possible to select sourcegroup and package not only for the FXML file but also for controller and css.
Comment 9 Quality Engineering 2013-04-21 02:18:49 UTC
Integrated into 'main-golden', will be available in build *201304202301* on (upload may still be in progress)
User: Petr Somol <>
Log: #220520 - No option for adding an fxml file to a maven project

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo