剛接觸maven時,使用 maven-assembly-plugin插件進行打包,發現打包出來的結果總是末尾包含assembly id,不符合既定的規則,一直未百度出結果,因不影響功能,就未深究,最後老大在Google找到了答案,關鍵是
<appendAssemblyId>false</appendAssemblyId>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>../target/co_search-${project.version}</outputDirectory>
<descriptors>
<descriptor>../assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<!-- 當執行mvn package時纔會打包 -->
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
爛筆頭