SUMMARY: The goal is to find the path to the WEB-INF folder in the target folder for maven-jetty-plugin that is compatible with other servers as well. The ServletContext.getRealPath("") works beautifully for, e.g., Tomcat, or mvn jetty:run-war. Thank you
Misha
Dear All:
This is related to http://tickets.openmrs.org/browse/TRUNK-1760
It can be easily tested with the following commands:
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-light-struts-archetype -DarchetypeVersion=2.1.0-M1 -DgroupId=com.mycompany -DartifactId=myproject
cd myproject
patch -p0 < diff
cd myproject
mvn clean install -DskipTests && mvn jetty:run
Please find the diff file here: http://old.nabble.com/file/p29815681/diff
Now, navigate to http://localhost:8080/ in a browser and this will point to !!! /home/misha/workspace/myproject/src/main/resources
Should this not, instead, point to?
./target/classes
or
./target/myproject-2.1.0-M1/WEB-INF/classes
Is it possible to modify this behavior?
Thank you so much
Yours
Misha Koshelev