Skip to content
Commits on Source (5)
......@@ -2,8 +2,11 @@ Amongst other, the following people contributed to ant:
Adam Blinkinsop
Adam Bryzak
Adam Murdoch
Adam Retter
Adam Sotona
Adrian Nistor
Adrien Grand
Aleksandr Ishutin
Alex Rosen
Alexei Yudichev
......@@ -27,17 +30,20 @@ Anthony Wat
Antoine Baudoux
Antoine Levy-Lambert
Anton Mazkovoi
Arcadius Ahouansou
Arjan Veenstra
Arnaud Vandyck
Arnout J. Kuiper
Arun Jamwal
Aslak Hellesôy
Atsuhiko Yamanaka
Avik Sengupta
Balazs Fejes 2
barney2k7
Bart Vanhaute
Benjamin Burgess
Ben Galbraith
Ben Gertzfield
Benjamin Burgess
Benoit Moussaud
Bernd Dutkowski
Bernhard Rosenkraenzer
......@@ -49,6 +55,7 @@ Brian Felder
Brian Repko
Bruce Atherton
Cedomir Igaly
Charles Duffy
Charles Hudak
Charlie Hubbard
Chris Hegarty
......@@ -65,9 +72,11 @@ Clemens Hammacher
Clement OUDOT
Clive Brettingham-Moore
Conor MacNeill
Costin Manolache
Craeg Strong
Craig Cottingham
Craig R. McClanahan
Craig Pell
Craig Richardson
Craig Ryan
Craig Sandvik
......@@ -86,6 +95,7 @@ Daniel Trebbien
Danno Ferrin
Danny Yates
Dante Briones
Darrell DeBoer
Davanum Srinivas
Dave Brondsema
Dave Brosius
......@@ -106,10 +116,11 @@ Diane Holt
dIon Gillard
Dmitry A. Kuminov
Dominique Devienne
Donal Quinlan
Don Brown
Don Ferguson
Don Jeffery
Donal Quinlan
Donald Leslie
Drew Sudell
Earl Hood
Edison Guo
......@@ -117,6 +128,7 @@ Eduard Wirch
Edwin Woudt
Eli Tucker
Emmanuel Bourg
Eugène Adell
Eric Barboni
Eric Olsen
Eric Pugh
......@@ -129,9 +141,10 @@ Francesco Steccanella
Frank Harnack
Frank Somers
Frank Zeyda
Frantisek Kucera
Frederic Bothamy
František Kučera
Frédéric Bothamy
Frederic Lavigne
Gal Shachor
Gary S. Weaver
Gautam Guliani
Gene-Sung Chung
......@@ -162,9 +175,12 @@ Isaac Shabtay
Issa Gorissen
Ivan Ivanov
J Bleijenbergh
JC Mann
Jack J. Woehr
Jacobus Martinus Kruithof
Jaikiran Pai
James Duncan Davidson
James Todd
Jan Cumps
Jan Matèrne
Jan Mynarik
......@@ -176,8 +192,6 @@ Jason Yip
Jay Dickon Glanville
Jay Peck
Jay van der Meer
JC Mann
J D Glanville
Jean-Francois Brousseau
Jean-Louis Boudart
Jeff Gettle
......@@ -191,28 +205,32 @@ Jerome Lacoste
Jesse Glick
Jesse Stockall
Jim Allers
Joerg Wassmer
Jimmy Casey
Joel Tucci
Joerg Wassmer
Joey Richey
Johann Herunter
John Elion
John Sisson
Jon Dickinson
Jon S. Stevens
Jon Skeet
Jon S. Stevens
Jonathan K. Schneider
Jose Alberto Fernandez
Joseph Walton
Josh Lucas
Juerg Wanner
Julian Simpson
Justin Vallon
Justyna Horwat
Karl Jansen
Keiron Liddle
Keith Visco
Kevin Connor Arpe
Kevin Greiner
Kevin Jackson
Kevin Ross
Kevin Z Grey
Kevin Z. Grey
Kim Hansen
Kirk Wylie
Kristian Rosenvold
......@@ -230,11 +248,12 @@ Maarten Coene
Magesh Umasankar
Maneesh Sahu
Marcel Schutte
Marcus Börger
Marcus Börger
Mario Frasca
Mariusz Nowostawski
Mark A. Ziesemer
Mark DeLaFranier
Mark Harmer
Mark Hecker
Mark Niggemann
Mark R. Diggory
......@@ -258,6 +277,7 @@ Matt Wildig
Matthew Hawthorne
Matthew Inger
Matthew Kuperus Heun
Matthew Warman
Matthew Watson
Matthew Yanos
Matthias Bhend
......@@ -268,33 +288,34 @@ Michael J. Sikorsky
Michael McCallum
Michael Montuori
Michael Newcomb
Micheal Nygard
Michael Nygard
Michael Saunders
Miha
Mike Davis
Mike Roberts
Mike Williams
Miroslav Zaťko
mnowostawski
Mounir El Hajj
Nathan Beyer
Nick Chalko
Nick Fortescue
Nick Crossley
Nick Davis
Nick Fortescue
Nick King
Nick Pellow
Nicola Ken Barozzi
Nico Seessle
Nicola Ken Barozzi
Nicolas Lalevée
Nigel Magnay
Oliver Merkel
Oliver Rossmueller
Olivier Parent
Ondra Medek
Omer Shapira
Oystein Gisnas
Ondra Medek
Patrick Altaie
Patrick C. Beard
Patrick Chanezon
Patrick G. Heck (Gus Heck)
Patrick Gus Heck
Patrick Martin
Paul Austin
Paul Christmann
......@@ -303,7 +324,7 @@ Paul King
Paulo Gaspar
Pavan Bayyapu
Pavel Jisl
Pawel Zuzelski
Paweł Zuzelski
Peter B. West
Peter Donald
Peter Doornbosch
......@@ -316,13 +337,13 @@ Philip Hourihane
Phillip Wells
Pierre Delisle
Pierre Dittgen
riasol
R Handerson
Preston Bannister
Ralf Hergert
Rami Ojares
Randy Watler
Raphael Pierquin
Ray Waldin
Razzi Abuissa
Reinhard Pointner
Remie Bolte
René Krell
......@@ -330,8 +351,11 @@ Reudismam Rolim
Richard Evans
Richard Steele
Rick Beton
Rob Oxspring
Rob van Oostrum
Rob Riasol
Robbie Gibson
Robert Anderson
Robert H. Anderson
Robert Clark
Robert Flaherty
Robert Shaw
......@@ -341,8 +365,6 @@ Roberto Scaramuzzi
Robin Green
Robin Power
Robin Verduijn
Rob Oxspring
Rob van Oostrum
Rodrigo Schmidt
Roger Vaughn
Roman Ivashin
......@@ -358,18 +380,19 @@ Scott Johnson
Scott M. Stirling
Sean Egan
Sean P. Kane
Sebastian Kantha
Sebastien Arod
Shiraz Kanga
Sebastian Kantha
Simeon Fitch
Simon Law
Simone Bordet
Stefan Bodewig
Stefan Heimann
Stefano Mazzocchi
Stephan Strittmatter
Stephane Bailliez
stephan
Stephan Michels
Stephan Strittmatter
Stephane Bailliez
Stephen Chin
Stephen Goetze
Steve Cohen
......@@ -409,13 +432,16 @@ Ulrich Schmidt
Uwe Schindler
Valentino Miazzo
Victor Toni
Ville Skyttä
Vimil Saju
Vincent Legoll
Vincent Privat
Vitold Sedyshev
Vladislav Bauer
Volker Leidl
Waldek Herka
Wang Weijun
Wenjing Wang
Will Wang
William Bernardet
William Ferguson
......@@ -427,8 +453,10 @@ Wolfgang Glas
Wolfgang Werner
Xavier Hanin
Xavier Witdouck
Xia Li
Yohann Roussel
Yuji Yamano
Yves Martin
Zach Garner
Zdenek Wagner
Øystein Gisnås
Apache Ant
Copyright 1999-2018 The Apache Software Foundation
Copyright 1999-2019 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
......
Changes from Ant 1.10.5 TO Ant 1.10.6
=====================================
Changes that could break older environments:
-------------------------------------------
* image task no longer works on Java 9+ because internal classes
supporting Java Advanced Imaging are removed; imageio task (based on
ImageIO and AWT) is provided as a replacement.
* junitlauncher task has changed the class names and package names of
the task as well as some of the supporting classes of that task. If
any code depended on these class or package names, they will have to
be updated to reference these newly named classes. This however,
doesn't impact build scripts if their reference to junitlauncher task
was merely through the use of the <junitlauncher> element.
* ClearCase#runS has been augmented by a two arg-version and the
one-arg version will no longer be called. This may affect
subclasses that have overridden runS.
Fixed bugs:
-----------
* fetch.xml must retrieve runtime rather than compile dependencies for
mail task.
Bugzilla Report 62621
* Fixes an issue in junitreport task, which used to throw a
java.net.MalformedURLException when saxon was used on Windows OS.
Bugzilla Report 62594
* augment task now throws a BuildException (as noted in its manual)
instead of a IllegalStateException in the absence of the "id" attribute.
Bugzilla Report 62655
* org.apache.tools.zip.ZipOutputStream would sometimes potentially use
an incorrect compression level for a zip entry. This is now fixed.
Bugzilla Report 62686
* sync task, in some cases on case insensitive file systems, would consider
a file in a destination directory to be orphaned and would delete it.
This task has now been fixed to infer the case sensitivity of the filesystem
of the destination directory.
Bugzilla Report 62890
* Fixes a potential java.util.ConcurrentModificationException in
org.apache.tools.ant.Project#getCopyOfReferences.
Github Pull Request #81
* cccheckout would ignore an error of the "ls checkout" command even
if failOnError was set to false.
Bugzilla Report 63071
* The isreachable condition could in some cases return true even if the
actual address could potentially be unreachable. This is now fixed
and the resolved address is actually checked for reachability.
* Fixes an issue where scp transfer completion tracking wasn't being
triggered for 100% completion.
Github Pull Request #91
Other changes:
--------------
* generatekey task now supports SubjectAlternativeName during key
generation.
* the <modified> selector has a new built-in algorithm 'lastmodified'
which computes a value based upon the lastmodified time of the file.
* junitlauncher task now supports running tests in a forked JVM. More
details available in the junitlauncher task manual.
* signjar and verifyjar now support the -providerName, -providerClass
and -providerArg command line options of keytool via new attributes.
Bugzilla Report 65234
* signjar and verifyjar now supported nested <arg> elements for
command line arguments that are not supported explicitly by the
tasks via attributes.
* added several attributes to <javadoc> that support modules.
Bugzilla Report 62424
* properties used or set by BuildFileTask/BuildFileRule are documented
in MagicTestNames. A new magic property, ant.test.basedir.ignore, is
introduced for cases where Ant projects set up for test purposes
must ignore basedir set externally by test harness.
* a new CharSet type is provided for encoding or charset attributes in
tasks that must deal with different character encodings in files,
file names and other string resources.
* org.apache.tools.ant.AntClassLoader is now multi-release jar aware.
Starting Java 9, jar files can be packaged as multi-release jars,
AntClassLoader now recognizes such multi-release jar files while
loading resources at runtime in Java 9+ runtime environments.
Bugzilla Report 62952
* Added jmod and link tasks, to support jmod and jlink tools of JDK 9+.
Github Pull Request #80
* Jsch library dependency has now been upgraded to 0.1.55. Jsch is
the library behind the sshexec and scp Ant tasks.
Github Pull Request #84
* The "http" condition, now has a "readTimeout" attribute which can be
used to control the amount of time to wait for the read to complete.
Bugzilla Report 63193
* ftp task manual has been updated to mention that the remote listing of
files honours the followsymlinks attribute.
Bugzilla Report 63226
Changes from Ant 1.10.4 TO Ant 1.10.5
=====================================
......
......@@ -33,15 +33,16 @@
<property name="name" value="ant"/>
<!-- this is the directory corresponding to groupId of Ant in the Maven repository -->
<property name="groupid" value="org/apache/ant"/>
<property name="project.version" value="1.10.5"/>
<property name="project.version" value="1.10.6"/>
<!-- pom.version is used when doing a distribution and must match with what is checked in under src/etc/poms -->
<property name="pom.version" value="1.10.5"/>
<property name="manifest-version" value="1.10.5"/>
<property name="pom.version" value="1.10.6"/>
<property name="manifest-version" value="1.10.6"/>
<property name="bootstrap.jar" value="ant-bootstrap.jar"/>
<property name="ant.package" value="org/apache/tools/ant"/>
<property name="taskdefs.package" value="${ant.package}/taskdefs"/>
<property name="condition.package" value="${taskdefs.package}/condition"/>
<property name="modules.package" value="${taskdefs.package}/modules"/>
<property name="optional.package" value="${taskdefs.package}/optional"/>
<property name="type.package" value="${ant.package}/types"/>
<property name="optional.type.package" value="${type.package}/optional"/>
......@@ -84,13 +85,14 @@
<property name="build.junit.xml" location="${build.tests}/xml"/>
<property name="build.junit.tmpdir" location="${build.tests}/tmp"/>
<property name="build.junit.reports" location="${build.tests}/reports"/>
<property name="build.pkg.dir" value="${build.dir}/pkg"/>
<property name="antunit.xml" location="${build.dir}/antunit/xml"/>
<property name="antunit.tmpdir" location="${build.dir}/antunit/tmp"/>
<property name="antunit.reports" location="${build.dir}/antunit/reports"/>
<property name="antunit.loglevel" value="none"/>
<!-- the absolute path -->
<property name="build.classes.value" location="${build.classes}"/>
<property name="build.tests.value" location="${build.tests}"/>
<property name="build.pkg.dir" value="${build.dir}/pkg"/>
<!--
===================================================================
......@@ -177,6 +179,10 @@
===================================================================
-->
<selector id="needs.jdk9+">
<filename name="${modules.package}/"/>
</selector>
<!-- Kaffe has some JDK 1.5 features including java.lang.Readable,
but not all of them -->
<selector id="not.in.kaffe">
......@@ -209,17 +215,26 @@
</selector>
<selector id="needs.junitlauncher">
<or>
<filename name="${optional.package}/junitlauncher/"/>
<filename name="org/example/junitlauncher/Tracker.java"/>
</or>
</selector>
<selector id="needs.junit.engine.vintage">
<or>
<!-- we need JUnit vintage engine only in tests where we test the junitlauncher task -->
<filename name="${src.junit}/org/apache/tools/ant/taskdefs/optional/junitlauncher/**/*"/>
<filename name="${optional.package}/junitlauncher/**/JUnitLauncherTaskTest.java"/>
<filename name="org/example/junitlauncher/vintage/**/*"/>
</or>
</selector>
<selector id="needs.junit.engine.jupiter">
<or>
<!-- we need JUnit jupiter engine only in tests where we test the junitlauncher task -->
<filename name="${src.junit}/org/apache/tools/ant/taskdefs/optional/junitlauncher/**/*"/>
<filename name="${optional.package}/junitlauncher/**/JUnitLauncherTaskTest.java"/>
<filename name="org/example/junitlauncher/jupiter/**/*"/>
</or>
</selector>
<selector id="needs.apache-regexp">
......@@ -277,13 +292,21 @@
<filename name="${optional.package}/ANTLR*"/>
</selector>
<selector id="needs.imageio">
<or>
<filename name="${optional.package}/image/ImageIO*"/>
<filename name="${optional.type.package}/imageio/"/>
</or>
</selector>
<selector id="needs.jmf">
<filename name="${optional.package}/sound/"/>
</selector>
<selector id="needs.jai">
<or>
<filename name="${optional.package}/image/"/>
<filename name="${optional.package}/image/Image.*"/>
<filename name="${optional.package}/image/ImageTest.*"/>
<filename name="${optional.type.package}/image/"/>
</or>
</selector>
......@@ -329,6 +352,7 @@
<selector refid="needs.apache-xalan2"/>
<selector refid="needs.commons-logging"/>
<selector refid="needs.commons-net"/>
<selector refid="needs.imageio"/>
<selector refid="needs.jai"/>
<selector refid="needs.javamail"/>
<selector refid="needs.jdepend"/>
......@@ -377,6 +401,7 @@
<include name="${ant.package}/BuildFileTest*"/>
<include name="${ant.package}/BuildFileRule*"/>
<include name="${ant.package}/FileUtilities*"/>
<include name="${ant.package}/MagicTestNames*"/>
<include name="${regexp.package}/RegexpMatcherTest*"/>
<include name="${regexp.package}/RegexpTest*"/>
<include name="${optional.package}/AbstractXSLTLiaisonTest*"/>
......@@ -444,6 +469,9 @@
<available property="apache.oro.present"
classname="org.apache.oro.text.regex.Perl5Matcher"
classpathref="classpath" ignoresystemclasses="${ignoresystemclasses}"/>
<available property="imageio.present"
classname="javax.imageio.ImageIO"
classpathref="classpath"/>
<available property="jmf.present"
classname="javax.sound.sampled.Clip"
classpathref="classpath"/>
......@@ -577,6 +605,7 @@
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
excludes="${optional.package}/junitlauncher/confined/**"
target="${javac.target}"
source="${javac.source}"
optimize="${optimize}">
......@@ -585,6 +614,7 @@
<selector id="conditional-patterns">
<not>
<or>
<selector refid="needs.jdk9+" unless="jdk9+"/>
<selector refid="not.in.kaffe" if="kaffe"/>
<selector refid="needs.apache-resolver" unless="apache.resolver.present"/>
<selector refid="needs.junit" unless="junit.present"/> <!-- TODO should perhaps use -source 1.4? -->
......@@ -602,6 +632,7 @@
<selector refid="needs.netrexx" unless="netrexx.present"/>
<selector refid="needs.commons-net" unless="commons.net.present"/>
<selector refid="needs.antlr" unless="antlr.present"/>
<selector refid="needs.imageio" unless="imageio.present"/>
<selector refid="needs.jmf" unless="jmf.present"/>
<selector refid="needs.jai" unless="jai.present"/>
<selector refid="needs.jdepend" unless="jdepend.present"/>
......@@ -615,6 +646,33 @@
</selector>
</javac>
<!-- Builds and verifies that the classes belonging in the confined package of
junitlauncher task do not depend on classes they aren't meant to -->
<!-- first wipe out the "confined" package that might have been built already
due to the javac above -->
<delete dir="${build.classes}/${optional.package}/junitlauncher/confined/"/>
<javac srcdir="${java.dir}"
includeantruntime="false"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
includes="${optional.package}/junitlauncher/confined/**"
target="${javac.target}"
source="${javac.source}"
optimize="${optimize}">
<classpath>
<!-- A very limited classpath which only doesn't include optional libraries,
which the classes in confined package aren't meant to depend on -->
<fileset dir="${build.classes}">
<!-- exclude the org/apache/tools/ant/taskdefs/optional/junitlauncher package
from the classpath, since the confined package isn't meant to depend on
classes in this package -->
<exclude name="org/apache/tools/ant/taskdefs/optional/junitlauncher/*"/>
</fileset>
</classpath>
</javac>
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<include name="**/*.properties"/>
......@@ -770,6 +828,7 @@
<optional-jar dep="netrexx"/>
<optional-jar dep="commons-net"/>
<optional-jar dep="antlr"/>
<optional-jar dep="imageio"/>
<optional-jar dep="jmf"/>
<optional-jar dep="jai"/>
<optional-jar dep="swing"/>
......@@ -864,6 +923,7 @@
<optional-src-jar dep="netrexx"/>
<optional-src-jar dep="commons-net"/>
<optional-src-jar dep="antlr"/>
<optional-src-jar dep="imageio"/>
<optional-src-jar dep="jmf"/>
<optional-src-jar dep="jai"/>
<optional-src-jar dep="swing"/>
......@@ -892,7 +952,7 @@
Create the essential distribution that can run Apache Ant
===================================================================
-->
<target name="dist-lite" depends="jars,test-jar"
<target name="dist-lite" depends="jars,test-jar,-ant-dist-warn-jdk9+"
description="--> creates a minimum distribution to run Apache Ant">
<mkdir dir="${dist.dir}"/>
......@@ -961,24 +1021,9 @@
</copy>
</target>
<macrodef name="checksums-mvn" description="only md5 and sha1 are needed for the maven directory structure">
<element name="resources" implicit="true"/>
<sequential>
<checksum algorithm="md5">
<resources/>
</checksum>
<checksum algorithm="sha1">
<resources/>
</checksum>
</sequential>
</macrodef>
<macrodef name="checksums">
<element name="resources" implicit="true"/>
<sequential>
<checksum algorithm="sha1">
<resources/>
</checksum>
<checksum fileext=".sha512" algorithm="sha-512">
<resources/>
</checksum>
......@@ -1314,12 +1359,6 @@
<include name="NOTICE.txt"/>
</metainf>
</jar>
<checksums-mvn>
<fileset dir="${java-repository.dir}" includes="**/*${project.version}.jar"/>
<fileset dir="${java-repository.dir}" includes="**/*${project.version}-sources.jar"/>
<fileset dir="${java-repository.dir}" includes="**/*${project.version}-javadoc.jar"/>
<fileset dir="${java-repository.dir}" includes="**/*${project.version}.pom"/>
</checksums-mvn>
<zip destfile="${dist.base.manual}/${dist.name}-manual.zip">
<zipfileset dir="${dist.name}/manual" prefix="${dist.name}"/>
......@@ -1342,12 +1381,10 @@
<checksums>
<fileset dir="${dist.base.binaries}/">
<exclude name="**/*.asc"/>
<exclude name="**/*.sha1"/>
<exclude name="**/*.sha512"/>
</fileset>
<fileset dir="${dist.base.manual}/">
<exclude name="**/*.asc"/>
<exclude name="**/*.sha1"/>
<exclude name="**/*.sha512"/>
</fileset>
</checksums>
......@@ -1392,7 +1429,6 @@
<checksums>
<fileset dir="${dist.base.source}/">
<exclude name="**/*.asc"/>
<exclude name="**/*.sha1"/>
<exclude name="**/*.sha512"/>
</fileset>
</checksums>
......@@ -1467,9 +1503,6 @@
<patternset refid="useful.tests"/>
</srcfiles>
</uptodate>
<condition property="javadoc.jaf.module" value="--add-modules java.activation" else="">
<isset property="jdk9+"/>
</condition>
</target>
<target name="javadocs" depends="check-javadoc"
......@@ -1502,7 +1535,6 @@
<group title="Optional Types" packages="org.apache.tools.ant.types.optional*"/>
<group title="Ant Utilities" packages="org.apache.tools.ant.util*"/>
<classpath refid="tests-classpath"/>
<arg line="${javadoc.jaf.module}"/>
</javadoc>
</target>
......@@ -1680,7 +1712,7 @@ ${antunit.reports}
errorproperty="junit.failed"
filtertrace="${junit.filtertrace}">
<sysproperty key="ant.home" value="${ant.home}"/>
<sysproperty key="build.tests" file="${build.tests}"/>
<sysproperty key="build.classes.value" value="${build.classes.value}"/>
<sysproperty key="build.tests.value" value="${build.tests.value}"/>
<sysproperty key="offline" value="${offline}"/>
<sysproperty key="tests-classpath.value"
......@@ -1817,6 +1849,7 @@ ${antunit.reports}
<!-- abstract classes, not testcases -->
<exclude name="${taskdefs.package}/TaskdefsTest.java"/>
<exclude name="${ant.package}/BuildFileTest.java"/>
<exclude name="${ant.package}/MagicTestNames.java"/>
<exclude name="${regexp.package}/RegexpMatcherTest.java"/>
<exclude name="${regexp.package}/RegexpTest.java"/>
<exclude name="${optional.package}/AbstractXSLTLiaisonTest.java"/>
......@@ -1827,6 +1860,7 @@ ${antunit.reports}
<exclude name="org/example/"/>
<exclude name="${taskdefs.package}/TaskdefTest*Task.java"/>
<exclude name="${optional.package}/junit/TestFormatter.java"/>
<exclude name="${ant.package}/TestHelper.java"/>
<!-- JUnit 5 / junitlauncher tests that aren't meant to run by junit task -->
<exclude name="${optional.package}/junitlauncher/"/>
......@@ -1888,6 +1922,10 @@ ${antunit.reports}
<exclude name="${optional.package}/JspcTest.java"
unless="jasper.present"/>
<!-- needs JavaMail -->
<exclude name="${taskdefs.package}/email/EmailTaskTest.java"
unless="javamail.complete"/>
<!-- These tests only passes if testcases and Ant classes have
been loaded by the same classloader - will throw
IllegalAccessExceptions otherwise. -->
......@@ -1966,6 +2004,10 @@ ${antunit.reports}
<echo>AntUnit tests must be run with ${bootstrap.dir} (or ${dist.dir}), not ${ant.home}. Try './build.sh antunit-tests' for example.</echo>
</target>
<target name="-ant-dist-warn-jdk9+" unless="jdk9+">
<echo>Java 9+ features won't be available in the distribution</echo>
</target>
<target name="antunit-tests" depends="build,test-init,-antunit-warn-location" if="run.antunit"
description="--> run the antunit tests">
<condition property="antunit.includes" value="${antunit.testcase}"
......
......@@ -38,6 +38,10 @@
<first>Adam</first>
<last>Bryzak</last>
</name>
<name>
<first>Adam</first>
<last>Murdoch</last>
</name>
<name>
<first>Adam</first>
<last>Retter</last>
......@@ -50,6 +54,10 @@
<first>Adrian</first>
<last>Nistor</last>
</name>
<name>
<first>Adrien</first>
<last>Grand</last>
</name>
<name>
<first>Aleksandr</first>
<last>Ishutin</last>
......@@ -82,6 +90,10 @@
<first>Andreas</first>
<last>Ames</last>
</name>
<name>
<first>Andreas</first>
<last>Mross</last>
</name>
<name>
<first>Andrew</first>
<last>Eisenberg</last>
......@@ -135,6 +147,10 @@
<first>Anton</first>
<last>Mazkovoi</last>
</name>
<name>
<first>Arcadius</first>
<last>Ahouansou</last>
</name>
<name>
<first>Arjan</first>
<last>Veenstra</last>
......@@ -148,9 +164,13 @@
<middle>J.</middle>
<last>Kuiper</last>
</name>
<name>
<first>Arun</first>
<last>Jamwal</last>
</name>
<name>
<first>Aslak</first>
<last>Helles&#244;y</last>
<last>Hellesôy</last>
</name>
<name>
<first>Atsuhiko</first>
......@@ -164,6 +184,9 @@
<first>Balazs</first>
<last>Fejes 2</last>
</name>
<name>
<last>barney2k7</last>
</name>
<name>
<first>Bart</first>
<last>Vanhaute</last>
......@@ -221,6 +244,14 @@
<first>Bruce</first>
<last>Atherton</last>
</name>
<name>
<first>Cedomir</first>
<last>Igaly</last>
</name>
<name>
<first>Charles</first>
<last>Duffy</last>
</name>
<name>
<first>Charles</first>
<last>Hudak</last>
......@@ -286,6 +317,10 @@
<first>Conor</first>
<last>MacNeill</last>
</name>
<name>
<first>Costin</first>
<last>Manolache</last>
</name>
<name>
<first>Craeg</first>
<last>Strong</last>
......@@ -294,6 +329,10 @@
<first>Craig</first>
<last>Cottingham</last>
</name>
<name>
<first>Craig</first>
<last>Pell</last>
</name>
<name>
<first>Craig</first>
<middle>R.</middle>
......@@ -301,11 +340,11 @@
</name>
<name>
<first>Craig</first>
<last>Ryan</last>
<last>Richardson</last>
</name>
<name>
<first>Craig</first>
<last>Richardson</last>
<last>Ryan</last>
</name>
<name>
<first>Craig</first>
......@@ -371,6 +410,10 @@
<first>Dante</first>
<last>Briones</last>
</name>
<name>
<first>Darrell</first>
<last>DeBoer</last>
</name>
<name>
<first>Davanum</first>
<last>Srinivas</last>
......@@ -385,7 +428,8 @@
</name>
<name>
<first>David</first>
<last>A.</last>
<middle>A.</middle>
<last>Herman</last>
</name>
<name>
<first>David</first>
......@@ -393,7 +437,7 @@
</name>
<name>
<first>David</first>
<last>G&#228;rtner</last>
<last>Gärtner</last>
</name>
<name>
<first>David</first>
......@@ -455,13 +499,9 @@
<first>Dominique</first>
<last>Devienne</last>
</name>
<name>
<first>Donal</first>
<last>Quinlan</last>
</name>
<name>
<first>Don</first>
<last>Bnamen</last>
<last>Brown</last>
</name>
<name>
<first>Don</first>
......@@ -471,6 +511,14 @@
<first>Don</first>
<last>Jeffery</last>
</name>
<name>
<first>Donal</first>
<last>Quinlan</last>
</name>
<name>
<first>Donald</first>
<last>Leslie</last>
</name>
<name>
<first>Drew</first>
<last>Sudell</last>
......@@ -499,6 +547,10 @@
<first>Emmanuel</first>
<last>Bourg</last>
</name>
<name>
<first>Eugène</first>
<last>Adell</last>
</name>
<name>
<first>Eric</first>
<last>Olsen</last>
......@@ -555,6 +607,10 @@
<first>Frederic</first>
<last>Lavigne</last>
</name>
<name>
<first>Gal</first>
<last>Shachor</last>
</name>
<name>
<first>Gary</first>
<middle>S.</middle>
......@@ -676,11 +732,20 @@
<first>J</first>
<last>Bleijenbergh</last>
</name>
<name>
<first>JC</first>
<last>Mann</last>
</name>
<name>
<first>Jack</first>
<middle>J.</middle>
<last>Woehr</last>
</name>
<name>
<first>Jacobus</first>
<middle>Martinus</middle>
<last>Kruithof</last>
</name>
<name>
<first>Jaikiran</first>
<last>Pai</last>
......@@ -690,13 +755,17 @@
<middle>Duncan</middle>
<last>Davidson</last>
</name>
<name>
<first>James</first>
<last>Todd</last>
</name>
<name>
<first>Jan</first>
<last>Cumps</last>
</name>
<name>
<first>Jan</first>
<last>Mat&#232;rne</last>
<last>Matèrne</last>
</name>
<name>
<first>Jan</first>
......@@ -735,18 +804,14 @@
<first>Jay</first>
<last>van der Meer</last>
</name>
<name>
<first>JC</first>
<last>Mann</last>
</name>
<name>
<first>J</first>
<last>D</last>
</name>
<name>
<first>Jean-Francois</first>
<last>Brousseau</last>
</name>
<name>
<first>Jean-Louis</first>
<last>Boudart</last>
</name>
<name>
<first>Jeff</first>
<last>Gettle</last>
......@@ -792,13 +857,17 @@
<last>Allers</last>
</name>
<name>
<first>Joerg</first>
<last>Wassmer</last>
<first>Jimmy</first>
<last>Casey</last>
</name>
<name>
<first>Joel</first>
<last>Tucci</last>
</name>
<name>
<first>Joerg</first>
<last>Wassmer</last>
</name>
<name>
<first>Joey</first>
<last>Richey</last>
......@@ -828,19 +897,24 @@
<middle>S.</middle>
<last>Stevens</last>
</name>
<name>
<first>Jonathan</first>
<middle>K.</middle>
<last>Schneider</last>
</name>
<name>
<first>Jose</first>
<middle>Alberto</middle>
<last>Fernandez</last>
</name>
<name>
<first>Josh</first>
<last>Lucas</last>
</name>
<name>
<first>Joseph</first>
<last>Walton</last>
</name>
<name>
<first>Josh</first>
<last>Lucas</last>
</name>
<name>
<first>Juerg</first>
<last>Wanner</last>
......@@ -853,6 +927,14 @@
<first>Justin</first>
<last>Vallon</last>
</name>
<name>
<first>Justyna</first>
<last>Horwat</last>
</name>
<name>
<first>Karl</first>
<last>Jansen</last>
</name>
<name>
<first>Keiron</first>
<last>Liddle</last>
......@@ -880,7 +962,7 @@
</name>
<name>
<first>Kevin</first>
<middle>Z</middle>
<middle>Z.</middle>
<last>Grey</last>
</name>
<name>
......@@ -934,6 +1016,10 @@
<first>Ludovic</first>
<last>Claude</last>
</name>
<name>
<first>Maarten</first>
<last>Coene</last>
</name>
<name>
<first>Magesh</first>
<last>Umasankar</last>
......@@ -960,20 +1046,20 @@
</name>
<name>
<first>Mark</first>
<last>DeLaFranier</last>
<middle>A.</middle>
<last>Ziesemer</last>
</name>
<name>
<first>Mark</first>
<last>Hecker</last>
<last>DeLaFranier</last>
</name>
<name>
<first>Mark</first>
<last>Salter</last>
<last>Harmer</last>
</name>
<name>
<first>Mark</first>
<middle>R.</middle>
<last>Diggory</last>
<last>Hecker</last>
</name>
<name>
<first>Mark</first>
......@@ -981,8 +1067,12 @@
</name>
<name>
<first>Mark</first>
<middle>A.</middle>
<last>Ziesemer</last>
<middle>R.</middle>
<last>Diggory</last>
</name>
<name>
<first>Mark</first>
<last>Salter</last>
</name>
<name>
<first>Markus</first>
......@@ -1008,6 +1098,14 @@
<first>Martin</first>
<last>von Gagern</last>
</name>
<name>
<first>Mathieu</first>
<last>Champlon</last>
</name>
<name>
<first>Mathieu</first>
<last>Peltier</last>
</name>
<name>
<first>Matt</first>
<last>Albrecht</last>
......@@ -1040,18 +1138,6 @@
<first>Matt</first>
<last>Wildig</last>
</name>
<name>
<first>Mathieu</first>
<last>Champlon</last>
</name>
<name>
<first>Mathieu</first>
<last>Peltier</last>
</name>
<name>
<first>Matthias</first>
<last>Bhend</last>
</name>
<name>
<first>Matthew</first>
<last>Hawthorne</last>
......@@ -1065,6 +1151,10 @@
<middle>Kuperus</middle>
<last>Heun</last>
</name>
<name>
<first>Matthew</first>
<last>Warman</last>
</name>
<name>
<first>Matthew</first>
<last>Watson</last>
......@@ -1073,6 +1163,10 @@
<first>Matthew</first>
<last>Yanos</last>
</name>
<name>
<first>Matthias</first>
<last>Bhend</last>
</name>
<name>
<first>Michael</first>
<last>Bayne</last>
......@@ -1094,6 +1188,10 @@
<first>Michael</first>
<last>McCallum</last>
</name>
<name>
<first>Michael</first>
<last>Montuori</last>
</name>
<name>
<first>Michael</first>
<last>Newcomb</last>
......@@ -1125,9 +1223,6 @@
<first>Miroslav</first>
<last>Zaťko</last>
</name>
<name>
<last>mnowostawski</last>
</name>
<name>
<first>Mounir</first>
<last>El Hajj</last>
......@@ -1144,22 +1239,35 @@
<first>Nick</first>
<last>Crossley</last>
</name>
<name>
<first>Nick</first>
<last>Davis</last>
</name>
<name>
<first>Nick</first>
<last>Fortescue</last>
</name>
<name>
<first>Nick</first>
<last>Pellow</last>
<last>King</last>
</name>
<name>
<first>Nicola</first>
<last>Ken</last>
<first>Nick</first>
<last>Pellow</last>
</name>
<name>
<first>Nico</first>
<last>Seessle</last>
</name>
<name>
<first>Nicola</first>
<middle>Ken</middle>
<last>Barozzi</last>
</name>
<name>
<first>Nicolas</first>
<last>Lalevée</last>
</name>
<name>
<first>Nigel</first>
<last>Magnay</last>
......@@ -1184,17 +1292,14 @@
<first>Ondra</first>
<last>Medek</last>
</name>
<name>
<first>&#216;ystein</first>
<last>Gisn&#229;s</last>
</name>
<name>
<first>Patrick</first>
<last>Altaie</last>
</name>
<name>
<first>Patrick</first>
<last>C.</last>
<middle>C.</middle>
<last>Beard</last>
</name>
<name>
<first>Patrick</first>
......@@ -1202,7 +1307,12 @@
</name>
<name>
<first>Patrick</first>
<last>Gus</last>
<middle>Gus</middle>
<last>Heck</last>
</name>
<name>
<first>Patrick</first>
<last>Martin</last>
</name>
<name>
<first>Paul</first>
......@@ -1286,8 +1396,8 @@
<last>Dittgen</last>
</name>
<name>
<first>R</first>
<last>Handerson</last>
<first>Preston</first>
<last>Bannister</last>
</name>
<name>
<first>Ralf</first>
......@@ -1309,6 +1419,10 @@
<first>Ray</first>
<last>Waldin</last>
</name>
<name>
<first>Razzi</first>
<last>Abuissa</last>
</name>
<name>
<first>Reinhard</first>
<last>Pointner</last>
......@@ -1337,12 +1451,25 @@
<first>Rick</first>
<last>Beton</last>
</name>
<name>
<first>Rob</first>
<last>Riasol</last>
</name>
<name>
<first>Rob</first>
<last>Oxspring</last>
</name>
<name>
<first>Rob</first>
<last>van Oostrum</last>
</name>
<name>
<first>Robbie</first>
<last>Gibson</last>
</name>
<name>
<first>Robert</first>
<middle>H.</middle>
<last>Anderson</last>
</name>
<name>
......@@ -1381,14 +1508,6 @@
<first>Robin</first>
<last>Verduijn</last>
</name>
<name>
<first>Rob</first>
<last>Oxspring</last>
</name>
<name>
<first>Rob</first>
<last>van Oostrum</last>
</name>
<name>
<first>Rodrigo</first>
<last>Schmidt</last>
......@@ -1451,6 +1570,10 @@
<middle>P.</middle>
<last>Kane</last>
</name>
<name>
<first>Sebastian</first>
<last>Kantha</last>
</name>
<name>
<first>Sebastien</first>
<last>Arod</last>
......@@ -1460,8 +1583,8 @@
<last>Kanga</last>
</name>
<name>
<first>Sebastian</first>
<last>Kantha</last>
<first>Simeon</first>
<last>Fitch</last>
</name>
<name>
<first>Simon</first>
......@@ -1483,6 +1606,13 @@
<first>Stefano</first>
<last>Mazzocchi</last>
</name>
<name>
<last>stephan</last>
</name>
<name>
<first>Stephan</first>
<last>Michels</last>
</name>
<name>
<first>Stephan</first>
<last>Strittmatter</last>
......@@ -1492,15 +1622,12 @@
<last>Bailliez</last>
</name>
<name>
<last>stephan</last>
</name>
<name>
<first>Stephan</first>
<last>Michels</last>
<first>Stephen</first>
<last>Chin</last>
</name>
<name>
<first>Stephen</first>
<last>Chin</last>
<last>Goetze</last>
</name>
<name>
<first>Steve</first>
......@@ -1583,6 +1710,10 @@
<first>Tim</first>
<last>Fennell</last>
</name>
<name>
<first>Tim</first>
<last>Stephenson</last>
</name>
<name>
<first>Tim</first>
<last>Whittington</last>
......@@ -1597,12 +1728,12 @@
<last>Endres</last>
</name>
<name>
<first>Tim</first>
<last>Stephenson</last>
<first>Tom</first>
<last>Ball</last>
</name>
<name>
<first>Tom</first>
<last>Ball</last>
<last>Brus</last>
</name>
<name>
<first>Tom</first>
......@@ -1630,7 +1761,7 @@
</name>
<name>
<first>Trejkaz</first>
<last>Xaoz</last>
<last>Xaoza</last>
</name>
<name>
<first>Ulrich</first>
......@@ -1648,6 +1779,14 @@
<first>Victor</first>
<last>Toni</last>
</name>
<name>
<first>Ville</first>
<last>Skyttä</last>
</name>
<name>
<first>Vimil</first>
<last>Saju</last>
</name>
<name>
<first>Vincent</first>
<last>Legoll</last>
......@@ -1656,22 +1795,30 @@
<first>Vincent</first>
<last>Privat</last>
</name>
<name>
<first>Vimil</first>
<last>Saju</last>
</name>
<name>
<first>Vitold</first>
<last>Sedyshev</last>
</name>
<name>
<first>Vladislav</first>
<last>Bauer</last>
</name>
<name>
<first>Volker</first>
<last>Leidl</last>
</name>
<name>
<first>Waldek</first>
<last>Herka</last>
</name>
<name>
<first>Wang</first>
<last>Weijun</last>
</name>
<name>
<first>Wenjing</first>
<last>Wang</last>
</name>
<name>
<first>Will</first>
<last>Wang</last>
......@@ -1716,6 +1863,10 @@
<first>Xavier</first>
<last>Witdouck</last>
</name>
<name>
<first>Xia</first>
<last>Li</last>
</name>
<name>
<first>Yohann</first>
<last>Roussel</last>
......@@ -1737,7 +1888,7 @@
<last>Wagner</last>
</name>
<name>
<first/>
<last>riasol</last>
<first>Øystein</first>
<last>Gisnås</last>
</name>
</contributors>
ant (1.10.6-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
* Standards-Version updated to 4.4.0
-- Emmanuel Bourg <ebourg@apache.org> Fri, 12 Jul 2019 00:58:58 +0200
ant (1.10.5-3) unstable; urgency=medium
[ Matthias Klose ]
......
......@@ -25,7 +25,7 @@ Build-Depends: antlr,
libxml-commons-resolver1.1-java (>= 1.2-7~),
libxz-java,
maven-repo-helper (>> 1.0)
Standards-Version: 4.3.0
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/ant.git
Vcs-Browser: https://salsa.debian.org/java-team/ant
Homepage: http://ant.apache.org
......
......@@ -5,7 +5,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -1699,6 +1699,16 @@
@@ -1811,6 +1811,16 @@
*/
@Override
public void execute() throws BuildException {
......
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -213,7 +213,7 @@
@@ -214,7 +214,7 @@
*/
public String getSource() {
return source != null
......@@ -12,7 +12,7 @@ Forwarded: no
}
/**
@@ -792,7 +792,7 @@
@@ -793,7 +793,7 @@
public String getTarget() {
return targetAttribute != null
? targetAttribute
......@@ -21,7 +21,7 @@ Forwarded: no
}
/**
@@ -1120,7 +1120,7 @@
@@ -1121,7 +1121,7 @@
public void execute() throws BuildException {
checkParameters();
resetFileLists();
......@@ -30,7 +30,7 @@ Forwarded: no
// scan source directories and dest directory to build up
// compile list
if (hasPath(src)) {
@@ -1713,4 +1713,11 @@
@@ -1714,4 +1714,11 @@
0x00, 0x00, 0x00, 0x02, 0x00, 0x04
};
......@@ -44,7 +44,7 @@ Forwarded: no
}
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2160,7 +2160,7 @@
@@ -2273,7 +2273,7 @@
: getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE);
if (sourceArg != null) {
toExecute.createArgument().setValue("-source");
......
Description: Don't add the java.activation module when building the Javadoc, this breaks the build, probably because JAF is already on the classpath
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/build.xml
+++ b/build.xml
@@ -1502,7 +1502,6 @@
<group title="Optional Types" packages="org.apache.tools.ant.types.optional*"/>
<group title="Ant Utilities" packages="org.apache.tools.ant.util*"/>
<classpath refid="tests-classpath"/>
- <arg line="${javadoc.jaf.module}"/>
</javadoc>
</target>
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2163,6 +2163,11 @@
@@ -2276,6 +2276,11 @@
toExecute.createArgument().setValue(LanguageLevel.adjust(sourceArg, "javadoc -source", this));
}
......
Description: Enable multi release jar support
Merge 2 upstream patches to enable support for multi release jar files to ant.
This new feature functionally only modifies behavior when jar file is a
'multi-release jarfile' containing different byte-code targeting different
Java versions at runtime.
The following 2 upstream patches are merged in this fix:
From: Jaikiran Pai <jaikiran@apache.org>
Date: Wed, 5 Dec 2018 12:56:14 +0000 (+0530)
Subject: bz-62952 Make AntClassLoader multi-release jar aware when it deals
with java.util...
X-Git-Url: https://gitbox.apache.org/repos/asf?p=ant.git;a=commitdiff_plain;h=593aff2d2ea52a025cfe7da32155216719029a7d;hp=ac46ff190ed158bcb5ec5764b583ef82f1ecaa80
bz-62952 Make AntClassLoader multi-release jar aware when it deals with
java.util.jar.JarFile
From: Jaikiran Pai <jaikiran@apache.org>
Date: Wed, 5 Dec 2018 14:06:53 +0000 (+0530)
Subject: bz-62952 Fix the jar-test.xml#testMultiReleaseJar antunit test case
X-Git-Url: https://gitbox.apache.org/repos/asf?p=ant.git;a=commitdiff_plain;h=69269adced56238dc80297b9ae881442cd56259c
bz-62952 Fix the jar-test.xml#testMultiReleaseJar antunit test case
Origin: upstream, https://gitbox.apache.org/repos/asf?p=ant.git;a=commit;h=593aff2d2ea52a025cfe7da32155216719029a7d, https://gitbox.apache.org/repos/asf?p=ant.git;a=commit;h=69269adced56238dc80297b9ae881442cd56259c
Bug-Ubuntu: https://launchpad.net/bugs/1808383
Forwarded: not-needed
Applied-Upstream: https://gitbox.apache.org/repos/asf?p=ant.git;a=commit;h=593aff2d2ea52a025cfe7da32155216719029a7d, https://gitbox.apache.org/repos/asf?p=ant.git;a=commit;h=69269adced56238dc80297b9ae881442cd56259c
Reviewed-by: Tiago Sturmer Daitx <tiago.daitx@ubuntu.com>
Last-Update: 2019-03-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---
--- a/src/etc/testcases/core/antclassloader.xml
+++ b/src/etc/testcases/core/antclassloader.xml
@@ -73,4 +73,52 @@ public class Foo {}
<target name="createNonJar">
<touch file="${tmp.dir}/foo.jar"/>
</target>
+
+ <target name="testMRJar" description="tests AntClassLoader support for multi-release jars.
+ see https://bz.apache.org/bugzilla/show_bug.cgi?id=62952">
+ <mkdir dir="${tmp.dir}/mrjar/org/example"/>
+ <mkdir dir="${tmp.dir}/mrjar-9/org/example"/>
+ <!-- default version of the class -->
+ <echo file="${tmp.dir}/mrjar/org/example/MRJarTest.java"><![CDATA[
+ package org.example;
+ public class MRJarTest {
+ public static void main(String[] args) {
+ System.out.println("mrjar test result = default");
+ }
+ }
+ ]]>
+ </echo>
+ <!-- Java runtime version 9 of the class -->
+ <echo file="${tmp.dir}/mrjar-9/org/example/MRJarTest.java"><![CDATA[
+ package org.example;
+ public class MRJarTest {
+ public static void main(String[] args) {
+ System.out.println("mrjar test result = 9");
+ }
+ }
+ ]]>
+ </echo>
+ <!-- compile these classes -->
+ <javac srcdir="${tmp.dir}/mrjar" destdir="${tmp.dir}/mrjar"/>
+ <javac srcdir="${tmp.dir}/mrjar-9" destdir="${tmp.dir}/mrjar-9"/>
+
+ <!-- create multi-release jar file -->
+ <jar destfile="${tmp.dir}/mrjar.jar">
+ <manifest>
+ <attribute name="Multi-Release" value="true"/>
+ </manifest>
+ <!-- default classes -->
+ <fileset dir="${tmp.dir}/mrjar" includes="**/*.class"/>
+ <!-- Java 9 specific classes -->
+ <zipfileset prefix="META-INF/versions/9/" dir="${tmp.dir}/mrjar-9" includes="**/*.class"/>
+ </jar>
+
+ <!-- now run the class present in the multi-release jar -->
+ <java classname="org.example.MRJarTest" failonerror="true">
+ <classpath>
+ <pathelement location="${tmp.dir}/mrjar.jar"/>
+ </classpath>
+ </java>
+
+ </target>
</project>
--- a/src/main/org/apache/tools/ant/AntClassLoader.java
+++ b/src/main/org/apache/tools/ant/AntClassLoader.java
@@ -45,12 +45,14 @@ import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import java.util.zip.ZipFile;
import org.apache.tools.ant.launch.Locator;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.JavaEnvUtils;
import org.apache.tools.ant.util.LoaderUtils;
+import org.apache.tools.ant.util.ReflectUtil;
import org.apache.tools.ant.util.StringUtils;
import org.apache.tools.ant.util.VectorSet;
import org.apache.tools.zip.ZipLong;
@@ -76,8 +78,29 @@ public class AntClassLoader extends Clas
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+ private static final boolean IS_ATLEAST_JAVA9 = JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9);
+ // constructs needed to create (via reflection) a java.util.jar.JarFile instance when Java runtime version is >= 9
+ private static final Class[] MR_JARFILE_CTOR_ARGS;
+ private static final Object MR_JARFILE_CTOR_RUNTIME_VERSION_VAL;
+
static {
registerAsParallelCapable();
+ if (IS_ATLEAST_JAVA9) {
+ Class[] ctorArgs = null;
+ Object runtimeVersionVal = null;
+ try {
+ final Class<?> runtimeVersionClass = Class.forName("java.lang.Runtime$Version");
+ ctorArgs = new Class[] {File.class, boolean.class, int.class, runtimeVersionClass};
+ runtimeVersionVal = Runtime.class.getDeclaredMethod("version").invoke(null);
+ } catch (Exception e) {
+ // ignore - we consider this as multi-release jar unsupported
+ }
+ MR_JARFILE_CTOR_ARGS = ctorArgs;
+ MR_JARFILE_CTOR_RUNTIME_VERSION_VAL = runtimeVersionVal;
+ } else {
+ MR_JARFILE_CTOR_ARGS = null;
+ MR_JARFILE_CTOR_RUNTIME_VERSION_VAL = null;
+ }
}
/**
@@ -498,7 +521,7 @@ public class AntClassLoader extends Clas
+ pathComponent.lastModified() + "-" + pathComponent.length();
String classpath = pathMap.get(absPathPlusTimeAndLength);
if (classpath == null) {
- try (JarFile jarFile = new JarFile(pathComponent)) {
+ try (JarFile jarFile = newJarFile(pathComponent)) {
final Manifest manifest = jarFile.getManifest();
if (manifest == null) {
return;
@@ -783,7 +806,7 @@ public class AntClassLoader extends Clas
} else {
if (jarFile == null) {
if (file.exists()) {
- jarFile = new JarFile(file);
+ jarFile = newJarFile(file);
jarFiles.put(file, jarFile);
} else {
return null;
@@ -1003,7 +1026,7 @@ public class AntClassLoader extends Clas
log(msg, Project.MSG_WARN);
return null;
}
- jarFile = new JarFile(file);
+ jarFile = newJarFile(file);
jarFiles.put(file, jarFile);
} else {
return null;
@@ -1572,4 +1595,19 @@ public class AntClassLoader extends Clas
}
}
+ /**
+ *
+ * @param file The file representing the jar
+ * @return Returns a {@link JarFile} instance, which is constructed based upon the Java runtime version.
+ * Depending on the Java runtime version, the returned instance may or may not be {@code multi-release}
+ * aware (a feature introduced in Java 9)
+ * @throws IOException
+ */
+ private static JarFile newJarFile(final File file) throws IOException {
+ if (!IS_ATLEAST_JAVA9 || MR_JARFILE_CTOR_ARGS == null || MR_JARFILE_CTOR_RUNTIME_VERSION_VAL == null) {
+ return new JarFile(file);
+ }
+ return ReflectUtil.newInstance(JarFile.class, MR_JARFILE_CTOR_ARGS,
+ new Object[] {file, true, ZipFile.OPEN_READ, MR_JARFILE_CTOR_RUNTIME_VERSION_VAL});
+ }
}
--- a/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java
+++ b/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java
@@ -33,7 +33,9 @@ import java.util.Enumeration;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.JavaEnvUtils;
import org.junit.After;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -233,6 +235,26 @@ public class AntClassLoaderTest {
assertFalse(acl.getResources("META-INF/MANIFEST.MF").hasMoreElements());
}
+ /**
+ * Tests that {@link AntClassLoader} supports multi-release jar files while dealing with
+ * runtime resources in Java 9+ runtime environments.
+ *
+ * @see <a href="bz-62952">https://bz.apache.org/bugzilla/show_bug.cgi?id=62952</a>
+ */
+ @Test
+ public void testMultiReleaseJar() {
+ buildRule.executeTarget("testMRJar");
+ final boolean atleastJava9 = JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9);
+ final String targetOutput = buildRule.getOutput();
+ Assert.assertNotNull("Multi-release jar test did not generate any output", targetOutput);
+ if (atleastJava9) {
+ Assert.assertTrue("Unexpected output from multi-release jar test for Java runtime >= 9",
+ targetOutput.contains("mrjar test result = 9"));
+ } else {
+ Assert.assertTrue("Unexpected output from multi-release jar test", targetOutput.contains("mrjar test result = default"));
+ }
+ }
+
private static class EmptyLoader extends ClassLoader {
public URL getResource(String n) {
return null;
--- a/src/tests/antunit/taskdefs/jar-test.xml
+++ b/src/tests/antunit/taskdefs/jar-test.xml
@@ -314,9 +314,22 @@ Main-Class: MyClass
</loadresource>
<au:assertTrue>
<or>
- <equals arg1="Java8" arg2="${valueFrom8}"/>
- <!-- maybe we are running on an early version of Java9 -->
- <equals arg1="Java9" arg2="${valueFrom8}"/>
+ <and>
+ <not>
+ <javaversion atleast="9"/>
+ </not>
+ <equals arg1="Java8" arg2="${valueFrom8}"/>
+ </and>
+
+ <and>
+ <javaversion exactly="9"/>
+ <equals arg1="Java9" arg2="${valueFrom8}"/>
+ </and>
+
+ <and>
+ <javaversion atleast="10"/>
+ <equals arg1="Java10" arg2="${valueFrom8}"/>
+ </and>
</or>
</au:assertTrue>
</target>
......@@ -3,5 +3,3 @@
0011-reproducible-propertyfile-task.patch
0013-auto-adjust-target.patch
0015-javadoc-ignore-source-errors.patch
0014-remove-java-activation-module.patch
0016-multirelease-jar-support.patch
......@@ -305,7 +305,6 @@ Set -Ddest=LOCATION on the command line
description="load BeanShell support"
depends="bsf">
<f2 project="org.beanshell" archive="bsh"/>
<f2 project="org.beanshell" archive="bsh-core"/>
</target>
<target name="jython"
......@@ -333,7 +332,11 @@ Set -Ddest=LOCATION on the command line
<target name="javamail"
description="load Java Mail"
depends="init">
<f2 project="javax.mail" archive="javax.mail-api"/>
<!-- We only need this one dependency as per
the project doc https://javaee.github.io/javamail/#Download_JavaMail_Release
This alone should bring in all necessary dependencies (including the API
jars and the activation jars -->
<f2 project="com.sun.mail" archive="javax.mail"/>
</target>
<target name="jspc"
......
......@@ -35,8 +35,7 @@ ant-antunit.version=1.4
antlr.version=2.7.7
bcel.version=6.2
bsf.version=2.4.0
bsh.version=2.0b4
bsh-core.version=${bsh.version}
bsh.version=2.0b5
commons-net.version=3.6
commons-logging.version=1.1
commons-logging-api.version=${commons-logging.version}
......@@ -48,7 +47,7 @@ jakarta-regexp.version=1.4
# Later versions of Tomcat provide a jspc task
jasper-compiler.version=4.1.36
jasper-runtime.version=${jasper-compiler.version}
javax.mail-api.version=1.6.1
javax.mail.version=1.6.2
jdepend.version=2.9.1
jruby.version=1.6.8
junit.version=4.12
......@@ -58,7 +57,7 @@ junit-platform-launcher.version=1.2.0
junit-vintage-engine.version=5.2.0
# Only used for internal tests in Ant project
junit-jupiter-engine.version=5.2.0
jsch.version=0.1.54
jsch.version=0.1.55
jython.version=2.7.0
# log4j 1.2.15 requires JMS and a few other Sun jars that are not in the m2 repo
log4j.version=1.2.14
......
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
......@@ -14,9 +15,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>Apache AntWork Plugin for the Jext Java Text Editor</title>
</head>
......
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
......@@ -14,10 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>Borland EJB Tasks</title>
</head>
......
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
......@@ -14,10 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>BorlandGenerateClient Task</title>
</head>
......
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
......@@ -14,10 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>Ant Task</title>
</head>
......
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
......@@ -14,10 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>AntCall Task</title>
</head>
......