Sharing content between modules
We've got a source tree with this kind of structure:
common/page1.jsp
common/WEB-INF/stuts-config.xml
webapp1/index.jsp
webapp2/index.jsp
webapp2/index.jsp
The common content is copied into each webapp when it's built in ant so that the final wars look something like this:
webapp1.war/page1.jsp
webapp1.war/WEB-INF/stuts-config.xml
webapp1.war/index.jsp
In IDEA we've got three modules, one for each web app. The problem is that I can only add the common/ directory as a content root to one of the modules, and without it the JSP compiles etc in the other modules fail within the IDE.
Anyone know a way I can fix this without changing the source tree layout?
Edited by: Guy Coleman on Jul 10, 2008 1:39 PM
请先登录再写评论。
You can add dependency from webapp1 and webapp2 module to common module and select "Include Facet in build" for common Web facet in "Modules and
libraries to package" table (Web facet settings -> "Web Settings" tab).
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
That's what I was after, thanks!