Web resource directory - absolute path in deployment root

I am using IntelliJ IDEA 9.0.2.  I am trying to configure web resource directories within a Web Facet.  I am trying to deploy xml files from a source directory config\application to deployment directory WEB-INF\classes.  Instead of the xml files been copied to WEB-INF\classes, the files get copied to WEB-INF\classes\config\application.  I see that it is using "relative path" but in an older version of IDEA I was able to select an "absolute" path in the deployment directory.  I don't see how to do that in version 9.

Thanks for any help on this.

4 comments
Comment actions Permalink

This behaviour didn't changed in IDEA 9. If your xml files are located under source root they will be copied with *.class files to the module output.
If you want to copy them into some other directory you can add a web resource directory in a Web facet settings and set 'path relative to deployment
root' appropriately (/WEB-INF/classes in your case).

I am using IntelliJ IDEA 9.0.2.  I am trying to configure web resource directories within a Web Facet.  I am trying to deploy xml files from a source directory config\application to deployment directory WEB-INF\classes.  Instead of the xml files been copied to WEB-INF\classes, the files get copied to WEB-INF\classes\config\application.  I see that it is using "relative path" but in an older version of IDEA I was able to select an "absolute" path in the deployment directory.  I don't see how to do that in version 9.

Thanks for any help on this.

---
Original message URL: http://devnet.jetbrains.net/message/5266101#5266101



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

0
Comment actions Permalink

I can see that by making a directory in my project tree a source root directory, the contents will be deployed to WEB-INF/classes.  But I still have not been able to deploy an xml file from a non-source directory  to an arbitrary deployment directory.

I have attached the following files which demonstrate my problem:

     a development_dir.zip file which contains the source for a one class Hello world web application and the project files.

     a HelloWorld web app which is residing in my Tomcat webapps directory

In the web facet I have added a web resource directories entry to copy files from //$MODULE_DIR$/config/application directory to /WEB-INF/classes directory.  But when I rebuild project,  the xml file is not copied.  I would also like to deploy the web.xml file each time it changes to the WEB-INF directory.  I have not been able to do that also.



Attachment(s):
helloWebApp.zip
development_dir.zip
0
Comment actions Permalink

In order to get web resources copied to the output directory you need to create an artifact. Just select Web facet in the Project structure dialog and
press 'Create Artifact' button. After that specify an appropriate 'output directory' in the artifact settings.

I can see that by making a directory in my project tree a source root directory, the contents will be deployed to WEB-INF/classes.  But I still have not been able to deploy an xml file from a non-source directory  to an arbitrary deployment directory.

I have attached the following files which demonstrate my problem:
     a development_dir.zip file which contains the source for a one class Hello world web application and the project files.
     a HelloWorld web app which is residing in my Tomcat webapps directory

In the web facet I have added a web resource directories entry to copy files from //$MODULE_DIR$/config/application directory to /WEB-INF/classes directory.  But when I rebuild project,  the xml file is not copied.  I would also like to deploy the web.xml file each time it changes to the WEB-INF directory.  I have not been able to do that also.

---
Original message URL: http://devnet.jetbrains.net/message/5266188#5266188



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

0
Comment actions Permalink

I was able to create a set of artifacts that copied configuration files and web resources to deployment directories.

Thx!

0

Please sign in to leave a comment.