You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Shackelford, John-Mason" <jo...@pearson.com> on 2004/06/02 19:48:43 UTC

null path references & javac

Another angle on the problem...

I pass the following classpath to the javac task, yet the
dependencies.classpath reference may or may not exist as the reference is
generated by another task which may not set it if no dependencies are
identified. 

<classpath id="component.classpath">
     <fileset dir="lib" includes="*.jar,*.zip" />
     <path refid="dependencies.classpath" />
</classpath>

When the reference isn't set, javac dies. We don't seem to have a concept of
a legitimately null path reference, so I have to resort to a conditional and
two different javac calls. Is there another way around this problem?


John-Mason Shackelford

Software Developer
Pearson Educational Measurement - eMeasurement Group

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
john-mason.shackelford@pearson.com
http://etest.ncspearson.com 

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

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


Re: null path references & javac

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 2 Jun 2004, John-Mason Shackelford
<jo...@pearson.com> wrote:

> Is there another way around this problem?

Use <path id="dependencies.classpath"/> at the top level and live
with the "Trying to override ..." message when your task sets it to
a different value.

Stefan

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


Re: null path references & javac

Posted by Matt Benson <gu...@yahoo.com>.
Depends on how dynamic you need the evaluation of
dependencies.classpath's presence to be... would it be
the same for each macro invocation?

-Matt


--- "Shackelford, John-Mason"
<jo...@pearson.com> wrote:
> Another angle on the problem...
> 
> I pass the following classpath to the javac task,
> yet the
> dependencies.classpath reference may or may not
> exist as the reference is
> generated by another task which may not set it if no
> dependencies are
> identified. 
> 
> <classpath id="component.classpath">
>      <fileset dir="lib" includes="*.jar,*.zip" />
>      <path refid="dependencies.classpath" />
> </classpath>
> 
> When the reference isn't set, javac dies. We don't
> seem to have a concept of
> a legitimately null path reference, so I have to
> resort to a conditional and
> two different javac calls. Is there another way
> around this problem?
> 
> 
> John-Mason Shackelford
> 
> Software Developer
> Pearson Educational Measurement - eMeasurement Group
> 
> 2510 North Dodge St.
> Iowa City, IA 52245
> ph. 319-354-9200x6214
> john-mason.shackelford@pearson.com
> http://etest.ncspearson.com 
> 
>
****************************************************************************
> 
> This email may contain confidential material. 
> If you were not an intended recipient, 
> Please notify the sender and delete all copies. 
> We may monitor email to and from our network. 
>
****************************************************************************
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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