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>

 

posted @ 2020-08-03 23:24  ±小马哥  阅读(1235)  评论(0编辑  收藏  举报