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

Getting Started information for older versions of Broadleaf Commerce.

This section is no longer monitored by the Broadleaf Team. Information contained within is likely not accurate for Broadleaf version 1.5 or later.

Moderator: jocanas

niels
Newbie
Newbie
Posts: 1
Joined: Sun May 15, 2011 7:23 am

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

Postby niels » Sun May 15, 2011 7:30 am

Hi,

I tried to follow the eclipse instructions at
http://www.broadleafcommerce.org/conflu ... 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.

Niels


-----------------------------------------------------------------------------------------------------
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.

BUILD FAILED
/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:
-/home/niels/Desktop/n/app/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/lib
-/home/niels/.ant/lib
-a directory added on the command line with the -lib argument


Total time: 94 milliseconds

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

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

Postby phillipuniverse » Wed Jun 11, 2014 10:28 am

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.


Return to “Archive - Getting Started”

Who is online

Users browsing this forum: No registered users and 1 guest