ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: example\build-a-ivy-repository antlib.xml could not be found/
Date Mon, 12 Apr 2010 05:31:02 GMT
The Antlib should be part of the ivy.jar.
That example has the precondition that you have already downloaded that jar.
	<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />
    <target name="load-ivy">
    	<path id="ivy.lib.path">
    	    <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
    	</path>
    	<taskdef resource="org/apache/ivy/ant/antlib.xml"
    	          uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>


If you dont have that jar, have a look at the "go-ivy" example.


Jan

 

> -----Ursprüngliche Nachricht-----
> Von: Szomor Attila [mailto:attila@szomor.hu] 
> Gesendet: Sonntag, 11. April 2010 12:47
> An: ivy-user@ant.apache.org
> Betreff: example\build-a-ivy-repository antlib.xml could not be found/
> 
> Hi,
> 
> I just now istalled the IVY and tried it with 
> build-a-ivy-repository from examples and got an error:
> Could not load definitions from resource 
> org/apache/ivy/ant/antlib.xml. It could not be found.
> 
> Where I find an antlib.xml for this example?
> 
> Attila.
> 
> STDOUT:
> Apache Ant version 1.8.0 compiled on February 1 2010
> Trying the default build file: build.xml
> Buildfile: G:\Program Files\Apache Software 
> Foundation\apache-ivy-2.1.0\src\example\build-a-ivy-repository
> \build.xml
> Detected Java version: 1.6 in: G:\JAVA\JDK16~1.0_1\jre
> Detected OS: Windows XP
> parsing buildfile G:\Program Files\Apache Software 
> Foundation\apache-ivy-2.1.0\src\example\build-a-ivy-repository
> \build.xml with URI = 
> file:/G:/Program%20Files/Apache%20Software%20Foundation/apache
> -ivy-2.1.0/src/example/build-a-ivy-repository/build.xml
> Project base dir set to: G:\Program Files\Apache Software 
> Foundation\apache-ivy-2.1.0\src\example\build-a-ivy-repository
> parsing buildfile 
> jar:file:/G:/Program%20Files/Apache%20Software%20Foundation/ap
> ache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml 
> with URI = 
> jar:file:/G:/Program%20Files/Apache%20Software%20Foundation/ap
> ache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml 
> from a zip file
> Build sequence for target(s) `maven2' is [load-ivy, init-ivy, maven2]
> Complete build sequence is [load-ivy, init-ivy, maven2, 
> clean-repo, maven2-deps, clean-cache, maven2-namespace-deps, 
> maven2-namespace, ]
> 
> load-ivy:
>   [taskdef] Could not load definitions from resource 
> org/apache/ivy/ant/antlib.xml. It could not be found.
> 
> init-ivy:
> [antlib:org.apache.ivy.ant] Could not load definitions from 
> resource org/apache/ivy/ant/antlib.xml. It could not be found.
> 
> ERROR:
> BUILD FAILED
> G:\Program Files\Apache Software 
> Foundation\apache-ivy-2.1.0\src\example\build-a-ivy-repository
> \build.xml:56: Problem: failed to create task or type 
> antlib:org.apache.ivy.ant:settings
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations 
> have taken place.
> No types or tasks have been defined in this namespace yet
> 
> This appears to be an antlib declaration. 
> Action: Check that the implementing library exists in one of:
>         -G:\PROGRA~1\APACHE~1\apache-ant-1.8.0\lib
>         -G:\Documents and Settings\aszomor\.ant\lib
>         -a directory added on the command line with the -lib argument
> 
>  at 
> org.apache.tools.ant.UnknownElement.getNotFoundException(Unkno
> wnElement.java:487)
>  at 
> org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.
> java:419)
>  at 
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElem
> ent.java:163)
>  at org.apache.tools.ant.Task.perform(Task.java:347)
>  at org.apache.tools.ant.Target.execute(Target.java:390)
>  at org.apache.tools.ant.Target.performTasks(Target.java:411)
>  at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
>  at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
>  at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Def
> aultExecutor.java:41)
>  at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
>  at org.apache.tools.ant.Main.runBuild(Main.java:801)
>  at org.apache.tools.ant.Main.startAnt(Main.java:218)
>  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> 
> Total time: 1 second
> 
> 
> 
> __________ ESET Smart Security - Vírusdefiníciós adatbázis: 
> 5017 (20100411) __________
> 
> Az üzenetet az ESET Smart Security ellenőrizte.
> 
> http://www.eset.hu
> 
> 

Mime
View raw message