I'm new to Netbeans, and newish (less than a year) to Ruby programming. I've been getting increasingly frustrated with Eclipse and Ruby - it's not at all Mac-like! - and decided, based on the recommendation in "Using JRuby", to try Netbeans.
Following a bunch of blog posts, notably Geertjan's post, I've got everything configured (I think), but I keep getting this error:
Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
The relevant part (again, I think) of build.xml is:
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${binaries.cache}/943CD5C8802B2A3A64A010EFB86EC19BAC142E40-ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
binaries.cache points to /Users/carolyn/.hgexternalcache; the jar file, I just can't find anywhere. I've asked on Geertjan's blog, and I thought I'd ask here as well. I've tried a variety of different things - it took me awhile to figure out that Netbeans uses its own Java and Ant! - and $ANT_HOME isn't defined, but nothing I try seems to work. I know I'm missing something simple, but can't figure out what it might be!
I'm running OS X Mountain Lion, with Netbeans 7.2 (build 201207171143). I downloaded NB Ruby to "~/Downloads/mercurial/NB Ruby".
Thanks in advance for any help! :-)
Thanks @TarjusArjun!
Once you've found ant-contrib-1.0b3.jar (I found it here), it needs to be copied to:
/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/java/ant/lib
If your install is anything like mine, you then get a bunch of new errors and a failed build - but it's a different problem.
(Thanks, Jav_Rock, for the link edit. :-) I totally forgot about doing that!)
Perhaps your root problem lies that in the fact that the NetBeans IDE is not picking the ANT_HOME. ANT comes bundled within NETBEANS IDE at this location : <<NETBEANSHOME>>/java/ant
. You can try by placing the ant-contrib-1.0b3.jar
at this location.
It 's working for me with ubuntu. Copy and rename the file ant-contrib-1.0b3.jar to the path specified
<target name="downloadbinaries" description="Download external binaries not stored in Mercurial sources." depends="-taskdefs">
<property file="${user.home}/.nbbuild.properties"/> <!-- permit binaries.cache to be overridden -->
<property name="binaries.cache" location="${user.home}/.hgexternalcache"/>
<property name="binaries.server" value="http://hg.netbeans.org/binaries/"/>
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}">
<manifest dir=".">
<include name="*/external/binaries-list"/>
</manifest>
</downloadbinaries>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${binaries.cache}/**943CD5C8802B2A3A64A010EFB86EC19BAC142E40-ant-contrib-1.0b3.jar**"/>
</classpath>
</taskdef>
</target>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With