views:

283

answers:

2

I am building a sample app for google appengine using intelliJ 9

I am trying to add an apache library to my project. In the setting it is added and shows fine. I am able to import the apache classes while coding and there are no errors.

However, when I ask intelliJ to run the project (it deploys it in the local appengine after "making" the project), it does not add my new apache library to \web-inf\lib folder. I am unable to figure out where to tell IntelliJ to ADD this new library to my WAR!

A: 

Did you try putting directly into the web/WEB-INF/lib?

Another thing to try is to create a /lib directory, add it as a library to your project, and be sure to export that dependency.

duffymo
A: 

Thank you. Actually I just figured it out. We have to use what is called "artifacts settings". In artifacts settings, we can see our "projectname:war exploded" artifact. When we select that it asks us how we want the WEB-INF folder to look like.....

So,

right-click on project -> select module settings -> opens a new window on the "project settings" pane of new window select "artifacts" on the middle pane select "yourproject: war exploded" on the right most pane select "output layout" tab [selected by default]

Under this "output layout" tab there are 2 panes Left Pane IS the existing WAR layout [Here in the left pane I selected WEB-INF\lib folder] Right pane has any AVAILABLE elements that you WANT to add to the WAR layout! [In the right pane I selected the new library and then drag-n-drop in left pane]

Click "Apply" and its all set....

Prasanth
I think the "artifacts" pane is new to IntelliJ 9. It wasn't part of any of the earlier versions.
duffymo