I am getting an error Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.
when I am trying to ant build on eclipse. So I downloaded ant-contrib-0.6.jar and kept it in my /lib
location of apache ant, but it still does not resolve my issue. I have also tried by specifying the /lib
location in my CLASSPATH
system variable. How can I get around this error?
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- Google USB Package isn't showing in SDK Manang
Use the below mentioned code in your build xml:
And in your build property file:
ant.jarPath=D:/antjars
And place ant.jar and ant-contrib-0.3.jar in directory:D:/antjars
You can provide full path to the ant-contrib JAR explicitly using "classpath" element:
One important thing missing from this StackOverflow page is that setting the correct ANT_HOME env var is absolutely vital and important, without this setting ant keeps telling the same error, regardless of where you copy the ant-contrib-1.0b3.jar on your file systems. This missing thing has costed me a few hours. =)
However I receive this error without eclipse, in the pure ant.
I fixed that this way:
Add the JAR to the Ant runtime classpath entries.
Window>Preferences>Ant>Runtime>Classpath
Add the JAR to either Ant Home Entries or Global Entries.
Check you have read permissions for the ant-contrib jar file.
In our case after copying the file with another user it did not, giving the same error message.
It would appear that you haven't installed the ant contrib jar into the correct lib directory. This can be difficult to do if you have several installations of ANT.
My suggestion is to install your ANT plugins into the "$HOME/.ant/lib" directory. You could go one step further and automate the process as follows: