问题描述
以下显示了我拥有的pom.xml的一部分。当我运行“ mvn软件包”或“ mvn war”时,将生成战争以及一个名为“ mlm-classes.jar”的jar文件。
为什么会生成JAR文件?我的意思是,我想要JAR文件的pom.xml中没有指定它。
如果我想要一个不同的JAR文件名,该如何指定?
...
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<finalName>mlm</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/j*.jar</packagingExcludes>
<attachClasses>true</attachClasses>
<webXml>web/WEB-INF/web.xml</webXml>
<webResources>
<resource>
<directory>web/WEB-INF</directory>
<targetPath>WEB-INF</targetPath>
<includes>
<include>urlrewrite.xml</include>
<include>weblogic.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
...
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)