assembly插件:使用package.xml打zip包

assembly插件:使用package.xml打zip包

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.5.5</version>
    <configuration>
        <encoding>utf-8</encoding>
        <appendAssemblyId>false</appendAssemblyId>
        <descriptors>
            <!-- 配置描述符文件 -->
            <descriptor>src/main/build/package.xml</descriptor>
        </descriptors>
    </configuration>
    <executions>
        <execution>
            <id>make-assembly</id>
            <!-- 绑定到package生命周期 -->
            <phase>package</phase>
            <goals>
                <!-- 只运行一次 -->
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
</plugin>
原文地址:https://www.cnblogs.com/muzhongjiang/p/13322333.html