How to deploy project with all resources?

I want to create an artifact but I don't know which elements I must add to Output. For example I have some properties files in same folder with my classes. How can I add them to deploy?

3 comments
Comment actions Permalink

Hello.

First make sure the properties are copied to output by the compiler. See Settings / Compiler / Resource patterns. By default properties are copied.

Then - what type of artifact are you building? War, jar? In general, check Project Structure dialog / Artifacts / your artifact / and check that the compile output goes to proper place.

If you use Maven, it's better to make all possible changes in pom.xml, and then re-import to IDEA.

Regards,
Alexander.

0
Comment actions Permalink

I am building war file. For example I have some classes and properties files under my src folder; src/login/login.properties and src/login/login.class. When I build and deploy this project I can't see my properties files. I have 2 artifacts which are myapp.war and myapp.war exploded.
Under myapp.war there is -myapp.war exploded as Output layout.
Under myapp.war exploded there are folders named "my classes" and "lib" and an element "web faced resources for myapp.war". There are libraries under lib folder and there is "myapp.war compile output" under "my classes" folder.

When I build and deploy my project I can see my .class files under "my classes" directory but I can't see my properties files. Is there a way to add them?

I am using intellij 12.1.6 by the way.

0
Comment actions Permalink

1. Are you using Maven?
2. What is the value of Settings / Compiler / Resource patterns?

Thanks,
Alexander.

0

Please sign in to leave a comment.