I have an embedded jetty (version 8.1.8) web app I am packaging as a jar and which uses JSP for its frontend. It is built with maven version 3.0.3. The problem is that when I do: mvn package
it is including everything except my *.jsp files. I've tried to relocate them many different places but no luck.
I've tried to add <include>src/main/java/**/*.jsp</include>
to the maven-compiler-plugin
section of my pom. But that had no effect either.
Is there a way to be certain that jsp files get included?
My solution was to add the jsp files to src/main/webapp and to add the following snippet in the pom file:
<build>
<resources>
...
<resource>
<directory>src/main/webapp</directory>
</resource>
...
</resources>
...
</build>
Try to place .jsp into src/main/resources, Maven ignores all but .java files in src/main/java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With