[英]Maven - How can I include jsp files in the .jar file generated using maven-source-plugin
I'm trying to pack the source code of my application into a.JAR file, I used the maven-source-plugin for the same.我正在尝试将我的应用程序的源代码打包到一个.JAR 文件中,我也使用了 maven-source-plugin。 I added the following section into pom.xml for the same -
我将以下部分添加到 pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<extensions>false</extensions>
<inherited>true</inherited>
<configuration>
<outputDirectory>c:\app\workspace</outputDirectory>
<finalName>app.jar</finalName>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
I can see the source files in the jar generated at the outputDirectory location, but the JSP files are missing, I can see only.java files.在 outputDirectory 位置生成的 jar 中可以看到源文件,但是缺少 JSP 文件,我只能看到.java 文件。 How can I also pack.jsp files?
我怎样才能打包.jsp 文件? My application has these jsp files stored under src/main/webapps folder.
我的应用程序将这些 jsp 文件存储在 src/main/webapps 文件夹下。 I do not see webapps folder in the jar generated.
我在生成的 jar 中没有看到 webapps 文件夹。 Please advise.
请指教。
I'm trying to pack the source code of my application into a.JAR file, I used the maven-source-plugin for the same.我正在尝试将我的应用程序的源代码打包到一个.JAR 文件中,我也使用了 maven-source-plugin。 I added the following section into pom.xml for the same -
我将以下部分添加到 pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<extensions>false</extensions>
<inherited>true</inherited>
<configuration>
<outputDirectory>c:\app\workspace</outputDirectory>
<finalName>app.jar</finalName>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
I can see the source files in the jar generated at the outputDirectory location, but the JSP files are missing, I can see only.java files.在 outputDirectory 位置生成的 jar 中可以看到源文件,但是缺少 JSP 文件,我只能看到.java 文件。 How can I also pack.jsp files?
我怎样才能打包.jsp 文件? My application has these jsp files stored under src/main/webapps folder.
我的应用程序将这些 jsp 文件存储在 src/main/webapps 文件夹下。 I do not see webapps folder in the jar generated.
我在生成的 jar 中没有看到 webapps 文件夹。 Please advise.
请指教。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.