maven插件配置复制生成的jar到指定目录
2018-04-03 本文已影响0人
巨子联盟
<!--<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>copy-lib-src-webapps</id>
<phase>install</phase>
<configuration>
<target name="copy swf files to web project">
<copy file="${project.build.directory}/${project.artifactId}.${project.packaging}"
tofile="D:\lib\${project.artifactId}.${project.packaging}"/>
</target>
<tasks>
<!– <delete dir="src/main/webapp/WEB-INF/lib" />–>
<!–<copy todir="D:\">
<fileset dir="${project.build.directory}/${project.artifactId}.${project.packaging}">
<include name="*" />
</fileset>
</copy>–>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>-->
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>copy-file</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/${project.artifactId}.${project.packaging}</sourceFile>
<destinationFile>D:\lib\${project.artifactId}.${project.packaging}</destinationFile>
</configuration>
</execution>
</executions>
</plugin>