当前位置: 代码迷 >> J2EE >> maven 编译与此同时复制指定文件以及文件夹
  详细解决方案

maven 编译与此同时复制指定文件以及文件夹

热度:256   发布时间:2016-04-21 23:43:48.0
maven 编译同时复制指定文件以及文件夹
现有项目test,我想在maven编译时同时拷贝另一文件到编译母目录,比如在执行mavn clean compile 时,把c盘下的abc.xml拷贝到编译目录target下,同时把c盘下的abc文件夹下所有内容拷贝到项目指定文件夹下,比如target下的abc文件夹,请问怎么做?
我试着在pom.xml中添加
<plugin>
                                <artifactId>maven-antrun-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>gen-webadmin</id>
                                                <phase>compile</phase>
                                                <configuration>
                                                        <tasks>
                                                                <copy todir="${basedir}/target/build/plugin_update/plugin"
                                                                        file="${basedir}/plugin.xml" />                                     
                                                        </tasks>
                                                </configuration>