pom.xml jar matched
-----------------------
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hsbc.jack</groupId>
<artifactId>antplugin</artifactId>
<packaging>maven-plugin</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>antplugin Maven Mojo</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-script-ant</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-ant-tasks</artifactId>
<version>2.1.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.6</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>2.8</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
---------------------------------------build.xml
<project xmlns:artifact="urn:maven-artifact-ant">
<target name="echotarget" depends="package">
<echo>${message}</echo>
</target>
<target name="init_maven">
<echo>init maven ant</echo>
<!--
remember to set M2_REPO before use this build.xml, for example in eclispe:
"Window→Preferences→Ant→Runtime", add a new property named "M2_REPO" and set it value point to the path of your maven
local repository; Or you can set it in build.properties. You need do one (and only one) of them.
-->
<!--
<path id="maven-ant-tasks.classpath" path="${M2_REPO}/org/apache/maven/maven-ant-tasks/2.0.9/maven-ant-tasks-2.0.9.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" />
-->
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" />
<echo>init maven ant end</echo>
</target>
<target name="package" depends="init_maven">
<echo>clean begin</echo>
<artifact:mvn pom="E:\eclipse_workspace\SHDemo\pom.xml" mavenHome="D:\softutil\apache-maven-3.0.5" fork="true">
<arg value="clean"/>
<arg value="package"/>
</artifact:mvn>
<echo>clean end</echo>
</target>
</project>
分享到:
相关推荐
为此,Maven 提供了 `maven-antrun-plugin`,它允许在 Maven 构建流程中运行 Ant 任务。在 `pom.xml` 中定义 Ant 任务,可以充分利用两者的优点。 在实际开发中,我们需要根据项目需求选择和配置合适的 Maven 插件...
有些人第二次考虑,来到Maven-AntRun-Plugin并使用一些ant任务。 但是,为什么不存在一个可以简单地打印出某种消息的简单小插件。 正是在这种情况下,才打算使用Echo Maven插件。执照问题追踪器用法第一种也是最...
maven-plugin-tools-ant-3.2.jar
maven-plugin-tools-ant-3.1.jar
maven-plugin-tools-ant-3.0.jar
maven-plugin-tools-ant-2.9.jar
maven-plugin-tools-ant-2.8.jar
maven-plugin-tools-ant-2.7.jar
maven-plugin-tools-ant-2.6.jar
maven-plugin-tools-ant-2.5.jar
maven-plugin-tools-ant-2.5.1.jar
maven-plugin-tools-ant-2.4.jar
maven-plugin-tools-ant-2.4.3.jar
maven-plugin-tools-ant-2.4.2.jar
maven-plugin-tools-ant-2.4.1.jar
maven-plugin-tools-ant-2.1.jar
maven-plugin-tools-ant-2.0.5.jar
maven-plugin-tools-ant-2.0.4.jar
maven-plugin-tools-ant-2.0.3.jar
maven-plugin-tools-ant-2.0.2.jar