maven2中执行Ant任务
Maven调用Ant脚本的最佳实践 http://huqicto.blog.51cto.com/1308987/280889
maven2中执行Ant任务 http://blog.csdn.net/wfnlibo/article/details/1499704
首先增加:
<dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> </dependency>
<build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <copy todir="E:workspaceRB_MyFacesargetclasses"> <fileset includes="hibernate.cfg.xml" dir="E:workspaceRB_MyFacessrcmainjava"></fileset> <fileset includes="MessageResources.properties" dir="E:workspaceRB_MyFacessrcmainjava"></fileset> </copy> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build>
<ant antfile="build.xml" target="default" />