You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Guy Rouillier <gu...@burntmail.com> on 2007/02/25 18:01:34 UTC

Java 1.5.0_10 won't allow SAR in classpath

One of our build.xml files includes a SAR (JBoss server archive) in the
classpath, along with a bunch of other JARs.  Up until Java JDK 1.5.0_04
at least, this was working fine.  I recently upgraded my workstation to
1.5.0_10, and now this no longer works.  I added verbose="on" to my
javac task, and very clearly, when using JDK 1.5.0_04, the line "search
path for class files" includes the SAR; when using JDK 1.5.0_10, the SAR
is not included.  All the other JARs are present; it just ignores the
SAR.  This is repeatable.

I tried upgrading to Ant 1.7.0 and to the newest available JDK 1.5.0_11,
and still I'm getting the same result.  I'm perplexed how the JDK
version can affect the classpath that Ant defines.  Unless Ant is using
some JDK helper class to build up the classpath one JAR at a time, and
that helper class is rejecting the SAR?  What options do I have?  Thanks.

-- 
Guy Rouillier

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


Versioning

Posted by Erica A Ramsey <ea...@wideopenwest.com>.
Hi, I have the following for my versioning format,
'major.minor.build.patch'. The build number always increments. However, if
the major number is changed then minor and patch reset to zero. How can I
automate this in ant. At a minimum if I can get the 'build' component of
version to automate that would be great.

Thanks,


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


Re: Java 1.5.0_10 won't allow SAR in classpath

Posted by Guy Rouillier <gu...@burntmail.com>.
Antoine Levy-Lambert wrote:
> Hello Guy,
> 
> from what you are writing, this issue comes from the JDK compiler, not 
> from ant.
> 
> So you should report it to the vendor of the JDK (Sun ?).
> 
> If you run ant -verbose, I suppose you can see the classpath used by ant 
> for compiling.
> ant itself will not reject any file from the classpath. The way ant is 
> written, files with any extension can go in the classpath.
> Now it is possible that JDK 1.5.0_10 rejects files with endings other 
> than jar or zip in compilation classpaths.

Antoine, thank you for the reply.  As I stated in my original post 
below, I have run with verbose on, and I do see the SAR present when 
using JDK 1.5.0_04 but missing when using JDK 1.5.0_10 and up.  Since my 
Ant version didn't change, I suspect you are right that this is a JDK 
issue.  How is Ant setting the classpath in the javac task?  Is it using 
some classpath builder class in Sun's provided classes, adding one 
specified file at a time?  Or does Ant concatenate all requested files 
into a single classpath string and tell javac "here, use this?"  I'm 
trying to figure out where the problem is occurring, so I can have a 
more intelligent conversation on the Sun Java mailing lists.  Thanks.


> Regards,
> 
> Antoine
> 
> 
> On Feb 25, 2007, at 12:01 PM, Guy Rouillier wrote:
> 
>> One of our build.xml files includes a SAR (JBoss server archive) in the
>> classpath, along with a bunch of other JARs.  Up until Java JDK 1.5.0_04
>> at least, this was working fine.  I recently upgraded my workstation to
>> 1.5.0_10, and now this no longer works.  I added verbose="on" to my
>> javac task, and very clearly, when using JDK 1.5.0_04, the line "search
>> path for class files" includes the SAR; when using JDK 1.5.0_10, the SAR
>> is not included.  All the other JARs are present; it just ignores the
>> SAR.  This is repeatable.
>>
>> I tried upgrading to Ant 1.7.0 and to the newest available JDK 1.5.0_11,
>> and still I'm getting the same result.  I'm perplexed how the JDK
>> version can affect the classpath that Ant defines.  Unless Ant is using
>> some JDK helper class to build up the classpath one JAR at a time, and
>> that helper class is rejecting the SAR?  What options do I have?  Thanks.
>>
>> --Guy Rouillier
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


-- 
Guy Rouillier

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


Re: Java 1.5.0_10 won't allow SAR in classpath

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Guy,

from what you are writing, this issue comes from the JDK compiler,  
not from ant.

So you should report it to the vendor of the JDK (Sun ?).

If you run ant -verbose, I suppose you can see the classpath used by  
ant for compiling.
ant itself will not reject any file from the classpath. The way ant  
is written, files with any extension can go in the classpath.
Now it is possible that JDK 1.5.0_10 rejects files with endings other  
than jar or zip in compilation classpaths.
Regards,

Antoine


On Feb 25, 2007, at 12:01 PM, Guy Rouillier wrote:

> One of our build.xml files includes a SAR (JBoss server archive) in  
> the
> classpath, along with a bunch of other JARs.  Up until Java JDK  
> 1.5.0_04
> at least, this was working fine.  I recently upgraded my  
> workstation to
> 1.5.0_10, and now this no longer works.  I added verbose="on" to my
> javac task, and very clearly, when using JDK 1.5.0_04, the line  
> "search
> path for class files" includes the SAR; when using JDK 1.5.0_10,  
> the SAR
> is not included.  All the other JARs are present; it just ignores the
> SAR.  This is repeatable.
>
> I tried upgrading to Ant 1.7.0 and to the newest available JDK  
> 1.5.0_11,
> and still I'm getting the same result.  I'm perplexed how the JDK
> version can affect the classpath that Ant defines.  Unless Ant is  
> using
> some JDK helper class to build up the classpath one JAR at a time, and
> that helper class is rejecting the SAR?  What options do I have?   
> Thanks.
>
> -- 
> Guy Rouillier
>


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