在我pom.xml运行"mvn clean install"时,我使用maven-assembly-plugin创建一个可执行的jar-with-dependencies.现在它首先创建不可执行的"name-version.jar",然后创建"name-version-jar-with-dependencies.jar".
我可以以pom.xml某种方式配置,以便它不会创建不可执行的JAR文件吗?
目前我使用<appendAssemblyId> false </ appendAssemblyId>所以它只是覆盖了第一个文件......
我还得到了几个"......已添加,跳过"消息.我可以以某种方式阻止他们吗?
这是我的maven-assembly-plugin定义pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>my.main.class</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)