JavaFX + Maven + NetBeans + Patience = ?

February 9, 2010

Observations from using Maven to manage a JavaFX project in NetBeans 6.8:

  1. Place all JavaFX source files in src\main\javafx. Otherwise, NetBeans complains about not being able to find com.sun.javafx.runtime.FXBase.
  2. Place all Java source files in src\main\java, just like a normal Java project.
  3. Maven JavaFX project folder structure

  4. Ignore the error message in JavaFX files about being in a non-JavaFX project. If the standard project definition lets you mix Java and JavaFX source files, why not in a Maven project?
  5. Bogus file warning

  6. Fix Imports will not fix imports for your own classes. You must manually type in the import statement, and resist the urge to use the command later as it will remove your own imported classes.
  7. Unused used import

  8. Even if you do manage to keep your imports, you still have to contend with complaints about variable types.
  9. Bad variable type

And yet, this project will still compile, despite the warnings.


Follow

Get every new post delivered to your Inbox.