ant學習(存檔)


ANT = [A]nother [N]eat [T]ool 
This plugin provides the ability to run Ant tasks from within Maven. You can even embed your Ant scripts in the POM
需要經常編寫ant腳本,爲此需要學習下ant的腳本。

在maven項目中最常見的用法:
     <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                         <execution>
                              <phase>process-test-resources</phase>
                              <goals>
                                   <goal>run</goal>
                              </goals>
                              <configuration>
                                   <target>
                                        <delete dir="${basedir}/src/java.test/spring/conf" />
                                        <mkdir dir="${basedir}/src/java.test/spring/conf" />
                                        <copy todir="${basedir}/src/java.test/spring/conf">
                                             <fileset dir="${basedir}/target/conf/webroot/WEB-INF/bean/">
                                                  <include name="**" />
                                             </fileset>
                                        </copy>
                                        <move file="${basedir}/target/conf/java/sqlmap-config.xml"
                                             tofile="${basedir}/src/java.test/spring/web.sqlmap-config.xml"
                                             overwrite="true" />
                                   </target>
                              </configuration>
                         </execution>
                    </executions>
       </plugin>
發佈了76 篇原創文章 · 獲贊 109 · 訪問量 31萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章