antlib et classpathref

J'ai le texte suivant build.xml fichier:

<?xml version="1.0" encoding="UTF-8"?>
<project name="Minimal" default="default" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
    <path id= "libs.folder" >
         <fileset dir= "lib" >
             <include name= "*.jar" /> 
         </fileset>
    </path>

    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="libs.folder" /> 
    <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="libs.folder"/>
    <artifact:pom id="pom.file" file="pom.xml" />
    <property name="pom.version" value="${pom.file.version}"/>

   <groovy src="test.groovy">
    <arg line="3"/>
   </groovy>
...

qui se trouve dans la structure suivante:

my-project
  -> lib
     -> maven-ant-tasks.jar
     -> svnant.jar
     -> groovy-all.jar
     -> svnClientAdapter.jar
  -> build.xml
  -> pom.xml
  -> test.groovy

quand je lance le fichier de compilation j'obtiens:

BUILD FAILED
....\build.xml:18: Problem: failed to create task or type antlib:org.apache.maven.artifact.ant:pom
Cause: The name is undefined.
Action: Check the spelling.

Si je lance avec:

ant -lib lib

cela fonctionne, mais il pourrait être bon de garder tout à l'intérieur de la build.xml fichier - comme avec le groovy et svnant libs.

est-ce possible avec le maven-ant-tasks.jar en quelque sorte?

OriginalL'auteur u123 | 2012-07-18