Page 1 of 1

Could not load definitions from resource org/apache/maven/ar

Posted: Sun May 15, 2011 7:30 am
by niels

I tried to follow the eclipse instructions at ... se+-+Maven

After doing all the steps and trying to run launch-admin in ant view I get an error as displayed below. Probably a vague question, but maybe someone recognizes this.


Buildfile: /home/niels/Desktop/n/src/space/my-broadleaf-admin/build.xml
[typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.

/home/niels/Desktop/n/src/space/my-broadleaf-admin/build.xml:13: Problem: failed to create task or type antlib:org.apache.maven.artifact.ant:pom
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:
-a directory added on the command line with the -lib argument

Total time: 94 milliseconds

Re: Could not load definitions from resource org/apache/maven/ar

Posted: Wed Jun 11, 2014 10:28 am
by phillipuniverse
In your build.xml (both in site and admin), at the top there is an import of the maven pom lib:

Code: Select all

<path id="maven-ant-tasks.classpath" path="../lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />

That allows you to use the <pom> and <artifact> elements. If for some reason this import doesn't work, you can use ant and pass in -lib ../lib/maven-ant-tasks-2.1.3.jar. This maven-ant-tasks jar is in the lib directory in the root of the demo site.