idea 14, resource files not copied
Answered
I have .fxml files along my .java files in the same directory. Since upgrade to Intellij Idea 14 the fxml files are not copied during build to the build directory.
Has something changed, is it a bug, what are the relevant settings?
Thanks.
Please sign in to leave a comment.
May be some external process removes files from IDEA resources compile output directories, which is (by default) same as Gradle uses (e.g. it can be invocation of 'clean' gradle task).
First, you can try to perform 'Rebuild Project' and check if resources copied into "<your_project_path>/build/resources/main" directory.
Also you can configure IDEA compiler output folders explicitly in your gradle scripts:
Is your project Gradle- or Maven-based, or it was created in IntelliJ IDEA from scratch?
--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"
It's gradle based and I have following in my build.gradle
processResources {
from (sourceSets.main.resources.srcDirs) {
include '**/*'
}
from (sourceSets.main.java.srcDirs + sourceSets.main.groovy.srcDirs) {
include '**/*.fxml'
}
}
try to add the following code into you gradle script as a workaround:
I created related issue for the support of CopySpec configuration of processResources gradle task.
You can watch/vote the issue at https://youtrack.jetbrains.com/issue/IDEA-133047
Message was edited by: Vladislav Soroka
I'm having a very similar issue: I have resources that are in the src/test/resources folder, but they don't seem to be copied during compile as they always used to be.
So, my Spring JUnit tests don't run inside IDEA.
I do have the project synced up with Gradle, but it's not doing anything unusual with resources. There are no resources in the src/main/java directory or anything like that.
Is there a workaround?
Hello,
I'm using IntelliJ IDEA 2024.1.1 (Community Edition)
Build #IC-241.15989.150, built on April 29, 2024
Runtime version: 17.0.10+1-b1207.14 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
terminal.new.ui=true
Non-Bundled Plugins:
AntSupport (241.14494.158)
Kotlin: 241.15989.150-IJ
With a non-maven javaFX project, and my resources are not copied in the target directory. I dont know what happened.
Eriks33paris75002 Could you please clarify which Build System your Project is using and if it has any explicit configuration is regards to processing the Project's resources?