Heiko Kundlacz wrote:
Here is a code example. You can use each ant task. In my example here you find the integration of vssget (optional ant task). Use your ant tasks like you would have a build.xml file in ant. As you can see here, I load the parameters external from an xml-file. I use a special goal:prepare_ant_classpath, as I also want to integrate a connection to subversion. The subversion ant tasks are in a special jar and must be made public to "ant". So, if you also have special ant tasks and have the jar available, than put the special_ant_task.jar on a web server, prepare your dependency section in project.xml (because it must be downloaded to your local repository .... am I right?) and set the property:
maven.repo.remote = http://www.ibiblio.org/maven,http://my_web_server_host/path_to_the_jar_directory
Hope this helps ......
<goal name="getFilesVSS"> <attainGoal name="loadFile"/> <attainGoal name="prepare_ant_classpath"/> <j:forEach var="value" items="${xdoc}"> <j:set var="localPath"> ${maven.compile.src.set}/${value.attribute("localPath").getValue()} </j:set> <mkdir dir="${localPath}"/> <j:set var="vsspath"> ${value.attribute("value").getValue()}</j:set> <j:if test="${maven.debug}"> <echo>Debug: path = ${vsspath}</echo> </j:if> <attainGoal name="doAntVSS"/> <vssget vsspath="${vsspath}" localpath="${localPath}" recursive="${recursive}" db="${db}" login="${login},${passwd}"/> </j:forEach>
</goal>
<goal name="loadFile"
description="Loads an xml-File and saves content to a var">
<u:file var="filename" name="${basedir}/${qnamic.file.repos}"/>
<x:parse var="xmlcontent" xml="${filename}"/>
<echo>svn_plugin.loadFile: Loading file ${basedir}/${qnamic.file.repos}</echo>
<!-- ### Load ssdir ###--> <x:set var="xdoc" select="$xmlcontent/repos/ssdir[1]"/> <j:set var="ssdir">${xdoc.get(0).attribute("value").getValue()}</j:set> <j:if test="${maven.debug}"> <echo>Debug: ssdir = ${ssdir}</echo> </j:if> <....................snip ................> </goal>
Regards
Heiko
Brett Porter wrote:
You want to run a separate ant build.xml, or just embed ant tags? Either way
it's the same thing, as to run ant you are embedding the ant tag which is
actually an task provided by ant. (Is that confusing enough?:)
Have you read the user guide? In particular: http://maven.apache.org/reference/user-guide.html#maven.xml
- Brett
-----Original Message-----
From: Ted Weatherly [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 October 2003 11:11 AM
To: [EMAIL PROTECTED]
Subject: Maven Documentation
I want to call ant within maven. I guess I have to use the <ant> tag. Where can I find documentation on this tag?
-Ted
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
