ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitch Gitman" <mgit...@gmail.com>
Subject trying to Ivy-fy the Ant script task
Date Fri, 19 Dec 2008 05:59:31 GMT
I'm trying to do some inline Ant scripting via the Ant *script
*task<http://ant.apache.org/manual/OptionalTasks/script.html>.
The same could go for the Ant *scriptdef
*task<http://ant.apache.org/manual/OptionalTasks/scriptdef.html>
.

And I'm trying to make Ivy be the provider of all the libraries on which the
*script *task depends. That works with the Bean Scripting Framework (BSF)
JAR (for the common scripting API), and the BSF implementation I'm using--in
this case, beanshell. But it isn't working for commons-logging.jar, on which
BSF depends. If I make my bsf/bsf module depend on
org.apache/commons-logging, the dependency gets dowloaded into my Ivy cache,
but I see the following error:
BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at org.apache.bsf.BSFManager.<init>(BSFManager.java:102)
        at
org.apache.tools.ant.util.optional.ScriptRunner.createManager(ScriptRunner.java:170)
...
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 20 more

The only way I can get this *ClassNotFoundException *to go away is if I put
the commons-logging JAR in *USER_HOME*/.ant/lib or *ANT_HOME*/lib. Any ideas
how I can make this *AntClassLoader *use the commons-logging JAR provided by
Ivy?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message