How do I deploy a new directory inside my "web" directory to out\artifacts\myproject_war_exploded?

I'm sure this is the help file or online documentation someplace but I am sorry, I couldn't find it.  My apologies.  Maybe the answer to this is just a URL.  I have spent too much time on this and would really appreciate a little help.

I have a simple Servlet project using Tomcat that seems to be set up and running properly using the Web facet.  My index.jsp and WEB-INF directory are deployed nicely to the myproject_war_exploded directory.

I added a directory "settings" under "web" alongside "WEB-INF" and index.jsp but it is not getting deployed to "out\artifacts\myproject_war_exploded"

I can see that under properties --> Artifacts --> myproject:war exploded has, under the "Output Layout" tab

       'web' directory content (C:\myproject\).

I was hoping IntelliJ would pick all of the files and directories I put there.

On the same "Artifacts" page under the same "OutputLayout" tab I tried using the + Directory Content, added the "settings" directory, build the artifacts, and nothing happens.

I don't see anything under the "Run/Debug" configurations that applies.

5 comments
Comment actions Permalink

IDEA should copy all subfolders of 'web' directory to the artifact output.
How do you build the artifact? Do you use Build | Build Artifact action?

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Yes, Build menu to Build Artifacts sub-menul and then I choose "universal:war exploded" from the list.

Individual files in the top level get copied over but not directories.

I have a separate project directory META-INF containing ejb-jar.xml and persistence.xml in a "resources" directory marked as a "Resource Root" as a "Source Folder" .  I think this is supposed to be copied to WEB-INF/classes/META-INF but the contained files are not copied.  IntelliJ created the META-INF directory.  Maybe I'm doing that wrong.

I'm using both OpenEJB with OpenJPA inside Tomcat, so perhaps IntelliJ is confused in the facet department.

0
Comment actions Permalink

It's very strange. Could you please send your project to Nikolay.Chashnikov@jetbrains.com?

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

OK, I'll have to get to it later tonight.

On the "artifacts" properties I have some "red" marks around "ear exploded" and a new mysterious Servlet won't start error.  My suspicion is that the project is so mangled (this is both a learning experience and a work in progress) that the Jetbrains code that is supposed to do the copying becomes hopelessly confused.

In any case, I'll send this as a link to a file on one of my web sites.

0
Comment actions Permalink

I've received your project, thank you.

The problem with new directories seems to be causes by the known issue: IDEA copies to an artifact output files rather than directories so if a
directory is empty or contains only empty directories it won't be created (see http://youtrack.jetbrains.net/issue/IDEA-50593). To workaround this
problem you can create any file in directory which should be copied to the artifact.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.