<build> <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory> <testOutputDirectory>src/main/webapp/WEB-INF/classes</testOutputDirectory> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>copy-lib-src-webapps</id> <phase>package</phase> <configuration> <tasks> <!-- 打印信息 --> <echo message="corp file;copy dir" /> <!-- 删除文件夹 --> <delete dir="src/main/webapp/WEB-INF/lib" /> <!-- 删除文件 --> <delete file="${project.build.directory}/classes/abc.properties" /> <!-- 复制文件 --> <copy todir="${project.web-common.lib-targetPath}"> <fileset dir="${project.commonmodule.lib-source.directory}"> <include name="*" /> </fileset> </copy> <!-- 拷贝文件,选择是否overwrite --> <copy tofile="D:\aa.txt" file="D:\bb.txt" overwrite="true"></copy> <!-- 拷贝文件夹,将test1、test2文件夹中的内容拷贝到test文件夹中 --> <copy todir="d:\test"> <fileset dir="d:\test1"></fileset> <fileset dir="d:\test2"></fileset> </copy> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
maven-antrun-plugin的使用
自定义maven变量以及maven内置常量
http://panyongzheng.iteye.com/blog/2036736
猜你喜欢
转载自panyongzheng.iteye.com/blog/2206295
今日推荐
周排行