Issue with fxml files not being copied to target/classes

Hello all,

I've got a package like com.mydomain.myapp.fxml in which there are several JavaFX fxml files.
After switching from Idea CE 11 to Idea CE 12 those files aren't copied to target/classes anymore using the "package" target from Maven (3.0.4).
Does anybody have a hint for me to solve the problem?

Unter Settings - Compiler I added the resource pattern ?*.fxml.
If I add a Java class to my fxml package, the Java class file is being created under target/classes. If I add a xml resource to the package it isn't copied as well. Didn't have this problem with Idea CE 11.

I don't see what's wrong so please help me! Thank you!


Sorry my fault. Of course Maven expects resource files like *.fxml in src/main/resources and not in src/main/java. After moving the files everything works fine.

But I wonder why this worked with Idea CE 11... ?:| Strange stuff...


I don't like the approach of having fxml files in src/main/resources.

In maven projects you can do the following in your pom.xml:


This will include fxml files from src/main/java in your target/classes directory.


Please sign in to leave a comment.