-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathant-task-maven.xml
29 lines (26 loc) · 1.12 KB
/
ant-task-maven.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<project name="Ant Task - Maven">
<description>Defines a macro to run Maven tasks from ANT, without needing additional libraries.
Lifted from http://maven.apache.org/ant-tasks/examples/mvn.html</description>
<property name="maven.home" value="/usr/share/maven2"/>
<macrodef name="maven">
<attribute name="options" default="" />
<attribute name="goal" />
<attribute name="basedir" />
<attribute name="resultproperty" default="maven.result" />
<element name="args" implicit="true" optional="true" />
<sequential>
<java classname="org.codehaus.classworlds.Launcher" fork="true"
dir="@{basedir}" resultproperty="@{resultproperty}">
<!--<jvmarg value="-Xmx512m"/>-->
<classpath>
<fileset dir="${maven.home}/boot"><include name="*.jar" /></fileset>
<fileset dir="${maven.home}/lib"><include name="*.jar" /></fileset>
</classpath>
<sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf" />
<sysproperty key="maven.home" value="${maven.home}" />
<arg line="--batch-mode @{options} @{goal}" />
</java>
</sequential>
</macrodef>
</project>