Summary: | Ant does not start in OS/2 | ||
---|---|---|---|
Product: | Ant | Reporter: | Zdenek Wagner <wagner> |
Component: | Core | Assignee: | Ant Notifications List <notifications> |
Status: | CLOSED FIXED | ||
Severity: | critical | CC: | notifications |
Priority: | P3 | ||
Version: | 1.6.1 | ||
Target Milestone: | 1.6.2 | ||
Hardware: | PC | ||
OS: | OS/2 | ||
Attachments: |
Diff file mentioned in the bug description
zipped patch files |
Description
Zdenek Wagner
2004-04-06 09:49:12 UTC
Created attachment 11150 [details]
Diff file mentioned in the bug description
Thank you Zdenek, actually, Ant 1.6 should only require ant-launcher.jar on the classpath and nothing else. Can you please verify whether restricting the script to the launcher jar without having ant.jar or optional.jar (which doesn't exist anymore anyway) works? Yes, it works, but it is necessary to use the org.apache.tools.ant.launch.Launcher entry point. Another possibility is to use java -jar $ANT_HOME\lib\ant-launcher.jar and in this case CLASSPATH may be empty. It is only better to include tools.jar. I tried Java 1.4.1 from Golden Code and Java 1.4.2 from Innotek, both can locate tools.jar according to JAVA_HOME. I am not sure about Java from IBM (it is not free). Anyway, it would be necessary to change ant.cmd. Should I rewrite it using the -jar option? Other *.cmd will not be generally needed but they provide some added value. -jar ant-launcher.jar is fine with me, if it works. And you are probably the only one who knows 8-) OK, -jar ant-launcher.jar works in Linux too. Can you guarantee that META-INF/MANIFEST.MF will always contain Main-Class: org.apache.tools.ant.launch.Launcher? I will now thoroughly examine that I do not spoil something and I will send updated scripts tomorrow. I am writing these comments because I think that it should be recorded somewhere. 1. Both Java 1.4.1 from Golden Code and 1.4.2 from Innotek contain tools.jar in $JAVA_HOME/lib but it is searched in $JAVA_HOME/jre/lib although the former is on CLASSPATH. i made a copy of tools.jar in the latter directory. 2. If Ant is launched via java -jar $ANT_HOME\lib\ant-launcher.jar, it is unable to invoke Saxon through JAXP. It complains that its TransformerFactoryImpl cannot be found. If $ANT_HOME\lib\ant-launcher.jar is on CLASSPATH and Ant is launched via its entry point org.apache.tools.ant.launch.Launcher, Saxon works fine. Created attachment 11225 [details]
zipped patch files
The zip file submitted on 04/14/04 08:05 contains patches to ant.cmd and antenv.cmd. Ant is invoked via entry point org.apache.tools.ant.launch.Launcher in ant-launcher.jar. I have tried my existing ant files. I have tested mainly OS/2 specific tasks <apply>, <exec> and setting properties from environment variables, running <java>, <javac> and <javadoc> and invoking Saxon from <xslt> by setting system property -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl I think I've applied all patches (they initially failed since parts of the files had the wrong line-ends) - could you please verify that I didn't mess up anything? The version, which is now on CVS, works fine. Anyway, Rexx in OS/2 strictly requires DOS line endings but your working copy from CVS should use line endings of your OS, CVS will handle it. Even zip/unzip converts line endings, thus if the binary distribution is zipped on Linux, it will unzip correctly in OS/2. OK, thank you for verifying. I know about the line-ends 8-) When I committed your original files I didn't notice they contained cariage-returns - and I work on Linux. So they were wrong in CVS. When we build a distribution of Ant, all .bat and .cmd files inside the bin directory explicitly get cariage-returns added and .sh files get the removed via <fixcrlf>. |