Why doesn't maven include JSP files in my bank?

I have a built-in berth application (version 8.1.8), which I pack as a jar, and which uses JSP for its interface. It is built with maven version 3.0.3. The problem is that when I do: mvn packageit includes everything except my * .jsp files. I tried to move them to different places, but no luck.

I tried adding <include>src/main/java/**/*.jsp</include>to maven-compiler-pluginmy pom section . But this also did not affect.

Is there any way to make sure jsp files are included?

+5
source share
3 answers

My solution was to add jsp files to src / main / webapp and add the following snippet to the pom file:

<build>
    <resources>
      <resource>
        <directory>src/main/webapp</directory>
      </resource>
      ...
    </resources>
    ...
</build>
+10
source

.jsp src/main/resources, Maven , .java , src/main/java

+4

: / jar : -

Specify a list fileset patternsto include or exclude by adding <includes>/<include>or <excludes>/<exclude>in pom.xml.

<project>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <includes>
            <include>**/service/*</include>
          </includes>
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

Hope this helps.

0
source

All Articles