ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject Available Task and Classpath
Date Tue, 18 Dec 2001 09:07:31 GMT
Hi,

sorry, but I have to raise this issue again:

When you are building any target with ant which tests for optional
components,
you sooner or later face the problem where to search for the availability of
the components.
Usually the Available task is the thing to use. You can give this task a
classpath to search for and you can set the build.sysclasspath property to
either ignore the user classpath or not etc.
But, the Available task always finds the standard JDK classes (packages
java.
and javax.).
Now, looking at this behaviour, it seems alright - but unfortunately it can
cause problems:
For example, imagine an application which has optional LDAP components
requiring
the JNDI packages. You have your Available test in your build file and build
the application with JDK 1.3. As the Available task finds always the JNDI
package
from the JDK your optional LDAP component is included in the final build
application, but - of course - not the JNDI package.
And now the problem: you run your build application with JDK 1.2 which is
usually totally legal. But JDK 1.2 has not the JNDI package included...

Now, you can say, the build application must always run on a similar system
where it was build on, so it's not legal to run it on JDK 1.2. Hm, this is
not a good idea as for example a lot of the downloadable distributions (and
the nightly builds) from apache are build using JDK 1.3 - so everyone
downloading
a binary distribution needs JDK 1.3 (if such an optional component exists).
We have exactly this problem with Apache Cocoon!

So, I hope you can see from description, where my problems with the
Available
task are. I entered this months ago as a bug
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3989), but it was
rejected.

I think, the build.sysclasspath property is not correctly implemented for
the
Available task - or it has the wrong name as not the system classpath is
ignored
but the user classpath.

So, what do you think? Is this a self-made problem, or exists there another
solution?

Cheers
Carsten


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message