Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.6
-
Fix Version/s: 1.5.7, 1.6-beta-2
-
Component/s: Ant integration
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I have such thing working in our CI environment but couldn't figure out why is it not working when done from command line.
download http://anonsvn.jboss.org/repos/repository.jboss.org/maven2/jboss/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar to jbossall-client.jar
"groovy -cp jbossall-client.jar groovy_bug.groovy" works fine
"ant -f groovy_bug.xml" throws an exception although task's classpath is set and otherwise classes from jbossall-client.jar are resolved:
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
"ant -lib . -f groovy_bug.xml" works fine.
Ok, I figured it out. In our CI environment there is -Djava.ext.dirs defined so that's why it is working there. I hope in future groovy versions specifying classpath for the task itself will be sufficient.