You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Keith Hatton <kh...@axiomsystems.com> on 2004/03/15 11:12:19 UTC

RE: Requiring jar files in classpath (or $ANT_HOME/lib) fortaskdefs

With respect, I think that misses the point.

The problem is, for JUnit and other Ant-optional tasks (i.e. those defined in some sense in ANT_HOME/lib), they won't "just work" without fiddling with either distro (i.e. move JUnit files -> Ant, or move Ant files -> JUnit).

This makes it a pain, particularly for those attempting to herd cats into a standard build environment.

I understand the issues and I have no solution to offer (other than, perhaps, removing ant-*.jar from the standard Ant distribution so that these problems don't arise - but then you would open the door to a set of different problems), but please recognise that it *is* a problem in many environments. There are people who would (consciously or unconsciously) take every opportunity to rubbish free software, and this is an example of giving them an easy way of doing this.

Keith


-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: 15 March 2004 09:03
To: user@ant.apache.org
Subject: Re: Requiring jar files in classpath (or $ANT_HOME/lib)
fortaskdefs


On Sun, 14 Mar 2004, Jacob Kjome <ho...@visi.com> wrote:

> Keep in mind that this is only true in the case of optional tasks
> that ship with Ant.

And then again only if you keep the corresponding .jar in
ANT_HOME/lib.

If you want <junit> to become independent from CLASSPATH and
ANT_HOME/lib, move ant-junit.jar out of ANT_HOME/lib and <taskdef>
junit using a <classpath> that points to the new location of
ant-junit.jar and junit.jar, for example.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Requiring jar files in classpath (or $ANT_HOME/lib) fortaskdefs

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 15 Mar 2004, Keith Hatton <kh...@axiomsystems.com> wrote:

> With respect, I think that misses the point.

Quite possible.

> The problem is, for JUnit and other Ant-optional tasks (i.e. those
> defined in some sense in ANT_HOME/lib), they won't "just work"
> without fiddling with either distro (i.e. move JUnit files -> Ant,
> or move Ant files -> JUnit).

They do if you are willing to modify CLASSPATH or use ~/.ant/lib
(thanks Peter for reminding us) or the -lib command line option.

> I understand the issues and I have no solution to offer

One solution would be to not ship the junit tasks with the Ant
distribution at all.  This would make quite a few users of Ant less
happy.

It wouldn't help you either.  You'd have to download the additional
jar into a know location (I'm simply assuming your developers need
<junit>) and adapt all those build files to point to it.  If you take
this additional step, you can as well modify the Ant installation to
not contain the jar.

With 1.6 and <antlib> we've introduced the infrastructure for a more
modular Ant.  It is very well possible that we'll start to split up
Ant into a core distribution and independent Ant libraries in the
future.  We'll still have to maintain distributions that contain all
the tasks from Ant 1.6.x for backwards compatibility reasons, but we
may have additional distribution forms that will make things easier.

We are aware of the problem, we are working towards solutions, but we
are strongly bound by our committments to backwards compatibility.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Requiring jar files in classpath (or $ANT_HOME/lib) fortaskdefs

Posted by Peter Reilly <pe...@corvil.com>.
Placeing the junit.jar file in ~/.ant/lib should also work.
Maybe a symbolic link?

Keith Hatton wrote:

>With respect, I think that misses the point.
>
>The problem is, for JUnit and other Ant-optional tasks (i.e. those defined in some sense in ANT_HOME/lib), they won't "just work" without fiddling with either distro (i.e. move JUnit files -> Ant, or move Ant files -> JUnit).
>
>  
>
>This makes it a pain, particularly for those attempting to herd cats into a standard build environment.
>  
>
I feel the pain! herding cats !
In my old company we did not upgrade to ant 1.3 as the auto finding of 
build.xml was removed, so people
had to do ant -find build.xml, instread of just ant.

Peter

>I understand the issues and I have no solution to offer (other than, perhaps, removing ant-*.jar from the standard Ant distribution so that these problems don't arise - but then you would open the door to a set of different problems), but please recognise that it *is* a problem in many environments. There are people who would (consciously or unconsciously) take every opportunity to rubbish free software, and this is an example of giving them an easy way of doing this.
>
>Keith
>
>
>-----Original Message-----
>From: Stefan Bodewig [mailto:bodewig@apache.org]
>Sent: 15 March 2004 09:03
>To: user@ant.apache.org
>Subject: Re: Requiring jar files in classpath (or $ANT_HOME/lib)
>fortaskdefs
>
>
>On Sun, 14 Mar 2004, Jacob Kjome <ho...@visi.com> wrote:
>
>  
>
>>Keep in mind that this is only true in the case of optional tasks
>>that ship with Ant.
>>    
>>
>
>And then again only if you keep the corresponding .jar in
>ANT_HOME/lib.
>
>If you want <junit> to become independent from CLASSPATH and
>ANT_HOME/lib, move ant-junit.jar out of ANT_HOME/lib and <taskdef>
>junit using a <classpath> that points to the new location of
>ant-junit.jar and junit.jar, for example.
>
>Stefan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org