Java 分布式maven打包到复制jar包到指定文件夹
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <!--suppress UnresolvedMavenProperty --> <copy overwrite="true" tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar" file="${project.build.directory}/${project.artifactId}.jar" /> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build>