Build Artifact but css and js file are not copied
Answered
This is my project structure,the css folder contains .css files.I've put the Web facet resource into the Artfacts Output Layout.All of ftl and jpg would be copied to the artfact output directory,except for the .css and .js file.
I have to copy them to the output directory manually.
Are there any settings I've missed?
Please sign in to leave a comment.
Hello,
Do you use any build system (Maven/Gradle)?
Yes,I have Maven installed,
7zip screenshot:
But the build system under Menu Build-->Build Artfact cannot copy the css and js file.
Is it possible to share sample project example? It seems to work fine with my test project.
Finally solved this problem,I imported the Multiple module maven project as a module to my idea workspace before.
All of the module of the maven project can be shown in the Modules panel of the Project structure window.
And this problem arised.
After I uncomment the line of the module configuration in the pom.xml
like this:
Idea would pops up "These modules have been removed from Maven structure:
'com.cc.**',Do you want them to be removed from the project too?
Hit No.
After that,Everything works fine.
After build Artifacts Action.The css and js files of the module which I want to run would be copied to the artifact output directory.
But I don't know why.
I still couldn't reproduce the issue on my side. Is it possible to provide sample project example?
Yes,I've uploaded the file to uploads.services.jetbrains.com.
The filename is vUJhgTcp.zip.
I imported this project as module to Idea.
Web resource path is "src\main\webapp".
Web Module Deployment descriptor is "main\webapp\WEB-INF\web.xml".
Maybe somthing is wrong with my pom.xml?
Thanks.
Thanks for the example!
*.js and *.css files are excluded from artifact in your configuration:
Thanks a lot.
I thought pom.xml configuration is for maven build only and Idea uses its own builtin build system before:-)
You are welcome! IDEA uses pom file as an initial source of project configuration. So artifact settings are also taken from it.