Browse Source

Remove Class-Path from Ant's manifest and provide an ant-bootstrap.jar

for people who'd like to run Ant via java -jar.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273393 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
d303ffde27
4 changed files with 27 additions and 2 deletions
  1. +8
    -0
      WHATSNEW
  2. +14
    -1
      build.xml
  3. +0
    -1
      src/etc/manifest
  4. +5
    -0
      src/etc/manifest.bootstrap

+ 8
- 0
WHATSNEW View File

@@ -6,6 +6,14 @@ Changes that could break older environments:


* Targets cannot have the empty string as their name any longer. * Targets cannot have the empty string as their name any longer.


* ant.jar's manifest does no longer include a Class-Path entry, so it
is no longer possible to run Ant via "java -jar ant.jar" without
manually altering the CLASSPATH. Instead of that a file
ant-bootstrap.jar is included in the etc directory of the binary
distribution, copy this to the lib directory and use
"java -jar ant-bootstrap.jar" instead if you want to run Ant without
the wrapper script (not recommended).

Fixed bugs: Fixed bugs:
----------- -----------




+ 14
- 1
build.xml View File

@@ -22,6 +22,7 @@
<property name="name" value="ant"/> <property name="name" value="ant"/>
<property name="version" value="1.6alpha"/> <property name="version" value="1.6alpha"/>
<property name="manifest-version" value="1.5.9"/> <property name="manifest-version" value="1.5.9"/>
<property name="bootstrap.jar" value="ant-bootstrap.jar"/>


<property name="debug" value="true"/> <property name="debug" value="true"/>
<property name="chmod.fail" value="true"/> <property name="chmod.fail" value="true"/>
@@ -737,6 +738,13 @@
</manifest> </manifest>
</jar> </jar>


<jar destfile="${build.lib}/${bootstrap.jar}"
basedir="${build.classes}"
manifest="${manifest}.bootstrap">
<include name="${ant.package}/Main.class"/>
<metainf dir="${build.dir}" includes="LICENSE.txt"/>
</jar>

</target> </target>


<!-- Creates jar of test utility classes --> <!-- Creates jar of test utility classes -->
@@ -764,7 +772,9 @@
<mkdir dir="${dist.lib}"/> <mkdir dir="${dist.lib}"/>


<copy todir="${dist.lib}"> <copy todir="${dist.lib}">
<fileset dir="${build.lib}"/>
<fileset dir="${build.lib}">
<exclude name="${bootstrap.jar}"/>
</fileset>
</copy> </copy>


<copy todir="${dist.bin}"> <copy todir="${dist.bin}">
@@ -876,6 +886,9 @@
<include name="log.xsl"/> <include name="log.xsl"/>
<include name="tagdiff.xsl"/> <include name="tagdiff.xsl"/>
</fileset> </fileset>
<fileset dir="${build.lib}">
<include name="${bootstrap.jar}"/>
</fileset>
</copy> </copy>


</target> </target>


+ 0
- 1
src/etc/manifest View File

@@ -1,5 +1,4 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Main-Class: org.apache.tools.ant.Main Main-Class: org.apache.tools.ant.Main
Class-Path: xml-apis.jar xercesImpl.jar optional.jar xalan.jar





+ 5
- 0
src/etc/manifest.bootstrap View File

@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Main-Class: org.apache.tools.ant.Main
Class-Path: ant.jar xml-apis.jar xercesImpl.jar optional.jar xalan.jar



Loading…
Cancel
Save