[EMAIL PROTECTED] wrote:

stevel      2005/05/13 14:57:23

@@ -424,6 +413,15 @@
throw new BuildException(
"Niceness value is out of the range 1-10");
}
+ } else if (arg.equals("-cp") || arg.equals("-lib")) {
+ //catch script/ant mismatch with a meaningful message
+ //we could ignore it, but there are likely to be other
+ //version problems, so we stamp down on the configuration now
+ String msg = "Ant's Main method is being handed "
+ + "an option "+arg+" that is only for the launcher class."
+ + "\nThis can be caused by a version mismatch between "
+ + "the ant script/.bat file and Ant itself.";
+ throw new BuildException(msg);
} else if (arg.startsWith("-")) {
// we don't have any more args to recognize!
String msg = "Unknown argument: " + arg;




I do not think that this will happen. The problem was that there was a mismatch
between the script (1.6.3) and the ant jars (1.6.2) which includes compatible versions
of the Main(ant.jar) and Launcher(ant-launcher.jar) classes.


The problem was that some linux distributions are including ant via the jpackage project.
This uses a file - /etc/ant.conf, which describes where ant is located. To cooperate with the
jpackage project, ant's ant script reads this file. The ant.conf file overwrites the environment variable
ANT_HOME.
----- snippet from the ant.conf file ----
if $no_config ; then
# Disable RPM layout
rpm_mode=false
else
# Use RPM layout
rpm_mode=true


 # ANT_HOME for rpm layout
 ANT_HOME=/usr/share/ant
fi
--------------------------------------------

This ANT_HOME is then used in the rest of the 1.6.3 script - causing it to use the locator.jar from ant.1.6.2.


I think that the jpackage people have updated the script to check if ANT_HOME is set already before setting it,
but this is not in the ant.1.6.2 package release.



The ant script could check if ANT_HOME has been modified by the call to ant.conf and warn the user.


Peter


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to