ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitch Gitman" <mgit...@gmail.com>
Subject Re: trying to Ivy-fy the Ant script task
Date Sat, 20 Dec 2008 00:26:22 GMT
Just had a "Well duh, no kidding" moment. I'm used to using the *ivy:cachepath
*task for establishing my classpaths from Ivy. But there's nothing stopping
me from doing an *ivy:retrieve *in addition where the destination is the
destination pattern would go like so:
pattern="${user.home}/.ant/lib/[artifact].[ext]

I tried to set the configuration so that only the commons-logging JAR gets
copied over.

On Thu, Dec 18, 2008 at 9:59 PM, Mitch Gitman <mgitman@gmail.com> wrote:

> 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