Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Ant failed to create task or type "bnd"(Setup of BndTools does not work)
Ant failed to create task or type "bnd" [message #1005157] Thu, 24 January 2013 15:10 Go to next message
Ulrich Schmidt is currently offline Ulrich SchmidtFriend
Messages: 11
Registered: January 2013
Junior Member
I'm running Eclipse Juno (BuildId 20120614-1722) with Java 6.0.38 and Ant 1.8.3. I just installed BndTools from the Eclipse marketplace (bndlib 1.51 and some other bndtools-jars). I don't know much about OSGi but need to get familiar to it. So I tried to build a bundle with:

<target name="buildBnd" depends="compile">
<taskdef resource="aQute/bnd/ant/taskdef.properties"
classpath="biz.aQute.bndlib_1.51.0.jar"/>
<bnd
classpath="${build.classes.dir}"
files="${bnd.file}"
eclipse="true"
failok="false"
output="${bnd.jar}"
exceptions="true"
/>
</target>

The run fails with messages:
buildBnd:
[taskdef] Could not load definitions from resource aQute/bnd/ant/taskdef.properties. It could not be found.

BUILD FAILED
D:\Anwendungen\Eclipse\PrivateBase\LNNreader\Bundle.xml:83: Problem: failed to create task or type bnd
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.



As far as I understand now, the classpath in the taskdef-tag describes the location of the bnd-code and the classpath within the bnd-tag describes the path to be bundled. I've copied the "biz.aQute.bndlib_1.51.0.jar" to the $ANT_HOME/lib-path and have added all bndtools.*.jar-files to the runtime-path (Window - Preference - Ant - Runtime - Ant Home Home Entries).

Any suggestion, what can be done here?

Ulrich
Re: Ant failed to create task or type "bnd" [message #1790890 is a reply to message #1005157] Tue, 19 June 2018 18:27 Go to previous message
Ravi Babu Tummuru is currently offline Ravi Babu TummuruFriend
Messages: 1
Registered: June 2018
Junior Member
please add the bndtool.lib variable to build.properties under your home dir.

My build.properties as below passed this error

junit.lib=/scratch/xyz/extension.lib.external/junit-4.12.jar:/scratch/xyz/extension.lib.external/hamcrest-core-1.3.jar
test.properties=/home/xyz/test.properties
jmockit.lib=/scratch/xyz/extension.lib.external/jmockit-1.10.jar
oracle.sdoapi.lib.exist=true
oracle.sdoapi.lib=/scratch/xyz/extension.oracle.lib.external/sdoapi.jar
jdbc.driver.jar=/scratch/xyz/extension.oracle.lib.external/ojdbc7.jar
oracle.xdb.lib=/scratch/xyz/extension.oracle.lib.external/xdb6.jar
oracle.ucp.lib=/scratch/xyz/extension.oracle.lib.external/ucp.jar
oracle.xmlparser.lib=/scratch/xyz/extension.oracle.lib.external/xmlparserv2.jar
oracle.aqapi.lib=/scratch/xyz/extension.oracle.lib.external/aqapi-11.1.1.2.0.jar
#bndtool.jar=bnd-0.0.384.jar
#bndtool.lib=bnd-0.0.384.jar
bndtool.lib=/scratch/xyz/extension.lib.external/bnd-0.0.384.jar
xdb.jar=xdb6.jar
xdb.lib=xdb6.jar
aqapi.jar=aqapi-11.1.1.2.0.jar
aqapi.lib=aqapi-11.1.1.2.0.jar
ucp.jar=ucp.jar
ucp.lib=ucp.lib
dms.jar=ojdbc6dms.jar
dms.lib=ojdbc6dms.jar
kvclient.jar=kvclient.jar
kvclient.lib=kvclient.jar
sdoapi.lib=sdoapi.jar
sdoapi.jar=sdoapi.jar
oracle.sdoapi.lib=/scratch/xyz/extension.oracle.lib.external/sdoapi.jar
oracle.sdoapi.lib.exist=true

Previous Topic:Eclipce Indigo 3.7 Not Active Text and Link Text Color
Next Topic:Background Indexer Crash Recovery
Goto Forum:
  


Current Time: Mon Sep 24 12:21:34 GMT 2018

Powered by FUDForum. Page generated in 0.02373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top