Reputation: 1222
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?
Upvotes: 9
Views: 13070
Reputation: 1222
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>
Upvotes: 17
Reputation: 136162
Try to place .jsp into src/main/resources, Maven ignores all but .java files in src/main/java
Upvotes: 4