Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] War overlays in m2e-wtp with workspace projects - is it possible?

Consider the following projects:

ProjectA (war) - has dependency to ProjectB
ProjectB (war) - the overlay

I'm trying to make the overlay work when both projects are opened in Eclipse.
However, when I run jetty:run inside the IDE (through maven-jetty-plugin) the jsps are not available.

Quoting from http://www.eclipse.org/m2e-wtp/ :

> war overlays of workspace dependencies and .war archives, with incremental deployment on server

However, I can't find any documentation on how to use overlays when running the jetty server from maven plugin. Is this possible?

I attach a test case to illustrate the problem:
- warTest is a struts 2 application that depends on test
- HelloWorld.jsp has 2 jsp includes from the other app (/WEB-INF/test3.jsp and /example/test2.jsp )
- test is another simple struts2 WAR application

Test case:
1) run jetty:run inside eclipse on the warTest project and go to localhost:8080 on a browser.
Expected result:
- You should see the test3.jsp and test2.jsp contents between the strings "test1" and "test2" (because they are being included in HelloWorld.jsp)
Actual result:
- No string is shown
- Exception on the console (java.io.FileNotFoundException: /example/test2.jsp, java.io.FileNotFoundException: /WEB-INF/test3.jsp).

If war overay of workspace dependencies is supported, could you tell me what is being done incorrectly and how to have this working?

Note: See previous thread on Webby regarding why webby is not the best approach for this.

Cheers,

Miguel Almeida

Attachment: overlayTest.zip
Description: Zip archive


Back to the top