You are viewing a plain text version of this content. The canonical link for it is here.
Posted to phoenix-dev@avalon.apache.org by Mauro Talevi <ma...@aquilonia.org> on 2002/10/26 19:15:17 UTC

ant.jar in distribution

Hi,

would it be possible to add the ant.jar to the lib directory in the src 
distribution?
The reason being that - while it all works fine when building from 
command line
(since ant.jar is automatically added to the local classpath in the ant 
script) -
it fails to compile when using an IDE-embedded ant executor 
(specifically I use Netbeans
but I suppose similar problems are encountered with other IDEs).

One could argue that any class that is imported in the java code
(eg org.apache.tools.ant.BuildException in 
org.apache.avalon.phoenix.tools.metagenerate.MetaGenerateTask)
should have the corresponding lib in the project lib dir and be included 
in the classpath.

This problem only occurs when defining ant tasks but still it would be 
very useful.
I've noticed that avalon-framework does have the ant.jar in lib while 
excalibur does not
(and again one has problems when building, eg AltRMI).

BTW,  phoenix-metagenerate.jar in Cornerstone/lib needs to be replaced 
with the latest version
with the name changed to MetaGenerateTask.

Cheers, Mauro
 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ant.jar in distribution

Posted by Mauro Talevi <ma...@aquilonia.org>.
Peter Donald wrote:

>I would prefer to not add it in. However what i will try to do over next 
>little bit is add in a warning if it is not on classpath. If you want to send 
>a patch for the build file it will get done quicker ;)
>  
>
I've tried to test for the availability of ant by say

<available property="ant.present" classname="org.apache.tools.ant.Task"/>

 but - oddly - the property ant.present is comes out always set to true, 
even when ant.jar is not in the classpath.
But if it's not the compilation fails.  So maybe it's a question of how 
the IDE deals internally with ant.
In any case, it's not a big issue.  If there are reasons not to add 
ant.jar to the libs, I'll simply copy ant.jar
to the lib dir and that solves it.

Cheers, Mauro




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ant.jar in distribution

Posted by Peter Donald <pe...@apache.org>.
On Sun, 27 Oct 2002 04:15, Mauro Talevi wrote:
> would it be possible to add the ant.jar to the lib directory in the src
> distribution?
> The reason being that - while it all works fine when building from
> command line
> (since ant.jar is automatically added to the local classpath in the ant
> script) -
> it fails to compile when using an IDE-embedded ant executor
> (specifically I use Netbeans
> but I suppose similar problems are encountered with other IDEs).

I would prefer to not add it in. However what i will try to do over next 
little bit is add in a warning if it is not on classpath. If you want to send 
a patch for the build file it will get done quicker ;)

-- 
Cheers,

Peter Donald
*-----------------------------------------------------*
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof."                   *
*              - John Kenneth Galbraith               *
*-----------------------------------------------------*


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>