Upgrade the internal Ant to version 1.10.5 (IDEA-199738)

This commit is contained in:
Leonid Bushuev
2018-10-04 01:49:26 +03:00
parent d964d7a638
commit 5c0005c5ec
92 changed files with 11424 additions and 333 deletions

View File

@@ -1,12 +1,12 @@
<component name="libraryTable">
<library name="Ant">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/ant/lib"/>
<root url="file://$PROJECT_DIR$/lib/ant/lib" />
</CLASSES>
<JAVADOC/>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/ant/src/bundled_ant_src.zip!/bundled_ant_src/main"/>
<root url="jar://$PROJECT_DIR$/lib/ant/src.zip!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/ant/lib" recursive="false"/>
<jarDirectory url="file://$PROJECT_DIR$/lib/ant/lib" recursive="false" />
</library>
</component>

434
lib/ant/CONTRIBUTORS Normal file
View File

@@ -0,0 +1,434 @@
Amongst other, the following people contributed to ant:
Adam Blinkinsop
Adam Bryzak
Adam Sotona
Adrian Nistor
Aleksandr Ishutin
Alex Rosen
Alexei Yudichev
Alexey Panchenko
Alexey Solofnenko
Alfred Theorin
Alison Winters
Andreas Ames
Andreas Mross
Andrew Eisenberg
Andrew Everitt
Andrew Stevens
Andrey Urazov
André-John Mas
Andy Wood
Anil K. Vijendran
Anli Shundi
Anthony Goubard
Anthony Green
Anthony Wat
Antoine Baudoux
Antoine Levy-Lambert
Anton Mazkovoi
Arjan Veenstra
Arnaud Vandyck
Arnout J. Kuiper
Aslak Hellesôy
Atsuhiko Yamanaka
Avik Sengupta
Balazs Fejes 2
Bart Vanhaute
Benjamin Burgess
Ben Galbraith
Ben Gertzfield
Benoit Moussaud
Bernd Dutkowski
Bernhard Rosenkraenzer
Brad Clark
Brant Langer Gurganus
Brian Curnow
Brian Deitte
Brian Felder
Brian Repko
Bruce Atherton
Cedomir Igaly
Charles Hudak
Charlie Hubbard
Chris Hegarty
Chris Povirk
Christian Knorr
Christian Schmidt
Christoph Gysin
Christoph Wilhelms
Christophe Labouisse
Christopher A. Longo
Christopher Charlier
Clark Archer
Clemens Hammacher
Clement OUDOT
Clive Brettingham-Moore
Conor MacNeill
Craeg Strong
Craig Cottingham
Craig R. McClanahan
Craig Richardson
Craig Ryan
Craig Sandvik
Curt Arnold
Curtis White
Cyrille Morvan
D'Arcy Smith
Dale Anson
Dale Sherwood
Dan Armbrust
Dana Dahlstrom
Daniel Henrique
Daniel Ribagnac
Daniel Spilker
Daniel Trebbien
Danno Ferrin
Danny Yates
Dante Briones
Davanum Srinivas
Dave Brondsema
Dave Brosius
David A. Herman
David Crossley
David Gärtner
David S. Johnson
David Kavanagh
David LeRoy
David Leal
David M. Lloyd
David Maclean
David Rees
Denis Hennessy
Derek Slager
Devon C. Miller
Diane Holt
dIon Gillard
Dmitry A. Kuminov
Dominique Devienne
Donal Quinlan
Don Brown
Don Ferguson
Don Jeffery
Drew Sudell
Earl Hood
Edison Guo
Eduard Wirch
Edwin Woudt
Eli Tucker
Emmanuel Bourg
Eric Barboni
Eric Olsen
Eric Pugh
Erik Costlow
Erik Hatcher
Erik Langenbach
Erik Meade
Ernst de Haan
Francesco Steccanella
Frank Harnack
Frank Somers
Frank Zeyda
Frantisek Kucera
Frederic Bothamy
Frederic Lavigne
Gary S. Weaver
Gautam Guliani
Gene-Sung Chung
George Bateman
Georges-Etienne Legendre
Gero Vermaas
Gerrit Riessen
Gilbert Rebhan
Gilles Querret
Gilles Scokart
Glenn McAllister
Glenn Twiggs
Greg Nelson
Greg Roodt
Greg Schueler
Grégoire Vatry
Günther Kögel
Harish Prabandham
Haroon Rafique
Hiroaki Nakamura
Holger Engels
Holger Joest
Ignacio Coloma
Ingenonsya France
Ingmar Stein
Irene Rusman
Isaac Shabtay
Issa Gorissen
Ivan Ivanov
J Bleijenbergh
Jack J. Woehr
Jaikiran Pai
James Duncan Davidson
Jan Cumps
Jan Matèrne
Jan Mynarik
Jan Stolze
Jason Hunter
Jason Pettiss
Jason Salter
Jason Yip
Jay Dickon Glanville
Jay Peck
Jay van der Meer
JC Mann
J D Glanville
Jean-Francois Brousseau
Jean-Louis Boudart
Jeff Gettle
Jeff Martin
Jeff Tulley
Jeff Turner
Jeffrey Adamson
Jene Jasper
Jeremy Mawson
Jerome Lacoste
Jesse Glick
Jesse Stockall
Jim Allers
Joerg Wassmer
Joel Tucci
Joey Richey
Johann Herunter
John Elion
John Sisson
Jon Dickinson
Jon S. Stevens
Jon Skeet
Jose Alberto Fernandez
Joseph Walton
Josh Lucas
Juerg Wanner
Julian Simpson
Justin Vallon
Keiron Liddle
Keith Visco
Kevin Connor Arpe
Kevin Greiner
Kevin Jackson
Kevin Ross
Kevin Z Grey
Kim Hansen
Kirk Wylie
Kristian Rosenvold
Kui Liu
Kyle Adams
Lajos Veres
Larry Shatzer
Larry Streepy
Les Hughes
Levi Cook
lucas
Lucas Werkmeister
Ludovic Claude
Maarten Coene
Magesh Umasankar
Maneesh Sahu
Marcel Schutte
Marcus B&ouml;rger
Mario Frasca
Mariusz Nowostawski
Mark A. Ziesemer
Mark DeLaFranier
Mark Hecker
Mark Niggemann
Mark R. Diggory
Mark Salter
Markus Kahl
Martijn Kruithof
Martin Landers
Martin Poeschl
Martin van den Bemt
Martin von Gagern
Mathieu Champlon
Mathieu Peltier
Matt Albrecht
Matt Benson
Matt Bishop
Matt Foemmel
Matt Grosso
Matt Humphrey
Matt Small
Matt Wildig
Matthew Hawthorne
Matthew Inger
Matthew Kuperus Heun
Matthew Watson
Matthew Yanos
Matthias Bhend
Michael Bayne
Michael Clarke
Michael Davey
Michael J. Sikorsky
Michael McCallum
Michael Montuori
Michael Newcomb
Micheal 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 Pellow
Nicola Ken Barozzi
Nico Seessle
Nigel Magnay
Oliver Merkel
Oliver Rossmueller
Olivier Parent
Ondra Medek
Omer Shapira
Oystein Gisnas
Patrick Altaie
Patrick C. Beard
Patrick Chanezon
Patrick G. Heck (Gus Heck)
Patrick Martin
Paul Austin
Paul Christmann
Paul Galbraith
Paul King
Paulo Gaspar
Pavan Bayyapu
Pavel Jisl
Pawel Zuzelski
Peter B. West
Peter Donald
Peter Doornbosch
Peter Hulst
Peter Janes
Peter Reilly
Petr Kureš
Phil Hanna
Philip Hourihane
Phillip Wells
Pierre Delisle
Pierre Dittgen
riasol
R Handerson
Ralf Hergert
Rami Ojares
Randy Watler
Raphael Pierquin
Ray Waldin
Reinhard Pointner
Remie Bolte
René Krell
Reudismam Rolim
Richard Evans
Richard Steele
Rick Beton
Robbie Gibson
Robert Anderson
Robert Clark
Robert Flaherty
Robert Shaw
Robert Streich
Robert Watkins
Roberto Scaramuzzi
Robin Green
Robin Power
Robin Verduijn
Rob Oxspring
Rob van Oostrum
Rodrigo Schmidt
Roger Vaughn
Roman Ivashin
Roman Savko
Ronen Mashal
Russell Gold
Ryan Bennitt
Sam Ruby
Sandra Metz
Scott Carlson
Scott Ellsworth
Scott Johnson
Scott M. Stirling
Sean Egan
Sean P. Kane
Sebastien Arod
Shiraz Kanga
Sebastian Kantha
Simon Law
Simone Bordet
Stefan Bodewig
Stefan Heimann
Stefano Mazzocchi
Stephan Strittmatter
Stephane Bailliez
stephan
Stephan Michels
Stephen Chin
Stephen Goetze
Steve Cohen
Steve Langley
Steve Loughran
Steve Morin
Steve Wadsworth
Steven E. Newton
Sudheer Chigurupati
Takashi Okamoto
TAMURA Kent
Taoufik Romdhane
Tariq Master
Thomas Aglassinger
Thomas Butz
Thomas Christen
Thomas Christensen
Thomas Haas
Thomas Quas
Tim Boemker
Tim Drury
Tim Fennell
Tim Stephenson
Tim Whittington
Timoteo Ohara
Timothy Gerard Endres
Tom Ball
Tom Brus
Tom Cunningham
Tom Dimock
Tom Eugelink
Tom May
Tomasz Bech
Tomáš Zezula
Trejkaz Xaoza
Ulrich Schmidt
Uwe Schindler
Valentino Miazzo
Victor Toni
Vimil Saju
Vincent Legoll
Vincent Privat
Vitold Sedyshev
Volker Leidl
Waldek Herka
Wang Weijun
Will Wang
William Bernardet
William Ferguson
William Webber
Wolf Siberski
Wolfgang Baer
Wolfgang Frech
Wolfgang Glas
Wolfgang Werner
Xavier Hanin
Xavier Witdouck
Yohann Roussel
Yuji Yamano
Yves Martin
Zach Garner
Zdenek Wagner

View File

@@ -1,2 +1,2 @@
For installation instructions see the manual in the docs subdirectory
or online at <http://ant.apache.org/manual/index.html>.
For installation instructions see the manual by opening manual/index.html
or see it online at <http://ant.apache.org/manual/index.html>.

View File

@@ -1495,3 +1495,62 @@ G3GJoHIALPVs33ykG7MKFFqpbJHHc95hcOzs8eVh2/jD53CXILjbhKEGGbejFlx+
RHkiOuu1l6jXCeh/J1R6YidjsDjKWlRkHifMmw==
=j+uw
-----END PGP PUBLIC KEY BLOCK-----
pub rsa4096 2018-06-13 [SC] [expires: 2022-06-13]
8DA70C00DF7AF1B0D2F9DC74DDBCC1270A29D081
uid [ultimate] jaikiran@apache <jaikiran@apache.org>
sig 3 DDBCC1270A29D081 2018-06-13 jaikiran@apache <jaikiran@apache.org>
sub rsa4096 2018-06-13 [E] [expires: 2022-06-13]
sig DDBCC1270A29D081 2018-06-13 jaikiran@apache <jaikiran@apache.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFsgsskBEACy8rzosITgdGsfQijFhWkRo/iyXv7LdSD5FezMu6C4UosENKlP
85y0XBsE3Z7K50uxVizyjXTetK+EIS684c6pU1t0vbWyvJzSgHeqf0GEaqiUNWTo
9Jk6jAaeYeNu+6/TVUCYrb+zmQqmJPZq5W4FvTnpRed/t4zBPLlFPe2+QNaNRE03
JqCrnmih0hrxVcM5jyynXSozuS50DcMuiOCZL3zPBW6mDGaXH6+yUfFVrReuCB//
D0u0sCSiV5TvhSh2+8lLUG5tuvOKfg2SlRFtF9JQIPsm/qV/fK2muW2mc+Ti0n+k
3gzxtr4eC5YvShJCe0DoxR9q/CItx6vRg8h+G4HhL1P5N+Tj4N0zfcUs/2vaJbm3
LrjK8o+coNa8dgiIN6AbdcS8szIRYUG2MJzUI1mggYw/i4YcnNhrKTPZtdbKRfmK
AIq1d1eEt/rJ97ypTzeYO6jq6Jkmnb3rWzmx9XA9Mo4J8X7587E6zkiD3FoFrSaM
o20q+byMuXC8kKIEiDOa7UFQUh1ku8RDAmjXlWwqw3+RtrRt0TXoHRNWRoShiBee
TjkQ3ZW7FlSk1hs80qeVCcSJ6lf1texmZzonAJCyibEWdzvceGvs2/PenetsnP/5
nDlJuEs4jhoYuU57HjXfcSSOqmLAFAym7pL0Yd+KNhvxjBF/SoJ1wgoLBQARAQAB
tCVqYWlraXJhbkBhcGFjaGUgPGphaWtpcmFuQGFwYWNoZS5vcmc+iQJUBBMBCAA+
FiEEjacMAN968bDS+dx03bzBJwop0IEFAlsgsskCGwMFCQeGH4AFCwkIBwIGFQoJ
CAsCBBYCAwECHgECF4AACgkQ3bzBJwop0IECdA/+OTyhXffGztoNrvIYF9tamNCV
T5dzzY9qOos6pHShgX6O3xic33UMt3O6ec6RSILEmc1IJlthmxVTsu0XJ57+eDYJ
zzA1JYD1RkLcS6+aqmopfoPdpzOftshQ8yEXPKQl69IhKn0B6yQc98d3EHYQtun0
t9fwQA3LGoMWH7RIsFycMKi6+Z6TOaLdkpNs9ipuIGkouNdqdVTIgQGBmHvQwgO6
r6mYSiApE7lQ8+s/7J1hJuA3GzV9gQ8DK9g0hr1E1EmbG9enxn2XT2V4H4hXFJfr
CEYjMTsa6EYEOnA4BqwMmBHx2LOClydhPOJbc3/09XzAUdwUsxbVgByZ1kUvfo76
eLYC2/YXtyVluLyYwUyGLXlBWMChHM+AIVyTg7HNVvFF99cwdpBgpDjUFx60+ftY
fFxXJJbu4lq1ULKOyqqoDwaebp2C/gZ3bIVmqZ2GFUCoeIuBh94pRhENK/O0FBua
Bp3mYaGrpDVMglu1p9lxz0H2uuAUgXu1hRM7GWbq5TWUKcD/zb6NH7DO82cRqCJE
n//p3Wqc4tAZt8B3bQGQWRGQ3iOU8RxmDvyneuVyqWR0dIkb7ByjtD7SKRkSomNq
6o6mw+Kuj+6M0dwhZdmPB8O/RiLLJDKL83DZN6P+yEBIsc73qS3QPnCuvENPfxgm
0JI2d63wnXbW4bkOzN+5Ag0EWyCyyQEQAKwUmKfCA62QiJwk+NAHfVmrXgk6lpSC
ExCjC8RvWgt7R6upLfOdKFLRLNR4aybLF9/XcW5rsmfF7eTonsA3vnIsfLHtLazL
MoUVgj9jZjlvjcxWX5F8pXL7BH0x443GZvZNIdIt9SCOPJUKVZfc9VCcvw564E8q
IbFJBSCPVMTibPNLZw5N3Iv5WfdqRsIg70jURqiSOMDnn1VpXid0X5iU0ruqlqi5
giud8p/1isBtVQyiGmpDs2UoPaUFUxmIWJ/srxNx5fAyOKd2WsWALn0nJuaIlL0A
25zTzLU3WpTkHFvimWH8ogonXtjLQfh70GJ4NjBhIAjtQFVptGGNLleDVTD1AIMN
imc7GxFGf4EUAgK8fcDrF6WtLtK3QnA3hSXHMgzpLo1NmirWy1cfvwNwnse7KCX/
+axld1slAgnNZl3UADj2irI/j1bl2ntsriE0Q1N+n729G3zlkg0Twj/IjPxo1PW6
5A7b62PDhGtajdwfPKM43dHgJ8ZYGL/zaKt4elhsVQPBZcUOl6YV9fg9c5jqAJhU
IbhfuyQW+/EGYnR4/2G3wbIKiYPsuBiQw4nN1IdGTpfoW9DymYpIcrLJZkt2/4qe
SxXxHa1/qF7CjOoNV5Vza17+mLRS2NN7/Hz+lcyIuYf7dzLJ/U/DIyK4QBcCqm72
9ISsCgK2Hbd3ABEBAAGJAjwEGAEIACYWIQSNpwwA33rxsNL53HTdvMEnCinQgQUC
WyCyyQIbDAUJB4YfgAAKCRDdvMEnCinQgTfiD/9C1jk1iTIeh8KZDQOEkwVXEjIw
Dng0fxSq3ICNjyH58JGysFbOTIyVoqaDPcIWM5/IAbF4DpuXZvaVu0nufpVKupIi
Lq2jRwXC14G+gC/BEsB7KVqzoon/zhKlHEo6sVtumckFVtjXG9SfAqf3q8rSGwaS
WzSOrg7gyKznizOPBWs1kkJ9h+Paj48uP9EUYIr+s8BVlXSRr4TDF++/drPhZ2sz
uphS8fr1fedfaBD++xMmpGEGE2KenTk3oBjvBHusHsSdoqw8IaZ0Bhc4vajuqHWE
4nacvBGaIp5so5kA+MFf69l/G/+cWj+PP7xuGPy9TkqKXi8CNdQE1iEa6UKhBYaA
xpRzaugIDDhSnu9WcoaGixpGVCYojRW1+OloumEhl7WkiWfq3db0q/+uoSJEPqmQ
M7+i7Z6/vPI/3Nu+NvFsDygQA97FF1Tl1ISxfWgd3YplQjuTLLyawxWT7fHKCrx4
TjUM+JPy+xGDd/RP/YksSfM9dsV/EEruN02qBDoUADpuhw0vkKC/OAxuLkWDm0h9
S3vUQ3zGioMMYLvbNe8rAP3VC5fJ7H80spv/z05JfO7c4hutU8D0ykQ0ZNuWdL79
2HEociC3YdVmiCxmvsabeeOeMVU0WgFSHjPRqfPnoSu4ytA0Szn2dsZ64VV01BHm
3rZzxBZRMmQz3CJrMw==
=vLW3
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -1,5 +1,5 @@
Apache Ant
Copyright 1999-2014 The Apache Software Foundation
Copyright 1999-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

View File

@@ -1,5 +1,5 @@
A N T
Apache Ant
What is it?
@@ -52,10 +52,13 @@
Documentation
-------------
Documentation is available in HTML format, in the docs/ directory.
Documentation is available in HTML format, in the manual/ directory.
For information about building and installing Ant, see
docs/manual/index.html
manual/install.html
The manual for the latest release of Ant is available online at
<https://ant.apache.org/manual/index.html>.
The latest version of the manual is available online at
<https://rawgit.com/apache/ant/master/manual/index.html>.
Licensing
---------

View File

@@ -1,3 +1,698 @@
Changes from Ant 1.10.4 TO Ant 1.10.5
=====================================
Fixed bugs:
-----------
* Fixes a regression in the "get" task where redirects
from a HTTP resource to a HTTPS resource started throwing
an exception.
Bugzilla Report 62499
* the new allowFilesToEscapeDest didn't work when set to false and
archive entries contained relative paths with so many ".."
segnments that the resulting path would go beyond the file system
root.
Bugzilla Report 62502
Other changes:
--------------
* Java task now accepts a "sourcefile" attribute to allow single file
source program execution, a feature that is introduced in Java 11.
Changes from Ant 1.10.3 TO Ant 1.10.4
=====================================
Changes that could break older environments:
-------------------------------------------
* <unzip>, <unjar> and <untar> will no longer extract entries whose
names would make the created files be placed outside of the
destination directory anymore by default. A new attribute
allowFilesToEscapeDest can be used to override the behavior.
Another special case is when stripAbsolutePathSpec is false (which
no longer is the default) and the entry's name starts with a
(back)slash and allowFilesToEscapeDest hasn't been specified
explicitly, in this case the file may be created outside of the
dest directory as well.
In addition stripAbsolutePathSpec is now true by default.
Based on a recommendation by the Snyk Security Research Team.
Fixed bugs:
-----------
* Delay the class initialization of the test classes until they are
passed to JUnit. This way we can avoid that failing static initializers
from non-test classes are reported as error when the 'skipNonTests' option
is 'true'.
Bugzilla Report 60062
* The junit task when used with includeantruntime="no" was incorrectly
printing a warning about multiple versions of ant detected in path
* <cab> died with a NullPointerException since Ant 1.10.2.
Bugzilla Report 62335
* The <depend> task would fail with
"java.lang.ClassFormatError: Invalid Constant Pool entry Type 19" while
parsing a module-info.class. The task is compatible with
Java bytecode version 53 now.
Bug reported by Simon IJskes https://issues.apache.org/jira/browse/NETBEANS-781
* Default and SecureInputHandler will now raise an error when then
end of the input stream (usually System.in or System.console) are
reached before a valid input has been read.
* junitreport does not list testsuites that fail to start any tests
because of an exception inside the all-tests and alltests-errors frames.
Bugzilla Report 62443
Other changes:
--------------
* AntAssert is deprecated, assertThat from JUnit 4.4+, Hamcrest matchers and/or
ExpectedException rule provide equivalent functionality
* PumpStreamHandler now explicitly verifies the streams for output
and error are not null and will throw an exception if they
are. This way creating a PumpStreamHandler will fail early as
opposed to some obscure errors later when closing streams or
finishing threads might fail.
Bugzilla Report 62148
* <property> has a new attribute runtime which can be used to set
properties with values taken as snapshots from the
availableProcessors, freeMemory, maxMemory and totalMemory methods
of the Java Runtime class.
* linecontains filter now has a new "matchAny" attribute which when
set to "true" allows any (instead of all) of the user-specified
strings to be present in the line.
Bugzilla Report 62313
* <resourcelist> has a new basedir attribute that can be used to
resolve relative names and provides a root for the FileResources
generated.
Bugzilla Report 62379
* The <includesfile> and <excludesfile> nested elements of
<patternset> and <fileset> now support an encoding attribute that
can be used to specify the file's encoding.
Bugzilla Report 62379
* New file selectors, posixGroup and posixPermissions, are available.
The new selectors and related ownedBy selector have "followSymlinks"
attribute that defaults to "true" for consistency.
Bugzilla Report 22370
* The junitlauncher task now has a "printSummary" attribute which when
set to "true" will print the test execution summary to System.out.
Changes from Ant 1.10.2 TO Ant 1.10.3
=====================================
Changes that could break older environments:
-------------------------------------------
* Previous versions of Ant's copy task would throw a BuildException
if the "name" of the resource to copy was null. Starting
this version, the copy task instead silently skips such resources
and no longer throws an exception.
ant-dev list https://www.mail-archive.com/dev@ant.apache.org/msg46634.html
* Reverted the signature change of various clone method
implementation in Ant's data-types introduced with 1.10.2 as they
broke subclasses of said data-types which tried to override clone.
Fixed bugs:
-----------
* Fixed NullPointerException in ChainedMapper
Bugzilla Report 62086
* Fixed NullPointerException when a mappedresource is used in pathconvert
Bugzilla Report 62076
* Fixed an issue where a string, when used as a resource collection, within
tokens, would be replaced by property values
Bugzilla Report 62147
* Added a workaround for a bug in the jarsigner tool to <verifyjar>
which requires the -storepass command line argument when verifying
signatures using -strict together with a PKCS12 keystore. Unlike
when signing the jar it will not prompt for the keystore's password
and read it from standard input.
This means Ant will now pass the keystore's password on the command
line when using <verifyjar>, which poses a security risk you should
be aware of.
Bugzilla Report 62194
Other changes:
--------------
* Allow Saxon to be used for junitreport XSL transformation
Github Pull Request #57
* when running on Java 11+ rmic will fail early if iiop or idl are
requested. Java11 removes support for CORBA and the switches have
been removed from the rmic tool.
* A new junitlauncher task which support JUnit 5 test framework.
Bugzilla Report 61796
Changes from Ant 1.10.1 TO Ant 1.10.2
=====================================
Changes that could break older environments:
-------------------------------------------
* updated the dependency of BCEL to 6.2.
Bugzilla Report 61196
* delete task previously would silently accept wildcard (*)
value for the "file" attribute. That's no longer the case
and an exception could get thrown by the underlying filesystem
for such use. Usage like:
<delete file="/foo/bar/*.something"/>
should instead be changed to use resource collections like:
<delete>
<fileset dir="/foo/bar/" includes="*.something"/>
</delete>
* Commons Net 3.6 is binary-code, but not source compatible;
see change list of Commons Net 3.0 for details
* The Log4jListener is marked as deprecated as the required log4j library
(in version 1.x) is not maintained any more.
* Image task is marked as deprecated as the required JAI library is not
maintained any more and internal APIs that JAI depended on are no longer
available in Java 9.
Fixed bugs:
-----------
* <genkey>'s <dname> child now skips <param>s that lack a key or
value.
Bugzilla Report 60767
* bootstrapping Ant on Windows failed
Bugzilla Report 61027
* Fixed the issue where the SCP based tasks would try to change
the permissions on the parent directory of a transferred file,
instead of changing it on the transferred file itself.
Bugzilla Reports 59648 and 43271
* Fixed the issue where the source file being copied could end
up being corrupted if the target of the copy happened to be
the same source file (symlinked back to itself).
Bugzilla Report 60644
* Fixed the issue where symlink creation with "overwrite=false",
on existing symlink whose target was a directory, would end
up creating a new symlink under the target directory.
Bugzilla Report 58683
* Improvement to the Zip task for reduced memory usage in certain
cases. Thanks to Glen Lewis for reporting the issue and
suggesting the fix.
Bugzilla Report 19516
* Fixed an issue where the content redirected from output/error
streams of a process, could end up being truncated.
Bugzilla Report 58833, 58451
* <fileset>/<zipfileset>/<tarfileset> will now throw an exception
with a more useful error message when setFile is called twice on
the same instance.
Bugzilla Report 62071
Other changes:
--------------
* Added forceCsvQuoteChar option to <csv> task. When enabled the
values always get quoted.
Github Pull Request #32
* Added <encoding> attributes to various script related tasks and a
compiled attribute to scriptdef.
Github Pull Request #30
* Added support for jarsigner's -tsadigestalg to <signjar>.
Bugzilla Report 60665
* added "regexp" attribute to <linecontainsregexp>
Bugzilla Report 60968
* reduced GC pressure by replacing all usage of FileInputStream and
FileOutputStream.
* Task can now also use attribute setters that expect a
java.nio.file.Path argument.
Bugzilla Report 61042
* added a new magic property ant.tstamp.now that can be used to
override the current time/date used by <tstamp>.
Bugzilla Report 61079
* added Orion support to ejbjar
Github Pull Request #33
* SCP task, when configured to use SFTP protocol, now preserves last
modified timestamp on files that it uploads, if the
preserveLastModified attribute is set to true for that task
Bugzilla Report 58589
* zip and the related tasks can now set the modification time of all
entries to a fixed timestamp.
Github Pull Request #36
* Jsch library dependency has now been upgraded to 0.1.54. Jsch is
the library behind the sshexec and scp Ant tasks.
Bugzilla Report 61718
* Added a new <javaversion> condition.
* added "javac10+" as new supported value for javac's compiler attribute.
* javah has been removed from Java 10. The task will now throw an
exception if you try to use it while running Java 10 or newer.
* Updated Maven Ant Tasks, Jakarta Regexp and JUnit 4 to the latest
stable version (2.1.3, 1.4, and 4.12 respectively); updated
JRuby to the latest Java 5 compatible version (1.6.8); added
resolve target for AntUnit to facilitate updates.
Github Pull Request #50
* Updated Java Mail API, Jython, Rhino and Commons Net to the latest
stable version (1.6.0, 2.7.0, 1.7.7.2 and 3.6, respectively).
Github Pull Request #53
Changes from Ant 1.10.0 TO Ant 1.10.1
=====================================
Fixed bugs:
-----------
* Ant 1.10.0 made Path#systemClasspath final which broke the Eclipse
integration.
Bugzilla Report 60582
* the wrapper script still didn't work on Solaris 10, but worked on
Solaris 11.
The "fixed" script should work in most cases but will not preserve
newlines present in command line arguments.
Bugzilla Report 60562
Other changes:
--------------
* new tasks <xz> and <unxz> and resource <xzresource> for XZ
compression. Also the compression attribute of <tar>/<untar> now
accepts "xz" as valid value.
The tasks and type are contained in the new ant-xz.jar and require
the library XZ for Java to be on the CLASSPATH.
Bugzilla Report 60350
Changes from Ant 1.9.7 TO Ant 1.10.0
====================================
Changes that could break older environments:
-------------------------------------------
* Ant 1.10.x requires Java8 or newer at compile or build time.
The 1.9.x series wil stay compatible with Java5.
* The <apt> task has been removed since apt itself has been removed
with Java8.
* <fileset>/<zipfileset>/<tarfileset> exhibited undefined
behavior when both the dir and file attribute have been used on the
same instance. This will now cause the build to fail.
Bugzilla Report 59402
* <native2ascii> will default to the builtin implementation on Java8
as well (sun isn't available for Java9+ anyway).
* The ant.java.version property will now hold the value "9" rather
than "1.9" if running on Java 9.
* <rmic> will no longer allow the -Xnew option (or xmic compiler) to
be used when running on Java 9 since this option has been removed.
Bugzilla Report 59906
* <javah> will default to the "forking" implementation on Java8
as well.
Fixed bugs:
-----------
* setDynamicAttribute on MacroInstance now lower-cases the attribute
name in order to allow users of the API to use the attributes names
they have specified.
Bugzilla Report 59339
* <get>'s quiet attribute was broken, it didn't suppress any messages.
Bugzilla Report 59379
* <zip>'s check whether an archive is already up-to-date failed on
NTFS filesystems and re-created archives more often than necessary.
Bugzilla Report 59562
* AntClassLoader didn't delegate to the parent loader for classes in
the "jdk" package or one of its subpackages. This hierarchy has
been introduced with Java 7.
Bugzilla Report 59556
* The ant wrapper script used on Unix-like operating systems only
worked on OSes where sed is GNU sed.
Bugzilla Report 59898
* <touch>'s default pattern as well as the default patterns used by
the <date> (resource) selectors depended on the JDK being used - or
rather the locale provider being used and the default locale
provider changed with Java 9.
They are now fixed and the documentation has been updated to
reflect the real patterns used rather than a non-formal description
of the expected format.
Bugzilla Report 59909
* Clarified the documentation of <get>'s retries attribute.
Bugzilla Report 59930
* The ant wrapper script failed if backticks were passed on the
command line.
Bugzilla Report 60150, 59445
* The report generated by <junitreport> could contain duplicate
characters in stack traces.
Bugzilla Report 58661
Other changes:
--------------
* New file selectors <executable>, <symlink> and <ownedBy>.
* New task <setpermissions> that provides the ability to set POSIX
compatible permssions via NIO's PosixFilePermission
* <junit> now initializes the cause of the AssertionFailedError when
converting from AssertionError.
Bugzilla Report 58982
* <scp> now supports compression via the optional compressed attribute.
Bugzilla Report 47552
* <junit> now supports JDK9 modules
Github Pull Request #18
* a new implementation "builtin" has been added to <native2ascii> and
is the default when running on JDK9+ since the tool itself has been
removed from the JDK.
Bugzilla Report 59855
* added a new <native2asciifilter> filter that can perform non-ASCII
to Unicode-escape conversions.
* <rmic> defaults to the "forking" compiler on JDK 9+ as the
implementation class of rmic is not exported by its containing
module and thus not accessible to Ant without applying -XaddExports
magic.
Bugzilla Report 59860
* a new implementation "forking" has been added to <javah> and is
used as default when running on JDK9.
* support for javac's -h switch has been added with the
nativeheaderdir attribute.
Bugzilla Report 59905
* it is now possible to set features of the TraX factory used by <xslt>
and <junitreport>.
* it is now possible to use references to Ant types and classloaders
built around Ant <path>s as values for TraX factory attributes.
* AntClassLoader and its subclasses register themselves as parallel
capable.
* <junitreport> now enables the feature
http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions
when run on Java 9 so the redirect extension function can be used
if when a SecurityManager is active.
Bugzilla Report 60060
* support for javac's --release switch introduced with Java9 has been
added.
Bugzilla Report 60172
Changes from Ant 1.9.6 TO Ant 1.9.7
===================================
Changes that could break older environments:
-------------------------------------------
* <exec> and <apply> used to ignore the dir attribute if it was the
same as the current working directory. They now no longer do,
which changes the behavior for vmlauncher="false" which would have
used the project's basedir rather than the current working
directory in that case.
Bugzilla Report 58555
Fixed bugs:
-----------
* ZipOutputStream could cause an ArrayIndexOutOfBoundsException when
adding entries with comments. This never happens when using Ant as
a build tool but may affect users using Ant's zip package as a
library.
* <gunzip> and <bunzip2> didn't work for non-filesystem resources.
* <jar> ignored the zip64Mode attribute when creating manifest-only
jars. This resulted in jar files that couldn't be read by Java5.
Bugzilla Report 58428
* <untar> will now detect GNU tar longname/link records even if they
don't use the names used by GNU tar itself. star is known to
create archives of that kind.
https://issues.apache.org/jira/browse/COMPRESS-324
* <script> could fail to find javax.script on JDK9 with Jigsaw.
Bugzilla Report 58271
* <import> sometimes failed to normalize file names which could lead
to files getting imported twice which in turn could lead to targets
getting executed twice.
Bugzilla Report 58886
* TarInputStream now properly extraxt directory entries with a
non-zero size.
* <union> would drop file resources pointing to the same file but
using different names.
Bugzilla Report 57965
* <replace>'s result was undefined when using the replacefilterfile
attribute and some keys inside the properties files have been
substrings of other keys. Keys are now sorted by descending size.
Bugzilla Report 58997
* Ant fails to run when arguments contain double-quote character.
Bugzilla Report 58898
* Ant fails to run if ANT_HOME contains a double-quote character.
Bugzilla Report 58874
* Definer's way to parse URLs from classloader breaks with
recent Java 9 builds (b108).
Bugzilla Report 59130
* <ant> and <antcall> now preserve the ext status set by an <exit>
task.
Bugzilla Report 59228
Other changes:
--------------
* <scp> now supports (filesystem-only) resource collections in
addition to filesets.
Bugzilla Report 50769
* The <http> condition has a new optional attribute followRedirects.
Bugzilla Report 58840
* <java> now supports Java9 modules.
https://github.com/apache/ant/pull/15
* <javac> now supports Java9 modules.
https://github.com/apache/ant/pull/16
* <sshexec> and <scp> have two new attributes serverAliveInterval and
serverAliveCountMax that can be used to keep a intermediaries from
closing idle connections.
Bugzilla Report 59162
Changes from Ant 1.9.5 TO Ant 1.9.6
===================================
Changes that could break older environments:
-------------------------------------------
Fixed bugs:
-----------
* ArrayIndexOutOfBoundsException when ZIP extra fields are read and
the entry contains an UnparseableExtraField.
https://issues.apache.org/jira/browse/COMPRESS-317
Other changes:
--------------
* Hidden <javaconstant> resource is published now. It reads the
value of a specified java constant.
Changes from Ant 1.9.4 TO Ant 1.9.5
===================================
Changes that could break older environments:
-------------------------------------------
* The ReplaceTokens filter can now use token-separators longer than
one character. This means it can be used to replace mustache-style
{{patterns}} and similar templates. This is going to break code
that invokes the setters on ReplaceTokens via the Java API as their
parameters have been changed from char to String. It may also
break build files that specified multi character tokens and relied
on Ant silently ignoring all but the first character.
Bugzilla Report 56584
* The changes that added <get>'s support for gzip encoding
automatically uncompressed content that would not have been touched
before - like when downloading .tar.gz files. A new flag has been
added to control the behavior and its default will make <get> work
as it did in 1.9.3. I.e. if you want it to work like 1.9.4
you have to explicitly set tryGzipEncoding to true.
Bugzilla Report 57048
Fixed bugs:
-----------
* TarArchiveInputStream failed to read archives with empty gid/uid
fields.
Bugzilla Report 56641
* TarArchiveInputStream could throw IOException when reading PAX
headers from a "slow" InputStream.
* XMLJunitResultFormatter could throw NullPointerException if Java
cannot determine the local hostname.
Bugzilla Report 56593
* URLResource#getLastModified tried to access the connection to the
URL without making sure it was established, potentially leading to
a NullPointerException when using FTP.
Bugzilla Report 56873
* Long-Name and -link or PAX-header entries in TAR archives
always had the current time as last modfication time, creating
archives that are different at the byte level each time an
archive was built.
* runant.py should now work as well when the path of the Java executable
contains spaces.
github pull request #1
* <junitreport> now supports nested <classpath> and <factory> elements.
Bugzilla Report 47002
* complete-ant-cmd.pl now also knows about the -file option.
Bugzilla Report 57371
* the br-replace template inside the XSLT stylesheets used by
<junitreport> could cause stack overflows or out-of-memory errors
when applied to big outputs.
Bugzilla Report 57341
* removed spurious warning about unclosed ZipFiles when reading the
archive failed.
Port of https://issues.apache.org/jira/browse/COMPRESS-297
* FileUtils.rename which is used by several tasks can throw a
NullPointerException if the "normal" renameTo operation fails and
an exception occurs while rename falls back to copying and deleting
the file.
Bugzilla Report 57533
* complete-ant-cmd.pl would incorrectly suggest words from the build
file description.
Bugzilla Report 51931
* complete-ant-cmd.pl now also completes tasks without a description.
Bugzilla Report 57542
* LocalPropertyStack could run into ConcurrentModificationException
when tasks spawned new child threads that accessed the properties.
Bugzilla Report 55074
* TarEntry's constructor with a File and a String arg didn't
normalize the name.
* Between 1.8.4 and 1.9.0 TarInputStream started to parse file
names using the platform's default encoding rather than as ASCII.
This has been a breaking change that has never been marked as such
(in fact it went unnoticed). In order to allow <untar> and
<tarfileset> to work on platforms who's encoding doesn't match the
encoding of file names inside the archive, both now support
encoding attributes.
The attribute has also been added to <tar> for symmetry.
Bugzilla Report 57822
Other changes:
--------------
* it is now possible to provide proxy configuration to signjar
when using the timestamped authority.
Bugzilla Report 56678
* complete-ant-cmd.pl now also analyzes the ANT_ARGS environment
variable.
Bugzilla Report 57371
* ported some of the write-optimization of Commons Compress 1.10 to
the ZIP package
* adapted unit tests to Java9 and added "javac1.9" as valid option
for javac's compiler attribute.
* performance improvements for <intersect>
Bugzilla Report 57588
* MailLogger can now add CC and BCC addresses.
Bugzilla Report 57789.
* <scp>'s buffer size has been increased from 1k to 100k to match
<ftp> and <get>.
github pull requests #8 and #9
* The tar package can now deal with group and user ids bigger than
0x80000000.
https://issues.apache.org/jira/browse/COMPRESS-314
https://issues.apache.org/jira/browse/COMPRESS-315
* <scp> has new attributes fileMode and dirMode that control the
permissions on the remote side when sending data via SSH.
Bugzilla Report 43271.
* New <allbutlast> and <allbutfirst> resource collections can be used
to select all but a given subset of a resource collection.
Bugzilla Report 57834.
Changes from Ant 1.9.3 TO Ant 1.9.4
===================================
@@ -334,11 +1029,11 @@ Fixed bugs:
* Updated documentation to fix spelling errors / broken links.
Bugzilla Reports 53215, 53291, 53202
* Unable to override system properties. It was not possible not to override
system properties from the command line (or from a property file).
Bugzilla Report 51792
* <javac> by default fails when run on JDK 8.
Bugzilla Report 53347.
@@ -515,7 +1210,7 @@ Fixed bugs:
* Exec task may mix the stderr and stdout output while logging it
Bugzilla Report 50507.
* Missing space between "finished" and timestamp in task/target
* Missing space between "finished" and timestamp in task/target
finish message from ProfileLogger.
Bugzilla Report 51109.
@@ -529,10 +1224,10 @@ Fixed bugs:
Bugzilla Report 42696.
* quiet attribute added to the copy and move tasks, to be used together
with failonerror=false, so warnings won't get logged
with failonerror=false, so warnings won't get logged
Bugzilla Report 48789.
* System.in was closed and not readable anymore by the DefaultInputHandler
* System.in was closed and not readable anymore by the DefaultInputHandler
when Ant is used via its Java API.
Bugzilla Report 51161
@@ -696,10 +1391,10 @@ Changes that could break older environments:
Fixed bugs:
-----------
* hostinfo now prefers addresses with a hostname over addresses without
* hostinfo now prefers addresses with a hostname over addresses without
a hostname, provided the addresses have the same scope.
For local lookup, no IP address will be put in NAME / DOMAIN anymore.
For remote lookup, if a host name was provided and only an IP address is
For remote lookup, if a host name was provided and only an IP address is
found, the IP address will no longer overwrite the host name provided to the
task.
Bugzilla Report 49513
@@ -707,8 +1402,8 @@ Fixed bugs:
* mmap-based file copy problems under JDK 1.4 on Linux.
Bugzilla Report 49430.
* The Sun JVM tries to mmap the entire file during a copy.
For large files this is not feasible.
* The Sun JVM tries to mmap the entire file during a copy.
For large files this is not feasible.
We now explicitly request to copy at most 16 MiB per request.
Bugzilla Report 49326.
@@ -861,7 +1556,7 @@ Other changes:
The wildcards are not expanded or even evaluated by Ant and will be
used literally. The resulting path may be unusable as a CLASSPATH
for Java versions prior to Java6 and likely doesn't mean anything
when used in any other way than a CLASSPATH for a forked Java VM.
when used in any other way than a CLASSPATH for a forked Java VM.
Bugzilla Report 46842.
* A new attribute allows targets to deal with nonexistent extension
@@ -931,7 +1626,7 @@ Other changes:
should also benefit any operation that scans directories in Ant.
Bugzilla Report 50200.
Changes from Ant 1.8.0 TO Ant 1.8.1
Changes from Ant 1.8.0 TO Ant 1.8.1
===================================
Changes that could break older environments:
@@ -991,7 +1686,7 @@ Fixed bugs:
1.7.1
Bugzilla Report 48853
* ANT_CMD_LINE_ARGS are rippling through lower level Ant usage
* ANT_CMD_LINE_ARGS are rippling through lower level Ant usage
Bugzilla Report 48876
* email : IO error sending mail with plain mimetype
@@ -1055,7 +1750,7 @@ Other changes:
equals condition allowed Object args, but Ant 1.8.x+ property
evaluation may yield values of any type.
* BuildFileTest.assertPropertyUnset() fails with a slightly more
* BuildFileTest.assertPropertyUnset() fails with a slightly more
meaningful error message
Bugzilla Report 48834
@@ -1095,7 +1790,7 @@ Fixed bugs:
* stack traces were not reported at all by <junit/>
when filtertrace="on", which is the default.
* ant.bat can now also process the -noclasspath switch when it is
* ant.bat can now also process the -noclasspath switch when it is
the first switch on a command line.
Bugzilla Report 48186.
@@ -1291,7 +1986,7 @@ Changes that could break older environments:
* A new property syntax can be used to set attributes from
references: ${ant.ref:some-reference}
In most cases this will yield the exact same result as
In most cases this will yield the exact same result as
${toString:some-reference} - only when an attribute setter method
accepts an object type other than string and the project's
reference is an Object of matching type the new syntax will pass in
@@ -1328,12 +2023,12 @@ Fixed bugs:
* RPM task needed an inserted space between the define and the value.
Bugzilla Report 46659.
* Got rid of deadlock between in, out and err in the Redirector.
* Got rid of deadlock between in, out and err in the Redirector.
Bugzilla Report 44544.
* Caused by AssertionError no longer filtered.
Bugzilla Report 45631.
* <zip> would sometimes recreate JARs unnecessarily.
Bugzilla Report 45902.
@@ -1380,10 +2075,10 @@ Fixed bugs:
have full control.
Bugzilla Report 34638.
* <sql> would fail if the executed statment didn't return a result
* <sql> would fail if the executed statement didn't return a result
set with some JDBC driver that dissalow Statement.getResultSet to
be called in such a situation.
Bugzilla Report 36265
Bugzilla Report 36265
* if the executed statement in <sql> returned a result set and an
update count, the count would be lost.
@@ -1590,7 +2285,7 @@ Fixed bugs:
Bugzilla Report 29731.
* <record> didn't work properly with nested builds.
Bugzilla Report 41368.
Bugzilla Report 41368.
* <jar> with filesetmanifest different from skip didn't work if the
update attribute has been set to true.
@@ -1644,7 +2339,7 @@ Fixed bugs:
* The tar task failed to recognize that the archive had to be
(re-)created in some cases where the sources are filesystem based
resources but not filesets.
Bugzilla Report 48035.
Bugzilla Report 48035.
* <sshexec>'s outputproperty was prefixed by the executed command
when the command attribute has been used, breaking backwards
@@ -1665,8 +2360,8 @@ Other changes:
* The get task now also follows redirects from http to https
Bugzilla Report 47433
* A HostInfo task was added performing information on hosts, including info on
the host ant is running on.
* A HostInfo task was added performing information on hosts, including info on
the host ant is running on.
Bugzilla Reports 45861 and 31164.
* There is now a FileProvider interface for resources that act as a source
@@ -1785,7 +2480,7 @@ Other changes:
expression.
Bugzilla Report 45284
* Enhanced performance of Project.fireMessageLoggedEvent and DirectoryScanner
* Enhanced performance of Project.fireMessageLoggedEvent and DirectoryScanner
Bugzilla Reports 45651 and 45665
* The package list location for offline links can now be specified as
@@ -1938,7 +2633,7 @@ Other changes:
process proceed if an error occurs.
Bugzilla Report 36260.
* <xslt> has a new attribute failOnNoResources that can be used to
* <xslt> has a new attribute failOnNoResources that can be used to
make the build fail/continue if the collection of resources to
transform is empty.
Bugzilla Report 46274.
@@ -2185,7 +2880,7 @@ Changes that could break older environments:
incoming (OutputStream) content.
* <java> with fork now returns gives -1 instead of 0 as result when failonerror
is false and some exception (including timeout) occurs. Br 42377.
is false and some exception (including timeout) occurs. Br 42377.
* ant-type attribute has been marked as deprecated and a warning has been
issued if it is encountered in the build file.
@@ -2261,7 +2956,7 @@ Fixed bugs:
* Synchonization issues in PropertyHelper. Bugzilla 41353.
* <concat binary="true" append="true"> did not append. Bugzilla 41399.
* -autoproxy turns Java1.5+ automatic proxy support on. Bugzilla 41904
* Handle null result of system getProperty(). Bugzilla 42334.
@@ -2487,10 +3182,10 @@ Changes that could break older environments:
* IContract optional task removed as the required library is no
longer available.
* Metamata (maudit, mmetrics, and mparse tasks) removed as the required
* Metamata (maudit, mmetrics, and mparse tasks) removed as the required
library is no longer available.
* Sitraka (jpcoverage, jpcovmerge, jpcovreport) tasks suppressed as the
* Sitraka (jpcoverage, jpcovmerge, jpcovreport) tasks suppressed as the
required library is no longer available.
* <fixcrlf> used \r (Mac) line endings on OS X, whose proper line separator
@@ -2546,7 +3241,7 @@ Fixed bugs:
* OOM caused by IH holding on to classes and thus their classloaders.
Bugzilla 28283 and 33061.
* <delete> doesnt delete when defaultexcludes="false" and no includes is set
* <delete> doesn't delete when defaultexcludes="false" and no includes is set
fixed. Bugzilla 40313.
* Behavior change of DirectoryScanner/AbstractFileset when conditional include
@@ -2832,7 +3527,7 @@ Other changes:
distribution. Bugzilla 40980.
* Roll back automatic proxy enabling on Java 1.5. It broke things like
Oracle JDBC drivers, and Ant itself on IBM's JVM on AIX, and didnt
Oracle JDBC drivers, and Ant itself on IBM's JVM on AIX, and didn't
seem to work to well the rest of the time.
To enable the feature, use the -autoproxy command line option.
@@ -4302,7 +4997,7 @@ Other changes:
* <jdepend> now supports a new nested element <classespath> which is
the same as <sourcespath> but point to compiled classes (the
prefered mode of operation for JDepend > 2.5). Additionally, nested
preferred mode of operation for JDepend > 2.5). Additionally, nested
<exclude> elements can be used to exclude certain packages from
being parsed. Bugzilla Report 17134.

375
lib/ant/bin/ant Executable file
View File

@@ -0,0 +1,375 @@
#! /bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Extract launch and ant arguments, (see details below).
ant_exec_args=
no_config=false
use_jikes_default=false
ant_exec_debug=false
show_help=false
if [ -z "$PROTECT_NL" ]; then
PROTECT_NL=true
os=`uname -s`
rel=`uname -r`
# heirloom bourne-shell used by Solaris 10 is not POSIX
# it lacks features necessary to protect trailing NL from subshell trimming
if [ "$os" = SunOS -a "$rel" = "5.10" ]; then
PROTECT_NL=false
fi
fi
for arg in "$@"; do
if [ "$arg" = "--noconfig" ]; then
no_config=true
elif [ "$arg" = "--usejikes" ]; then
use_jikes_default=true
elif [ "$arg" = "--execdebug" ]; then
ant_exec_debug=true
elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ]; then
show_help=true
ant_exec_args="$ant_exec_args -h"
else
if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ]; then
show_help=true
fi
if [ "$PROTECT_NL" = "true" ]; then
# pad the value with X to protect trailing NLs from subshell output trimming
esc_arg="${arg}X"
else
esc_arg="${arg}"
fi
# wrap all arguments as "" strings, escape any internal back-slash, double-quote, $, or back-tick characters
# use printf to avoid echo interpretation behaviors such as escapes and line continuation
# Mac bsd_sed does not support group-0, so pattern uses group-1
# Solaris sed only processes lines with trailing newline, passing in an extra newline
# subshell (heirloom and posix) will trim the added trailing newline
esc_arg="`printf '%s\n' "$esc_arg" | sed -e 's@\([$\"\`\\]\)@\\\\\\1@g' `"
if [ "$PROTECT_NL" = "true" ]; then
# remove the padding X added above, this syntax is POSIX compatible but not heirloom-sh
esc_arg="${esc_arg%X}"
fi
quoted_arg="\"$esc_arg\""
if $ant_exec_debug; then
# using printf to avoid echo line continuation and escape interpretation
printf "arg : %s\n" "$arg"
printf "quoted_arg: %s\n" "$quoted_arg"
fi
ant_exec_args="$ant_exec_args $quoted_arg"
fi
done
# Source/default ant configuration
if $no_config; then
rpm_mode=false
usejikes=$use_jikes_default
else
# load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
if [ -f "/etc/ant.conf" ]; then
. /etc/ant.conf
fi
fi
# load user ant configuration
if [ -f "$HOME/.ant/ant.conf" ]; then
. $HOME/.ant/ant.conf
fi
if [ -f "$HOME/.antrc" ]; then
. "$HOME/.antrc"
fi
# provide default configuration values
if [ -z "$rpm_mode" ]; then
rpm_mode=false
fi
if [ -z "$usejikes" ]; then
usejikes=$use_jikes_default
fi
fi
# Setup Java environment in rpm mode
if $rpm_mode; then
if [ -f /usr/share/java-utils/java-functions ]; then
. /usr/share/java-utils/java-functions
set_jvm
set_javacmd
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
if [ -z "$JAVA_HOME" ]; then
if [ -x '/usr/libexec/java_home' ]; then
JAVA_HOME=`/usr/libexec/java_home`
elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
fi
fi
;;
MINGW*)
mingw=true
;;
esac
if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ]; then
## resolve links - $0 may be a link to ant's home
PRG="$0"
progname=`basename "$0"`
# need this for relative symlinks
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
ANT_HOME=`dirname "$PRG"`/..
# make it fully qualified
ANT_HOME=`cd "$ANT_HOME" > /dev/null && pwd`
fi
# For Cygwin and Mingw, ensure paths are in UNIX format before
# anything is touched
if $cygwin; then
[ -n "$ANT_HOME" ] && ANT_HOME=`cygpath --unix "$ANT_HOME"`
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
if $mingw; then
[ -n "$ANT_HOME" ] && ANT_HOME="`(cd "$ANT_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] && JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
# set ANT_LIB location
ANT_LIB="${ANT_HOME}/lib"
if [ -z "$JAVACMD" ]; then
if [ -n "$JAVA_HOME" ]; then
# IBM's JDK on AIX uses strange locations for the executables
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
JAVACMD="$JAVA_HOME/jre/sh/java"
elif [ -x "$JAVA_HOME/jre/bin/java" ]; then
JAVACMD="$JAVA_HOME/jre/bin/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD=`which java 2> /dev/null `
if [ -z "$JAVACMD" ]; then
JAVACMD=java
fi
fi
fi
if [ ! -x "$JAVACMD" ]; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi
# Build local classpath using just the launcher in non-rpm mode or
# use the Jpackage helper in rpm mode with basic and default jars
# specified in the ant.conf configuration. Because the launcher is
# used, libraries linked in ANT_HOME/lib will also be included, but this
# is discouraged as it is not java-version safe. A user should
# request optional jars and their dependencies via the OPT_JAR_LIST
# variable
if $rpm_mode && [ -x /usr/bin/build-classpath ]; then
LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
# If no optional jars have been specified then build the default list
if [ -z "$OPT_JAR_LIST" ]; then
for file in /etc/ant.d/*; do
if [ -f "$file" ]; then
case "$file" in
*~|*#*|*.rpmsave|*.rpmnew)
;;
*)
for dep in `cat "$file"`; do
OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
done
;;
esac
fi
done
fi
# If the user requested to try to add some other jars to the classpath
if [ -n "$OPT_JAR_LIST" ]; then
_OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
if [ -n "$_OPTCLASSPATH" ]; then
LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
fi
fi
# Explicitly add javac path to classpath, assume JAVA_HOME set
# properly in rpm mode
if [ -f "$JAVA_HOME/lib/tools.jar" ]; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
fi
if [ -f "$JAVA_HOME/lib/classes.zip" ]; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
fi
# if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
# user CLASSPATH first and ant-found jars after.
# In that case, the user CLASSPATH will override ant-found jars
#
# if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
# with ant-found jars first and user CLASSPATH after
if [ -n "$CLASSPATH" ]; then
# merge local and specified classpath
if [ -z "$LOCALCLASSPATH" ]; then
LOCALCLASSPATH="$CLASSPATH"
elif [ -n "$CLASSPATH_OVERRIDE" ]; then
LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
else
LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
fi
# remove class path from launcher -cp option
CLASSPATH=""
fi
else
# not using rpm_mode; use launcher to determine classpaths
if [ -z "$LOCALCLASSPATH" ]; then
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
else
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
fi
fi
if [ -n "$JAVA_HOME" ]; then
# OSX hack to make Ant work with jikes
if $darwin; then
OSXHACK="${JAVA_HOME}/../Classes"
if [ -d "${OSXHACK}" ]; then
for i in "${OSXHACK}"/*.jar; do
JIKESPATH="$JIKESPATH:$i"
done
fi
fi
fi
# Allow Jikes support (off by default)
if $usejikes; then
ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
fi
# For Cygwin, switch paths to appropriate format before running java
# For PATHs convert to unix format first, then to windows format to ensure
# both formats are supported. Probably this will fail on directories with ;
# in the name in the path. Let's assume that paths containing ; are more
# rare than windows style paths on cygwin.
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null; then
format=mixed
else
format=windows
fi
[ -n "$ANT_HOME" ] && ANT_HOME=`cygpath --$format "$ANT_HOME"`
ANT_LIB=`cygpath --$format "$ANT_LIB"`
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
if [ -n "$CLASSPATH" ]; then
CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
fi
CYGHOME=`cygpath --$format "$HOME"`
fi
# Show script help if requested
if $show_help; then
echo $0 '[script options] [options] [target [target2 [target3] ..]]'
echo 'Script Options:'
echo ' --help, --h print this message and ant help'
echo ' --noconfig suppress sourcing of /etc/ant.conf,'
echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
echo ' configuration files'
echo ' --usejikes enable use of jikes by default, unless'
echo ' set explicitly in configuration files'
echo ' --execdebug print ant exec line generated by this'
echo ' launch script'
echo ''
fi
# add a second backslash to variables terminated by a backslash under cygwin
if $cygwin; then
case "$ANT_HOME" in
*\\ )
ANT_HOME="$ANT_HOME\\"
;;
esac
case "$CYGHOME" in
*\\ )
CYGHOME="$CYGHOME\\"
;;
esac
case "$JIKESPATH" in
*\\ )
JIKESPATH="$JIKESPATH\\"
;;
esac
case "$LOCALCLASSPATH" in
*\\ )
LOCALCLASSPATH="$LOCALCLASSPATH\\"
;;
esac
case "$CLASSPATH" in
*\\ )
CLASSPATH="$CLASSPATH\\"
;;
esac
fi
# Execute ant using eval/exec to preserve spaces in paths,
# java options, and ant args
ant_sys_opts=
if [ -n "$CYGHOME" ]; then
if [ -n "$JIKESPATH" ]; then
ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
else
ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
fi
else
if [ -n "$JIKESPATH" ]; then
ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
fi
fi
ant_exec_command="exec \"\$JAVACMD\" $ANT_OPTS -classpath \"\$LOCALCLASSPATH\" -Dant.home=\"\$ANT_HOME\" -Dant.library.dir=\"\$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"\$CLASSPATH\""
if $ant_exec_debug; then
# using printf to avoid echo line continuation and escape interpretation confusion
printf "%s\n" "$ant_exec_command $ant_exec_args"
fi
eval "$ant_exec_command $ant_exec_args"

218
lib/ant/bin/ant.bat Normal file
View File

@@ -0,0 +1,218 @@
@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM This is an inordinately troublesome piece of code, particularly because it
REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x
REM support, things would be much easier, but sadly, it is not yet time.
REM Be cautious about editing this, and only add WinNT specific stuff in code that
REM only runs on WinNT.
if "%HOME%"=="" goto homeDrivePathPre
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
:homeDrivePathPre
if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
:userProfilePre
if "%USERPROFILE%"=="" goto alpha
if "%USERPROFILE%"=="%HOME%" goto alpha
if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"
:alpha
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal
if "%ANT_HOME%"=="" goto setDefaultAntHome
:stripAntHome
if not _%ANT_HOME:~-1%==_\ goto checkClasspath
set ANT_HOME=%ANT_HOME:~0,-1%
goto stripAntHome
:setDefaultAntHome
rem %~dp0 is expanded pathname of the current script under NT
set ANT_HOME=%~dp0..
:checkClasspath
set _USE_CLASSPATH=yes
rem CLASSPATH must not be used if it is equal to ""
if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=
:setupArgs
if ""%1""=="""" goto doneStart
if ""%1""==""-noclasspath"" goto clearclasspath
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
rem here is there is a -noclasspath in the options
:clearclasspath
set _USE_CLASSPATH=no
shift
goto setupArgs
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
:doneStart
if "%_USE_CLASSPATH%"=="no" goto findAntHome
:stripClasspath
if not _%CLASSPATH:~-1%==_\ goto findAntHome
set CLASSPATH=%CLASSPATH:~0,-1%
goto stripClasspath
:findAntHome
rem find ANT_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
rem check for ant in Program Files
if not exist "%ProgramFiles%\ant" goto checkSystemDrive
set ANT_HOME=%ProgramFiles%\ant
goto checkJava
:checkSystemDrive
rem check for ant in root directory of system drive
if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava
:checkCDrive
rem check for ant in C:\ant for Win9X users
if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava
:noAntHome
echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
goto end
:checkJava
set _JAVACMD=%JAVACMD%
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes
:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
:runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
if not "%OS%"=="Windows_NT" goto onError
set ANT_ERROR=%ERRORLEVEL%
goto end
:runAntNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
if not "%OS%"=="Windows_NT" goto onError
set ANT_ERROR=%ERRORLEVEL%
goto end
:runAntWithJikes
if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath
set JIKESPATH=%JIKESPATH:~0,-1%
goto runAntWithJikes
:checkJikesAndClasspath
if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
:runAntWithJikesAndClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
if not "%OS%"=="Windows_NT" goto onError
set ANT_ERROR=%ERRORLEVEL%
goto end
:runAntWithJikesNoClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
if not "%OS%"=="Windows_NT" goto onError
set ANT_ERROR=%ERRORLEVEL%
goto end
:onError
rem Windows 9x way of checking the error code. It matches via brute force.
for %%i in (1 10 100) do set err%%i=
for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i
if %err100%==2 goto onError200
if %err100%==0 set err100=
for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i
if "%err100%"=="" if %err10%==0 set err10=
:onError1
for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i
goto onErrorEnd
:onError200
for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i
if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i
if not err10==5 goto onError1
:onErrorEnd
set ANT_ERROR=%err100%%err10%%err1%
for %%i in (1 10 100) do set err%%i=
:end
rem bug ID 32069: resetting an undefined env variable changes the errorlevel.
if not "%_JAVACMD%"=="" set _JAVACMD=
if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=
if "%ANT_ERROR%"=="0" goto mainEnd
goto omega
:mainEnd
rem If there were no errors, we run the post script.
if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal
if "%HOME%"=="" goto homeDrivePathPost
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
:homeDrivePathPost
if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
:userProfilePost
if "%USERPROFILE%"=="" goto omega
if "%USERPROFILE%"=="%HOME%" goto omega
if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"
:omega
exit /b %ANT_ERROR%

93
lib/ant/bin/ant.cmd Normal file
View File

@@ -0,0 +1,93 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Run ant
*/
'@echo off'
parse arg mode envarg '::' antarg
if mode\='.' & mode\='..' & mode\='/' then do
envarg = mode envarg
mode = ''
end
if antarg = '' then do
antarg = envarg
envarg = ''
end
x = setlocal()
env="OS2ENVIRONMENT"
antenv = _getenv_('antenv')
if _testenv_() = 0 then interpret 'call "' || antenv || '"' '"' || envarg || '"'
if mode = '' then mode = _getenv_('ANT_MODE' '..')
if mode \= '/' then do
runrc = _getenv_('runrc')
antrc = _getenv_('antrc' 'antrc.cmd')
if mode = '..' then mode = '-r'
else mode = ''
interpret 'call "' || runrc || '"' antrc '"' || mode || '"'
end
if _testenv_() = 0 then do
say 'Ant environment is not set properly'
x = endlocal()
exit 16
end
settings = '-Dant.home=' || ANT_HOME '-Djava.home=' || JAVA_HOME
java = _getenv_('javacmd' 'java')
opts = value('ANT_OPTS',,env)
args = value('ANT_ARGS',,env)
lcp = value('LOCALCLASSPATH',,env)
cp = value('CLASSPATH',,env)
if value('ANT_USE_CP',,env) \= '' then do
if lcp \= '' & right(lcp, 1) \= ';' then lcp = lcp || ';'
lcp = lcp || cp
'SET CLASSPATH='
end
if lcp\='' then lcp = '-classpath' lcp
cmd = java opts lcp '-jar' ANT_HOME ||'\lib\ant-launcher.jar' settings args antarg
launcher = stream(ANT_HOME ||'\lib\ant-launcher.jar', 'C', 'query exists')
if launcher = '' then entry = 'org.apache.tools.ant.Main'
else entry = 'org.apache.tools.ant.launch.Launcher'
java opts lcp entry settings args antarg
x = endlocal()
return rc
_testenv_: procedure expose env ANT_HOME JAVA_HOME
ANT_HOME = value('ANT_HOME',,env)
if ANT_HOME = '' then return 0
JAVA_HOME = value('JAVA_HOME',,env)
if JAVA_HOME = '' then return 0
cp = translate(value('CLASSPATH',,env))
if pos(translate(ANT_HOME), cp) = 0 then return 0
if pos(translate(JAVA_HOME), cp) = 0 then return 0
return 1
_getenv_: procedure expose env
parse arg envar default
if default = '' then default = envar
var = value(translate(envar),,env)
if var = '' then var = default
return var

24
lib/ant/bin/antRun Executable file
View File

@@ -0,0 +1,24 @@
#! /bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Args: DIR command
cd "$1"
CMD="$2"
shift
shift
exec "$CMD" "$@"

49
lib/ant/bin/antRun.bat Normal file
View File

@@ -0,0 +1,49 @@
@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal
if ""%1""=="""" goto runCommand
rem Change drive and directory to %1
if "%OS%"=="Windows_NT" goto nt_cd
if "%OS%"=="WINNT" goto nt_cd
cd ""%1""
goto end_cd
:nt_cd
cd /d ""%1""
:end_cd
shift
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
set ANT_RUN_CMD=%1
if ""%1""=="""" goto runCommand
shift
:loop
if ""%1""=="""" goto runCommand
set ANT_RUN_CMD=%ANT_RUN_CMD% %1
shift
goto loop
:runCommand
rem echo %ANT_RUN_CMD%
%ANT_RUN_CMD%
if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal

61
lib/ant/bin/antRun.pl Executable file
View File

@@ -0,0 +1,61 @@
#!/usr/bin/perl
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#######################################################################
#
# antRun.pl
#
# wrapper script for invoking commands on a platform with Perl installed
# this is akin to antRun.bat, and antRun the SH script
#######################################################################
#be fussy about variables
use strict;
#turn warnings on during dev; generates a few spurious uninitialised var access warnings
#use warnings;
#and set $debug to 1 to turn on trace info (currently unused)
my $debug = 1;
#######################################################################
# change drive and directory to "%1"
my $ANT_RUN_CMD = @ARGV[0];
# assign current run command to "%2"
chdir(@ARGV[0]) || die "Can't cd to $ARGV[0]: $!\n";
if ($^O eq "NetWare") {
# There is a bug in Perl 5 on NetWare, where chdir does not
# do anything. On NetWare, the following path-prefixed form should
# always work. (afaict)
$ANT_RUN_CMD .= "/" . @ARGV[1];
} else {
$ANT_RUN_CMD = @ARGV[1];
}
# dispose of the first two arguments, leaving only the command's args.
shift;
shift;
# run the command
my $returnValue = system $ANT_RUN_CMD, @ARGV;
if ($returnValue eq 0) {
exit 0;
} else {
# only 0 and 1 are widely recognized as exit values
# so change the exit value to 1
exit 1;
}

98
lib/ant/bin/antenv.cmd Normal file
View File

@@ -0,0 +1,98 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'@echo off'
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
call SysLoadFuncs
/* Prepare the parameters for later use */
parse arg argv
mode = ''
args = ''
opts = ''
cp = ''
lcp = ''
do i = 1 to words(argv)
param = word(argv, i)
select
when param='-lcp' then mode = 'l'
when param='-cp' | param='-classpath' then mode = 'c'
when abbrev('-opts', param, 4) then mode = 'o'
when abbrev('-args', param, 4) then mode = 'a'
otherwise
select
when mode = 'a' then args = space(args param, 1)
when mode = 'c' then cp = space(cp param, 1)
when mode = 'l' then lcp = space(lcp param, 1)
when mode = 'o' then opts = space(opts param, 1)
otherwise
say 'Option' param 'ignored'
end
end
end
env="OS2ENVIRONMENT"
antconf = _getenv_('antconf' 'antconf.cmd')
runrc = _getenv_('runrc')
interpret 'call "' || runrc || '"' '"' || antconf || '"' 'ETC'
ANT_HOME = value('ANT_HOME',,env)
JAVA_HOME = value('JAVA_HOME',,env)
classpath = value('CLASSPATH',,env)
classes = stream(JAVA_HOME || "\lib\classes.zip", "C", "QUERY EXISTS")
if classes \= '' then classpath = prepend(classpath classes)
classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS")
if classes \= '' then classpath = prepend(classpath classes)
classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar')
'SET CLASSPATH=' || classpath
/* Setting classpathes, options and arguments */
envset = _getenv_('envset')
if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"'
if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"'
if opts\='' then interpret 'call "' || envset || '"' '"-D ANT_OPTS"' '"' || opts || '"'
if args\='' then interpret 'call "' || envset || '"' '"ANT_ARGS"' '"' || args || '"'
exit 0
addpath: procedure
parse arg path elem
if elem = '' then do
if path\='' & right(path, 1)\=';' then path = path || ';'
return path
end
if substr(path, length(path)) = ';' then glue = ''
else glue = ';'
if pos(translate(elem), translate(path)) = 0 then path = path || glue || elem || ';'
return path
prepend: procedure
parse arg path elem
if elem = '' then do
if path\='' & right(path, 1)\=';' then path = path || ';'
return path
end
if pos(translate(elem), translate(path)) = 0 then path = elem || ';' || path
return path
_getenv_: procedure expose env
parse arg envar default
if default = '' then default = envar
var = value(translate(envar),,env)
if var = '' then var = default
return var

114
lib/ant/bin/complete-ant-cmd.pl Executable file
View File

@@ -0,0 +1,114 @@
#!/usr/bin/perl
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# A script to allow Bash or Z-Shell to complete an Ant command-line.
#
# To install for Bash 2.0 or better, add the following to ~/.bashrc:
#
# complete -C complete-ant-cmd.pl ant build.sh
#
# To install for Z-Shell 2.5 or better, add the following to ~/.zshrc:
#
# function ant_complete () {
# local args_line args
# read -l args_line
# set -A args $args_line
# set -A reply $(COMP_LINE=$args_line complete-ant-cmd.pl ${args[1]} $1)
# }
# compctl -K ant_complete ant build.sh
my $cmdLine = "$ENV{'ANT_ARGS'} $ENV{'COMP_LINE'}";
my $antCmd = $ARGV[0];
my $word = $ARGV[1];
my @completions;
if ($word =~ /^-/) {
list(restrict($word, getArguments()));
} elsif ($cmdLine =~ /-(f|file|buildfile)\s+\S*$/) {
list(getBuildFiles($word));
} else {
list(restrict($word, getTargets()));
}
exit(0);
sub list {
for (@_) {
print "$_\n";
}
}
sub restrict {
my ($word, @completions) = @_;
grep(/^\Q$word\E/, @completions);
}
sub getArguments {
qw(-buildfile -debug -emacs -f -file -find -help -listener -logfile
-logger -projecthelp -quiet -verbose -version);
}
sub getBuildFiles {
my ($word) = @_;
grep(/\.xml$/, glob("$word*"));
}
sub getTargets {
# Look for build-file
my $buildFile = 'build.xml';
if ($cmdLine =~ /-(f|file|buildfile)\s+(\S+)(?!.*\s-(f|file|buildfile)\s)/) {
$buildFile = $2;
}
return () unless (-f $buildFile);
# Run "ant -projecthelp -debug" to list targets (-debug is required to get
# "Other targets", i.e. targets without a description). Keep a cache of
# results in a cache-file.
my $cacheFile = $buildFile;
$cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|;
if ((!-e $cacheFile) || (-z $cacheFile) || (-M $buildFile) < (-M $cacheFile)) {
open(CACHE, '>' . $cacheFile) || die "can\'t write $cacheFile: $!\n";
open(HELP, "$antCmd -projecthelp -debug -buildfile '$buildFile'|") || return();
my %targets;
while (<HELP>) {
# Exclude target names starting with dash, because they cannot be
# specified on the command line.
if (/^\s+\+Target:\s+(?!-)(\S+)/) {
$targets{$1}++;
}
}
my @targets = sort keys %targets;
for (@targets) {
print CACHE "$_\n";
}
return @targets;
}
# Read the target-cache
open(CACHE, $cacheFile) || die "can\'t read $cacheFile: $!\n";
my @targets;
while (<CACHE>) {
chop;
s/\r$//; # for Cygwin
push(@targets, $_);
}
close(CACHE);
@targets;
}

131
lib/ant/bin/envset.cmd Normal file
View File

@@ -0,0 +1,131 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SET environment variables
First optional parameter:
; parameters are considered parts of a path variable, semicolons are
appended to each element if not already present
-D parameters are properties for Java or Makefile etc., -D will be
prepended and the parameters will be separated by a space
=D the same as above but equal sign is not required
, parameters should be comma separated in the environment variable
- parameters should be separated by the next parameter
Other values mean that the first parameter is missing and the environment
variable will be set to the space separated parameters
Second parameter: name of the environment variable
Next parameters: values
; implies that the equal sign is considered a part of the parameter and is
not interpreted
-D requires parameters in the form name=value. If the equal sign is not found,
the parameters are changed to name=expanded_name
Other options have optional equal sign. If it is found, only the part after
the equal sign will be oprionally expanded.
If the parameter is the minus sign, the next parameter will not be expanded.
If the parameter is a single dot, it will be replaced with the value of the
environment variable as it existed before envset was invoked.
For other parameters the batch looks for the environment variable with the
same name (in uppercase). If it is found, it forms the expanded_name. If
the environment variable with such a name does not exist, the expanded_name
will hold the parameter name without case conversion.
*/
parse arg mode envar args
equal = 0
sep = ' '
/* Parse command line parameters */
select
when mode='-' then do
sep = envar
parse var args envar args
end
when mode=';' then do
sep = ''
equal = -1
end
when mode='-D' then equal = 1
when mode='=D' then mode = '-D'
when mode=',' then sep = ','
otherwise
args = envar args
envar = mode
mode = ''
end
env = 'OS2ENVIRONMENT'
envar = translate(envar)
orig = value(envar,,env)
newval = ''
expand = 1
/* for each parameter... */
do i = 1 to words(args)
if expand > 0 & word(args, i) = '-' then expand = 0
else call addval word(args, i)
end
/* Optionally enclose path variable by quotes */
if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"'
/* Set the new value, 'SET' cannot be used since it does not allow '=' */
x = value(envar, newval, env)
exit 0
addval: procedure expose sep equal orig expand newval mode env
parse arg var
if var = '.' then expvar = orig
else do
if equal >= 0 then do
parse var var name '=' val
if val = '' then var = name
else var = val
end
if expand = 0 then expvar = var
else expvar = value(translate(var),,env)
if expvar = '' then expvar = var
if equal >= 0 then do
if val = '' then do
parse var expvar key '=' val
if val <> '' then name = key
else do
if equal > 0 then val = key
else name = key
end
end
else val = expvar
if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"'
if val = '' then expvar = name
else expvar = name || '=' || val
end
if mode = '-D' then expvar = '-D' || expvar
if mode = ';' then do
if right(expvar, 1) <> ';' then expvar = expvar || ';'
end
end
if newval = '' then newval = expvar
else newval = newval || sep || expvar
expand = 1
return

30
lib/ant/bin/lcp.bat Normal file
View File

@@ -0,0 +1,30 @@
REM
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM
REM
set _CLASSPATHCOMPONENT=%1
if ""%1""=="""" goto gotAllArgs
shift
:argCheck
if ""%1""=="""" goto gotAllArgs
set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
shift
goto argCheck
:gotAllArgs
set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%

132
lib/ant/bin/runant.pl Executable file
View File

@@ -0,0 +1,132 @@
#!/usr/bin/perl
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#######################################################################
#
# runant.pl
#
# wrapper script for invoking ant in a platform with Perl installed
# this may include cgi-bin invocation, which is considered somewhat daft.
# (slo: that should be a separate file which can be derived from this
# and returns the XML formatted output)
#
# the code is not totally portable due to classpath and directory splitting
# issues. oops. (NB, use File::Spec::Functions will help and the code is
# structured for the catfile() call, but because of perl version funnies
# the code is not included.
#######################################################################
#
# Assumptions:
#
# - the "java" executable/script is on the command path
# - ANT_HOME has been set
# - target platform uses ":" as classpath separator or perl indicates it is dos/win32
# - target platform uses "/" as directory separator.
#be fussy about variables
use strict;
#platform specifics (disabled)
#use File::Spec::Functions;
#turn warnings on during dev; generates a few spurious uninitialised var access warnings
#use warnings;
#and set $debug to 1 to turn on trace info
my $debug = 1;
#######################################################################
#
# check to make sure environment is setup
#
my $HOME = $ENV{ANT_HOME};
if (!$HOME) {
die "\n\nANT_HOME *MUST* be set!\n\n";
}
my $JAVACMD = $ENV{JAVACMD} || "java";
my $onnetware = ($^O eq "NetWare");
my $oncygwin = ($^O eq "cygwin");
#ISSUE: what java wants to split up classpath varies from platform to platform
#and perl is not too hot at hinting which box it is on.
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
my $s = ":";
if (($^O eq "MSWin32") || ($^O eq "dos") || $oncygwin || $onnetware) {
$s = ";";
}
#build up standard classpath
my $localpath = "$HOME/lib/ant-launcher.jar";
#set JVM options and Ant arguments, if any
my @ANT_OPTS = split(" ", $ENV{ANT_OPTS});
my @ANT_ARGS = split(" ", $ENV{ANT_ARGS});
#jikes
if ($ENV{JIKESPATH}) {
push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
}
#construct arguments to java
my @ARGS;
push @ARGS, @ANT_OPTS;
my $CYGHOME = "";
my $classpath = $ENV{CLASSPATH};
if ($oncygwin) {
$localpath = `cygpath --path --windows $localpath`;
chomp ($localpath);
if ($classpath) {
$classpath = `cygpath --path --windows "$classpath"`;
chomp ($classpath);
}
$HOME = `cygpath --path --windows $HOME`;
chomp ($HOME);
$CYGHOME = `cygpath --path --windows $ENV{HOME}`;
chomp ($CYGHOME);
}
push @ARGS, "-classpath", "$localpath";
push @ARGS, "-Dant.home=$HOME";
if ($CYGHOME) {
push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
}
push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
push @ARGS, @ARGV;
if ($classpath) {
if ($onnetware) {
# make classpath literally $CLASSPATH
# this is to avoid pushing us over the 512 character limit
# even skip the ; - that is already in $localpath
push @ARGS, "-lib", "\$CLASSPATH";
} else {
push @ARGS, "-lib", "$classpath";
}
}
print "\n $JAVACMD @ARGS\n\n" if ($debug);
my $returnValue = system $JAVACMD, @ARGS;
if ($returnValue eq 0) {
exit 0;
} else {
# only 0 and 1 are widely recognized as exit values
# so change the exit value to 1
exit 1;
}

105
lib/ant/bin/runant.py Executable file
View File

@@ -0,0 +1,105 @@
#!/usr/bin/python
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""
runant.py
This script is a translation of the runant.pl
It runs ant with/out arguments, it should be quite portable (thanks to
the python os library)
This script has been tested with Python2.0/Win2K
Assumptions:
- the "java" executable/script is on the command path
"""
import os, os.path, string, sys
# Change it to 1 to get extra debug information
debug = 0
#######################################################################
# If ANT_HOME is not set default to script's parent directory
if os.environ.has_key('ANT_HOME'):
ANT_HOME = os.environ['ANT_HOME']
else:
ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
# set ANT_LIB location
ANT_LIB = os.path.join(ANT_HOME, 'lib')
# set JAVACMD (check variables JAVACMD and JAVA_HOME)
JAVACMD = None
if not os.environ.has_key('JAVACMD'):
if os.environ.has_key('JAVA_HOME'):
if not os.path.exists(os.environ['JAVA_HOME']):
print "Warning: JAVA_HOME is not defined correctly."
else:
JAVA_HOME = os.environ['JAVA_HOME']
while JAVA_HOME[0] == JAVA_HOME[-1] == "\"":
JAVA_HOME = JAVA_HOME[1:-1]
JAVACMD = os.path.join(JAVA_HOME, 'bin', 'java')
else:
print "Warning: JAVA_HOME not set."
else:
JAVACMD = os.environ['JAVACMD']
if not JAVACMD:
JAVACMD = 'java'
launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
if not os.path.exists(launcher_jar):
print 'Warning: Unable to locate ant-launcher.jar. Expected to find it in %s' % \
ANT_LIB
# Build up standard classpath (LOCALCLASSPATH)
LOCALCLASSPATH = launcher_jar
if os.environ.has_key('LOCALCLASSPATH'):
LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
ANT_OPTS = ""
if os.environ.has_key('ANT_OPTS'):
ANT_OPTS = os.environ['ANT_OPTS']
OPTS = ""
if os.environ.has_key('JIKESPATH'):
OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH']
ANT_ARGS = ""
if os.environ.has_key('ANT_ARGS'):
ANT_ARGS = os.environ['ANT_ARGS']
CLASSPATH = ""
if os.environ.has_key('CLASSPATH'):
CLASSPATH = "-lib " + os.environ['CLASSPATH']
while JAVACMD[0] == JAVACMD[-1] == "\"":
JAVACMD = JAVACMD[1:-1]
# Builds the commandline
cmdline = ('"%s" %s -classpath %s -Dant.home=%s %s ' + \
'org.apache.tools.ant.launch.Launcher %s %s %s') \
% (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
CLASSPATH, string.join(sys.argv[1:], ' '))
if debug:
print '\n%s\n\n' % (cmdline)
sys.stdout.flush()
# Run the biniou!
os.system(cmdline)

60
lib/ant/bin/runrc.cmd Normal file
View File

@@ -0,0 +1,60 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Run RC file, name is in the first arg, second arg is either PATH
ENV or -r or nothing
*/
parse arg name path rest
if name = '' then do
say 'RC file name is missing'
exit 1
end
if rest \= '' then do
say 'Too many parameters'
exit 1
end
call runit name path
exit 0
runit: procedure
parse arg name path dir
if path \= '' & path \= '-r' then do
dir = value(translate(path),,'OS2ENVIRONMENT')
if dir = '' then return
dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */
end
if dir = '' then dir = directory()
if path = '-r' then do /* recursive call */
subdir = filespec('path', dir)
if subdir \= '\' then do
subdir = left(subdir, length(subdir)-1)
call runit name path filespec('drive', dir) || subdir
end
end
/* Look for the file and run it */
if right(dir, 1) \= '\' then dir = dir || '\'
rcfile = stream(dir || name, 'c', 'query exists')
if rcfile \= '' then interpret 'call "' || rcfile || '"'
return

1743
lib/ant/contributors.xml Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

148
lib/ant/etc/changelog.xsl Normal file
View File

@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:param name="title"/>
<xsl:param name="module"/>
<xsl:param name="cvsweb"/>
<xsl:output method="html" indent="yes" encoding="US-ASCII"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html401/strict.dtd"/>
<!-- Copy standard document elements. Elements that
should be ignored must be filtered by apply-templates
tags. -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="attribute::*[. != '']"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="changelog">
<html>
<head>
<title><xsl:value-of select="$title"/></title>
<style type="text/css">
body, p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 80%;
color: #000000;
background-color: #ffffff;
}
tr, td {
font-family: Verdana, Arial, Helvetica, sans-serif;
background: #eeeee0;
}
td {
padding-left: 20px;
}
.dateAndAuthor {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: left;
background: #a6caf0;
padding-left: 3px;
}
a {
color: #000000;
}
pre {
font-weight: bold;
}
</style>
</head>
<body>
<h1>
<a name="top"><xsl:value-of select="$title"/></a>
</h1>
<p style="text-align: right">Designed for use with <a href="http://ant.apache.org/">Apache Ant</a>.</p>
<hr/>
<table border="0" width="100%" cellspacing="1">
<xsl:apply-templates select=".//entry">
<xsl:sort select="date" data-type="text" order="descending"/>
<xsl:sort select="time" data-type="text" order="descending"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="entry">
<tr>
<td class="dateAndAuthor">
<xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
</td>
</tr>
<tr>
<td>
<pre>
<xsl:apply-templates select="msg"/></pre>
<ul>
<xsl:apply-templates select="file"/>
</ul>
</td>
</tr>
</xsl:template>
<xsl:template match="date">
<i><xsl:value-of select="."/></i>
</xsl:template>
<xsl:template match="time">
<i><xsl:value-of select="."/></i>
</xsl:template>
<xsl:template match="author">
<i>
<a>
<xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
<xsl:value-of select="."/></a>
</i>
</xsl:template>
<xsl:template match="file">
<li>
<a>
<xsl:choose>
<xsl:when test="string-length(prevrevision) = 0 ">
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&amp;content-type=text/x-cvsweb-markup</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&amp;r2=<xsl:value-of select="prevrevision"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a>
</li>
</xsl:template>
<!-- Any elements within a msg are processed,
so that we can preserve HTML tags. -->
<xsl:template match="msg">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,367 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:param name="output.dir" select="'.'"/>
<xsl:param name="basedir" select="'.'"/>
<!--
Matches the root element of the data and starts the generation.
-->
<xsl:template match="checkstyle">
<!-- create the sorted.html with the data -->
<redirect:write file="{$output.dir}/sorted.html">
<xsl:call-template name="sorted.html"/>
</redirect:write>
<!-- create the stylesheet.css with layout -->
<redirect:write file="{$output.dir}/sorted.css">
<xsl:call-template name="sorted.css"/>
</redirect:write>
<!-- create the switch.js for collepsing the data -->
<redirect:write file="{$output.dir}/switch.js">
<xsl:call-template name="switch.js"/>
</redirect:write>
</xsl:template>
<!--
Generates the HTML page with the data.
-->
<xsl:template name="sorted.html">
<html>
<head>
<title>CheckStyle Audit</title>
<script language="JavaScript" src="switch.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="sorted.css"/>
</head>
<body onload="javascript:openFirst();">
<h1>CheckStyle Audit</h1>
<p>Designed for use with
<a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and
<a href='http://ant.apache.org/'>Ant</a>.
</p>
<xsl:apply-templates select="." mode="navigation"/>
<xsl:apply-templates select="." mode="data"/>
</body>
</html>
</xsl:template>
<!--
Key for detecting duplicate CheckModules
-->
<xsl:key name="module" match="file/error" use="@source"/>
<!--
Generates the navagation bar.
-->
<xsl:template match="checkstyle" mode="navigation">
<ul id="navigation">
<xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]">
<xsl:sort select="@source"/>
<xsl:variable name="last-index">
<xsl:call-template name="last-index-of">
<xsl:with-param name="txt" select="@source"/>
<xsl:with-param name="delimiter" select="'.'"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<li><a href="javascript:change('{@source}');">
<xsl:value-of select="substring(@source, $last-index+1)"/>
</a></li>
</xsl:for-each>
</ul>
</xsl:template>
<!--
Generates the data part.
-->
<xsl:template match="checkstyle" mode="data">
<div id="content">
<xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]">
<xsl:sort select="@source"/>
<div class="hideable" id="{@source}">
<xsl:variable name="module" select="@source"/>
<h2><xsl:value-of select="@source"/></h2>
<xsl:call-template name="data">
<xsl:with-param name="filter" select="$module"/>
</xsl:call-template>
</div>
</xsl:for-each>
</div>
</xsl:template>
<!--
Generates the content table for the given check module.
@param filter full qualified module name
-->
<xsl:template name="data">
<xsl:param name="filter"/>
<table>
<tr>
<th>file</th>
<th>line</th>
<th>severity</th>
<th>message</th>
</tr>
<xsl:for-each select="/checkstyle/file">
<xsl:choose>
<xsl:when test="error/@source=$filter">
<xsl:call-template name="data-rows">
<xsl:with-param name="node" select="."/>
<xsl:with-param name="filter" select="$filter"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</table>
</xsl:template>
<!--
Generates the data rows for the current check module.
Ignores errors in the current file from other modules.
@param node the file with the errors
@param filter full qualified module name
-->
<xsl:template name="data-rows">
<xsl:param name="node"/>
<xsl:param name="filter"/>
<xsl:for-each select="$node/error">
<xsl:choose>
<xsl:when test="@source=$filter">
<tr>
<!-- Hide the basdir. First char of the result is a path separator so remove that. -->
<td><xsl:value-of select="substring(substring-after($node/@name, $basedir),2)"/></td>
<td><xsl:value-of select="@line"/></td>
<td><xsl:value-of select="@severity"/></td>
<td><xsl:value-of select="@message"/></td>
</tr>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!--
Generates the CSS with the layout instructions.
Generated so this XSL is the single source of the whole report.
-->
<xsl:template name="sorted.css">
body {
font:normal 80% arial,helvetica,sanserif;
color: black;
background-color: white;
margin: 0;
padding: 1em;
min-width: 41em;
}
h1 {
font-weight:bold;
font-size:140%;
margin: 0 0 0.7em;
padding: 0.3em;
text-align: center;
background-color: #eee;
border: 2px ridge silver;
}
html<xsl:text disable-output-escaping="yes">&gt;</xsl:text>body h1 {
border-color: gray;
}
ul#navigation {
font-size: 0.83em;
float: left; width: 18em;
margin: 0 0 1.2em; padding: 0;
border: 1px dashed silver;
}
ul#navigation li {
list-style: none;
margin: 0; padding: 0.2em;
}
ul#navigation a {
display: block;
padding: 0.2em;
font-weight: bold;
}
ul#navigation a:link {
color: black; background-color: #eee;
}
ul#navigation a:visited {
color: #666; background-color: #eee;
}
ul#navigation a:hover {
color: red; background-color: white;
}
ul#navigation a:active {
color: white; background-color: gray;
}
div#content {
margin: 0 1em 1em 16em;
padding: 0 1em;
}
* html div#content {
height: 1em; /* Workaround 3-Pixel-Bug of Internet Explorers */
}
div#content h2 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
div#content p {
font-size: 1em;
margin: 1em 0;
}
table {
width:100%;
border-collapse:collapse;
}
table td, table th {
border:1px solid #000;
padding:3px 7px 2px 7px;
}
table th {
font-weight:bold;
background: #ccc;
color: black;
}
table tr:nth-child(odd) td {
background: #efefef;
}
table tr:nth-child(even) td {
background: #fff;
}
</xsl:template>
<!--
Generates the JavaScript for the dynamic style.
Generated so this XSL is the single source of the whole report.
-->
<xsl:template name="switch.js">
/*
* Hides all "hideable" div-containers
*/
function hideAll() {
allElements = document.getElementsByTagName("div");
for (i = 0; i <xsl:text disable-output-escaping="yes">&lt;</xsl:text> allElements.length; i++) {
if (allElements[i].className=="hideable") {
allElements[i].style.display="none";
}
}
return;
}
/*
* Shows one div-container and hides the other.
* @param id id of the element to show
*/
function change(id) {
hideAll();
e = document.getElementById(id);
if (e.style.display=="none") {
e.style.display="";
}
window.scrollTo(0, 0);
return;
}
/*
* Shows only the first data row.
* Used in body:onload so the user could directly see some messages.
*/
function openFirst() {
hideAll();
for (i = 0; i <xsl:text disable-output-escaping="yes">&lt;</xsl:text> allElements.length; i++) {
if (allElements[i].className=="hideable") {
allElements[i].style.display="";
return;
}
}
return;
}
</xsl:template>
<!--
Calculates the index of the last occurence of a substring in a string.
@param txt the whole string in which to search
@delimiter the substring to search
-->
<xsl:template name="last-index-of">
<xsl:param name="txt"/>
<xsl:param name="remainder" select="$txt"/>
<xsl:param name="delimiter" select="' '"/>
<xsl:choose>
<xsl:when test="contains($remainder, $delimiter)">
<xsl:call-template name="last-index-of">
<xsl:with-param name="txt" select="$txt"/>
<xsl:with-param name="remainder" select="substring-after($remainder, $delimiter)"/>
<xsl:with-param name="delimiter" select="$delimiter"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="lastIndex" select="string-length(substring($txt, 1, string-length($txt)-string-length($remainder)))+1"/>
<xsl:choose>
<xsl:when test="string-length($remainder)=0">
<xsl:value-of select="string-length($txt)"/>
</xsl:when>
<xsl:when test="$lastIndex>0">
<xsl:value-of select="($lastIndex - string-length($delimiter))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,299 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:param name="output.dir" select="'.'"/>
<xsl:param name="basedir" select="'.'"/>
<xsl:template match="checkstyle">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-summary.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="overview"/>
</redirect:write>
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
<!-- process all files -->
<xsl:apply-templates select="file[count(error) != 0]"/>
</xsl:template>
<xsl:template name="index.html">
<html>
<head>
<title>CheckStyle Audit</title>
</head>
<frameset cols="20%,80%">
<frame src="allclasses-frame.html" name="fileListFrame"/>
<frame src="overview-frame.html" name="fileFrame"/>
</frameset>
<noframes>
<h2>Frame Alert</h2>
<p>
This document is designed to be viewed using the frames feature.
If you see this message, you are using a non-frame-capable web client.
</p>
</noframes>
</html>
</xsl:template>
<xsl:template name="pageHeader">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
</tr>
<tr>
<td class="text-align:right">Designed for use with
<a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and
<a href='http://ant.apache.org/'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<xsl:template match="checkstyle" mode="overview">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<!-- page header -->
<xsl:call-template name="pageHeader"/>
<!-- Summary part -->
<xsl:apply-templates select="." mode="summary"/>
<hr size="1" width="100%" align="left"/>
<!-- File list part -->
<xsl:apply-templates select="." mode="filelist"/>
</body>
</html>
</xsl:template>
<xsl:template name="stylesheet.css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.oddrow td {
background: #efefef;
}
.evenrow td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</xsl:template>
<!--
Creates an all-classes.html file that contains a link to all files.
-->
<xsl:template match="checkstyle" mode="all.classes">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h2>Files</h2>
<p>
<table width="100%">
<!-- For each file create its part -->
<xsl:apply-templates select="file[count(error) != 0]" mode="all.classes">
<xsl:sort select="substring-after(@name, $basedir)"/>
</xsl:apply-templates>
</table>
</p>
</body>
</html>
</xsl:template>
<xsl:template match="checkstyle" mode="filelist">
<h3>Files</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Name</th>
<th>Errors</th>
</tr>
<xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
<xsl:sort select="count(error)" order="descending" data-type="number"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="file" mode="filelist">
<tr>
<xsl:call-template name="alternated-row"/>
<td nowrap="nowrap">
<a>
<xsl:attribute name="href">
<xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="substring-after(@name, $basedir)"/>
</a>
</td>
<td><xsl:value-of select="count(error)"/></td>
</tr>
</xsl:template>
<xsl:template match="file" mode="all.classes">
<tr>
<td nowrap="nowrap">
<a target="fileFrame">
<xsl:attribute name="href">
<xsl:text>files/</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="substring-after(@name, $basedir)"/>
</a>
</td>
</tr>
</xsl:template>
<!--
transform string like a/b/c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<!-- Convert a windows path '\' to a unix path '/' for further processing. -->
<xsl:variable name="path2" select="translate($path,'\','/')"/>
<xsl:if test="contains($path2,'/')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path2,'/')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path2,'/')) and not($path2 = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="file">
<redirect:write file="{$output.dir}/files/{substring-after(@name, $basedir)}.html">
<html>
<head>
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href"><xsl:call-template name="path"><xsl:with-param name="path" select="substring-after(@name, $basedir)"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
</link>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<h3>File <xsl:value-of select="substring-after(@name, $basedir)"/></h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Error Description</th>
<th>Line:Column</th>
</tr>
<xsl:for-each select="error">
<tr>
<xsl:call-template name="alternated-row"/>
<td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
<td align="center"><xsl:value-of select="@line"/><xsl:if test="@column">:<xsl:value-of select="@column"/></xsl:if></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</redirect:write>
</xsl:template>
<xsl:template match="checkstyle" mode="summary">
<h3>Summary</h3>
<xsl:variable name="fileCount" select="count(file)"/>
<xsl:variable name="errorCount" select="count(file/error)"/>
<xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Total Files</th>
<th>Files With Errors</th>
<th>Errors</th>
</tr>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="$fileCount"/></td>
<td><xsl:value-of select="$fileErrorCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</table>
</xsl:template>
<xsl:template name="alternated-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
<xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:strip-space elements="checkstyle"/>
<xsl:preserve-space elements="file"/>
<xsl:output method="text"/>
<xsl:template match="checkstyle/file/error">
<xsl:value-of select="../@name"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="@line"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="@column"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@message"/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:output method="xml" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:param name="output.dir" select="'.'"/>
<xsl:param name="basedir" select="'.'"/>
<xsl:template match="checkstyle">
<document>
<properties>
<title>Checkstyle Audit</title>
</properties>
<body>
<xsl:apply-templates select="." mode="summary"/>
<!-- File list part -->
<xsl:apply-templates select="." mode="filelist"/>
<xsl:apply-templates select="file[count(error) != 0]"/>
</body>
</document>
</xsl:template>
<xsl:template match="checkstyle" mode="filelist">
<section name="Files">
<table>
<tr>
<th>Name</th>
<th>Errors</th>
</tr>
<xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
<xsl:sort select="count(error)" order="descending" data-type="number"/>
</xsl:apply-templates>
</table>
</section>
</xsl:template>
<xsl:template match="file" mode="filelist">
<tr>
<xsl:call-template name="alternated-row"/>
<td nowrap="nowrap">
<a>
<xsl:attribute name="href">
<xsl:text>files</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="substring-after(@name, $basedir)"/>
</a>
</td>
<td><xsl:value-of select="count(error)"/></td>
</tr>
</xsl:template>
<xsl:template match="file">
<redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml">
<document>
<properties>
<title>Checkstyle Audit</title>
</properties>
<body>
<section name="Details for {substring-after(@name, $basedir)}">
<table>
<tr>
<th>Error Description</th>
<th>Line</th>
</tr>
<xsl:for-each select="error">
<tr>
<xsl:call-template name="alternated-row"/>
<td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
<td><xsl:value-of select="@line"/></td>
</tr>
</xsl:for-each>
</table>
</section>
</body>
</document>
</redirect:write>
</xsl:template>
<xsl:template match="checkstyle" mode="summary">
<section name="Summary">
<xsl:variable name="fileCount" select="count(file)"/>
<xsl:variable name="errorCount" select="count(file/error)"/>
<xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
<table>
<tr>
<th>Files</th>
<th>Files With Errors</th>
<th>Errors</th>
</tr>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="$fileCount"/></td>
<td><xsl:value-of select="$fileErrorCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</table>
</section>
</xsl:template>
<xsl:template name="alternated-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
<xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,487 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Sample stylesheet to be used with JProbe 3.0 XML output.
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
It is best used with JProbe Coverage Ant task that gives you the benefit
of a reference classpath so that you have the list of classes/methods
that are not used at all in a given classpath.
-->
<!-- default output directory is current directory -->
<xsl:param name="output.dir" select="'.'"/>
<!-- ======================================================================
Root element
======================================================================= -->
<xsl:template match="/snapshot">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
</redirect:write>
<!-- create the all-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
<!-- process all packages -->
<xsl:apply-templates select="./package" mode="write"/>
</xsl:template>
<!-- =======================================================================
Frameset definition. Entry point for the report.
3 frames: packageListFrame, classListFrame, classFrame
======================================================================= -->
<xsl:template name="index.html">
<html>
<head><title>Coverage Results.</title></head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="overview-frame.html" name="packageListFrame"/>
<frame src="allclasses-frame.html" name="classListFrame"/>
</frameset>
<frame src="overview-summary.html" name="classFrame"/>
</frameset>
<noframes>
<h2>Frame Alert</h2>
<p>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
</p>
</noframes>
</html>
</xsl:template>
<!-- =======================================================================
Stylesheet CSS used
======================================================================= -->
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</xsl:template>
<!-- =======================================================================
List of all classes in all packages
This will be the first page in the classListFrame
======================================================================= -->
<xsl:template match="snapshot" mode="all.classes">
<html>
<head>
<xsl:call-template name="create.stylesheet.link"/>
</head>
<body>
<h2>Classes</h2>
<table width="100%">
<xsl:for-each select="package/class">
<xsl:sort select="@name"/>
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
<xsl:variable name="link">
<xsl:if test="not($package.name='')">
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
</xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:variable>
<tr>
<td nowrap="nowrap">
<a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<!-- list of all packages -->
<xsl:template match="snapshot" mode="all.packages">
<html>
<head>
<xsl:call-template name="create.stylesheet.link"/>
</head>
<body>
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
<h2>Packages</h2>
<table width="100%">
<xsl:for-each select="package">
<xsl:sort select="@name" order="ascending"/>
<tr>
<td nowrap="nowrap">
<a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame">
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<!-- overview of statistics in packages -->
<xsl:template match="snapshot" mode="overview.packages">
<html>
<head>
<xsl:call-template name="create.stylesheet.link"/>
</head>
<body onload="open('allclasses-frame.html','classListFrame')">
<xsl:call-template name="pageHeader"/>
<h3>Summary</h3>
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<tr>
<!--th width="10%" nowrap="nowrap">Date</th>
<th width="10%" nowrap="nowrap">Elapsed time</th-->
<th width="10%" nowrap="nowrap">Reported Classes</th>
<th width="10%" nowrap="nowrap">Methods Hit</th>
<th width="10%" nowrap="nowrap">Lines Hit</th>
</tr>
<tr class="a">
<!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td>
<td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td-->
<td><xsl:value-of select="count(package/class)"/></td>
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
To ensure accurate test runs on Java applications, developers need to know how much of
the code has been tested, and where to find any untested code. Coverage helps you
locate untested code, and measure precisely how much code has been exercised.
The result is a higher quality application in a shorter period of time.
<p/>
</td>
</tr>
</table>
<h3>Packages</h3>
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<xsl:apply-templates select="package[1]" mode="stats.header"/>
<!-- display packages and sort them via their coverage rate -->
<xsl:for-each select="package">
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
<tr>
<xsl:call-template name="alternate-row"/>
<td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td>
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
</tr>
</xsl:for-each>
</table>
<xsl:call-template name="pageFooter"/>
</body>
</html>
</xsl:template>
<!--
detailed info for a package. It will output the list of classes
, the summary page, and the info for each class
-->
<xsl:template match="package" mode="write">
<xsl:variable name="package.dir">
<xsl:if test="not(@name = '')"><xsl:value-of select="translate(@name,'.','/')"/></xsl:if>
<xsl:if test="@name = ''">.</xsl:if>
</xsl:variable>
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:apply-templates select="." mode="classes.list"/>
</redirect:write>
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:apply-templates select="." mode="package.summary"/>
</redirect:write>
<!-- for each class, creates a @name.html -->
<xsl:for-each select="class">
<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
<xsl:apply-templates select="." mode="class.details"/>
</redirect:write>
</xsl:for-each>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template match="package" mode="classes.list">
<html>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="@name"/>
</xsl:call-template>
</HEAD>
<BODY>
<table width="100%">
<tr>
<td nowrap="nowrap">
<H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="@name"/></a></H2>
</td>
</tr>
</table>
<H2>Classes</H2>
<TABLE WIDTH="100%">
<xsl:for-each select="class">
<xsl:sort select="@name"/>
<tr>
<td nowrap="nowrap">
<a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
</TABLE>
</BODY>
</html>
</xsl:template>
<!-- summary of a package -->
<xsl:template match="package" mode="package.summary">
<HTML>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="@name"/>
</xsl:call-template>
</HEAD>
<!-- when loading this package, it will open the classes into the frame -->
<BODY onload="open('package-frame.html','classListFrame')">
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="@name"/></h3>
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<xsl:apply-templates select="." mode="stats.header"/>
<xsl:apply-templates select="." mode="stats"/>
</table>
<xsl:if test="count(class) &gt; 0">
<H3>Classes</H3>
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<xsl:apply-templates select="." mode="stats.header"/>
<xsl:apply-templates select="class" mode="stats">
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
</xsl:apply-templates>
</table>
</xsl:if>
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
</xsl:template>
<!-- details of a class -->
<xsl:template match="class" mode="class.details">
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
<HTML>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$package.name"/>
</xsl:call-template>
</HEAD>
<BODY>
<xsl:call-template name="pageHeader"/>
<H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
<!-- class summary -->
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<xsl:apply-templates select="." mode="stats.header"/>
<xsl:apply-templates select="." mode="stats"/>
</table>
<!-- details of methods -->
<H3>Methods</H3>
<table class="log" cellpadding="5" cellspacing="2" width="100%">
<xsl:apply-templates select="method[1]" mode="stats.header"/>
<xsl:apply-templates select="method" mode="stats">
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
</xsl:apply-templates>
</table>
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
</xsl:template>
<!-- Page Header -->
<xsl:template name="pageHeader">
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bannercell" rowspan="2">
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
<td style="text-align:right"><h2>Source Code Coverage</h2></td>
</tr>
<tr>
<td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<!-- Page Footer -->
<xsl:template name="pageFooter">
</xsl:template>
<xsl:template name="table.header">
<tr>
<th width="80%">Name</th>
<th width="10%" nowrap="nowrap">Methods Hit</th>
<th width="10%" nowrap="nowrap">Lines Hit</th>
</tr>
</xsl:template>
<xsl:template match="method" mode="stats.header">
<tr>
<th width="90%">Name</th>
<th width="10%" nowrap="nowrap">Lines Hit</th>
</tr>
</xsl:template>
<xsl:template match="method" mode="stats">
<tr>
<xsl:call-template name="alternate-row"/>
<td><xsl:value-of select="@name"/></td>
<td>
<xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/>
</td>
</tr>
</xsl:template>
<xsl:template match="package|class" mode="stats.header">
<tr>
<th width="80%">Name</th>
<th width="10%" nowrap="nowrap">Methods Hit</th>
<th width="10%" nowrap="nowrap">Lines Hit</th>
</tr>
</xsl:template>
<xsl:template match="package|class" mode="stats">
<tr>
<xsl:call-template name="alternate-row"/>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
</tr>
</xsl:template>
<!--
transform string like a.b.c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
<xsl:param name="package.name"/>
<LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- alternated row style -->
<xsl:template name="alternate-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,485 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Sample stylesheet to be used with JDepend XML output.
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-->
<xsl:param name="output.dir" select="'.'"/>
<xsl:template match="JDepend">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-packages.html">
<xsl:apply-templates select="." mode="packages.details"/>
</redirect:write>
<!-- create the overview-cycles.html at the root -->
<redirect:write file="{$output.dir}/overview-cycles.html">
<xsl:apply-templates select="." mode="cycles.details"/>
</redirect:write>
<!-- create the overview-cycles.html at the root -->
<redirect:write file="{$output.dir}/overview-explanations.html">
<xsl:apply-templates select="." mode="explanations"/>
</redirect:write>
<!-- create the all-packages.html at the root -->
<redirect:write file="{$output.dir}/all-packages.html">
<xsl:apply-templates select="Packages" mode="all.packages"/>
</redirect:write>
<!-- create the all-cycles.html at the root -->
<redirect:write file="{$output.dir}/all-cycles.html">
<xsl:apply-templates select="Cycles" mode="all.cycles"/>
</redirect:write>
</xsl:template>
<xsl:template name="index.html">
<html>
<head>
<title>JDepend Analysis</title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="all-packages.html" name="packageListFrame"/>
<frame src="all-cycles.html" name="classListFrame"/>
</frameset>
<frame src="overview-summary.html" name="classFrame"/>
</frameset>
<noframes>
<h2>Frame Alert</h2>
<p>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
</p>
</noframes>
</html>
</xsl:template>
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
}
table.details tr td{
background:#eeeee0;
}
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
margin-left:2em;
margin-right:2em;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
h4 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h5 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h6 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
.Error {
font-weight:bold; color:red;
}
.Failure {
font-weight:bold; color:purple;
}
.Properties {
text-align:right;
}
</style>
</xsl:template>
<xsl:template match="JDepend" mode="overview.packages">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<table width="100%"><tr align="left"><h2>Summary</h2><td>
</td><td align="right">
[summary]
[<a href="overview-packages.html">packages</a>]
[<a href="overview-cycles.html">cycles</a>]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
<table width="100%" class="details">
<tr>
<th>Package</th>
<th>Total Classes</th>
<th><a href="overview-explanations.html#EXnumber">Abstract Classes</a></th>
<th><a href="overview-explanations.html#EXnumber">Concrete Classes</a></th>
<th><a href="overview-explanations.html#EXafferent">Afferent Couplings</a></th>
<th><a href="overview-explanations.html#EXefferent">Efferent Couplings</a></th>
<th><a href="overview-explanations.html#EXabstractness">Abstractness</a></th>
<th><a href="overview-explanations.html#EXinstability">Instability</a></th>
<th><a href="overview-explanations.html#EXdistance">Distance</a></th>
</tr>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<tr>
<td align="left">
<a>
<xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
<td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
<td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
<td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
<td align="right"><xsl:value-of select="Stats/Ca"/></td>
<td align="right"><xsl:value-of select="Stats/Ce"/></td>
<td align="right"><xsl:value-of select="Stats/A"/></td>
<td align="right"><xsl:value-of select="Stats/I"/></td>
<td align="right"><xsl:value-of select="Stats/D"/></td>
</tr>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) &gt; 0">
<tr>
<td align="left">
<xsl:value-of select="@name"/>
</td>
<td align="left" colspan="8"><xsl:value-of select="error"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="JDepend" mode="packages.details">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<table width="100%"><tr align="left"><h2>Packages</h2><td>
</td><td align="right">
[<a href="overview-summary.html">summary</a>]
[packages]
[<a href="overview-cycles.html">cycles</a>]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/></a></h3>
<table width="100%"><tr>
<td><a href="overview-explanations.html#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
<td><a href="overview-explanations.html#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
<td><a href="overview-explanations.html#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td>
<td><a href="overview-explanations.html#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
<td><a href="overview-explanations.html#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
</tr></table>
<table width="100%" class="details">
<tr>
<th>Abstract Classes</th>
<th>Concrete Classes</th>
<th>Used by Packages</th>
<th>Uses Packages</th>
</tr>
<tr>
<td valign="top" width="25%">
<xsl:if test="count(AbstractClasses/Class)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="AbstractClasses/Class">
<xsl:value-of select="node()"/><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(ConcreteClasses/Class)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="ConcreteClasses/Class">
<xsl:value-of select="node()"/><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(UsedBy/Package)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="UsedBy/Package">
<a>
<xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute>
<xsl:value-of select="node()"/>
</a><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(DependsUpon/Package)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="DependsUpon/Package">
<a>
<xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute>
<xsl:value-of select="node()"/>
</a><br/>
</xsl:for-each>
</td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
<!-- this is often a long listing; provide a lower navigation table also -->
<table width="100%"><tr align="left"><td></td><td align="right">
[<a href="overview-summary.html">summary</a>]
[packages]
[<a href="overview-cycles.html">cycles</a>]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
</body>
</html>
</xsl:template>
<xsl:template match="JDepend" mode="cycles.details">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<table width="100%"><tr align="left"><h2>Cycles</h2><td>
</td><td align="right">
[<a href="overview-summary.html">summary</a>]
[<a href="overview-packages.html">packages</a>]
[cycles]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
<!--<table width="100%"><tr><td>
</td><td align="right">
[<a href="#NVsummary">summary</a>]
[<a href="#NVpackages">packages</a>]
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table> -->
<xsl:if test="count(Cycles/Package) = 0">
<p>There are no cyclic dependancies.</p>
</xsl:if>
<xsl:for-each select="Cycles/Package">
<h3><a><xsl:attribute name="name">#CY<xsl:value-of select="@Name"/></xsl:attribute><xsl:value-of select="@Name"/></a></h3><p>
<xsl:for-each select="Package">
<xsl:value-of select="."/><br/>
</xsl:for-each></p>
</xsl:for-each>
<!-- this is often a long listing; provide a lower navigation table also -->
<table width="100%"><tr align="left"><td></td><td align="right">
[<a href="overview-summary.html">summary</a>]
[<a href="overview-packages.html">packages</a>]
[cycles]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
</body>
</html>
</xsl:template>
<xsl:template match="JDepend" mode="explanations">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<table width="100%"><tr align="left"><h2>Explanations</h2><td>
</td><td align="right">
[<a href="overview-summary.html">summary</a>]
[<a href="overview-packages.html">packages</a>]
[<a href="overview-cycles.html">cycles</a>]
[explanations]
</td></tr></table>
<p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
<h3><a name="EXnumber">Number of Classes</a></h3>
<p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
<h3><a name="EXafferent">Afferent Couplings</a></h3>
<p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
<h3><a name="EXefferent">Efferent Couplings</a></h3>
<p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
<h3><a name="EXabstractness">Abstractness</a></h3>
<p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
<p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
<h3><a name="EXinstability">Instability</a></h3>
<p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
<p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
<h3><a name="EXdistance">Distance</a></h3>
<p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
<p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
<p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
</body>
</html>
</xsl:template>
<!--
Creates an html file that contains a link to all package links in overview-packages.html.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="JDepend/Packages" mode="all.packages">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<table width="100%"><tr align="left"><td></td><td nowrap="nowrap" align="right">
[<a href="overview-summary.html" target="classFrame">summary</a>]
[<a href="overview-packages.html" target="classFrame">packages</a>]
[<a href="overview-cycles.html" target="classFrame">cycles</a>]
[<a href="overview-explanations.html" target="classFrame">explanations</a>]
</td></tr></table>
<h2>Packages</h2>
<table width="100%">
<xsl:apply-templates select="Package[count(error)=0]" mode="all.packages.link">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Package[count(error) &gt; 0]" mode="all.packages.nolink">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="JDepend/Packages/Package" mode="all.packages.link">
<tr>
<td nowrap="nowrap">
<a href="overview-packages.html#PK{@name}" target="classFrame">
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:template>
<!--
I do not know JDepend enough to know if every error results in a non-analyzed package,
but that is how I am presenting it to the viewer. This may need to change.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="JDepend/Packages/Package" mode="all.packages.nolink">
<tr>
<td nowrap="nowrap">
Not Analyzed: <xsl:value-of select="@name"/>
</td>
</tr>
</xsl:template>
<!--
Creates an html file that contains a link to all package links in overview-cycles.html.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="JDepend/Cycles" mode="all.cycles">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<table width="100%"><tr align="left"><td></td><td nowrap="nowrap" align="right">
[<a href="overview-summary.html" target="classFrame">summary</a>]
[<a href="overview-packages.html" target="classFrame">packages</a>]
[<a href="overview-cycles.html" target="classFrame">cycles</a>]
[<a href="overview-explanations.html" target="classFrame">explanations</a>]
</td></tr></table>
<h2>Cycles</h2>
<table width="100%">
<xsl:apply-templates select="Package" mode="all.cycles">
<xsl:sort select="@Name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="JDepend/Cycles/Package" mode="all.cycles">
<tr>
<td nowrap="nowrap">
<a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a>
</td>
</tr>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>JDepend Analysis</h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
</xsl:stylesheet>

276
lib/ant/etc/jdepend.xsl Normal file
View File

@@ -0,0 +1,276 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:template match="JDepend">
<html>
<head>
<title>JDepend Analysis</title>
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
}
table.details tr td{
background:#eeeee0;
}
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
margin-left:2em;
margin-right:2em;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
h4 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h5 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h6 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
.Error {
font-weight:bold; color:red;
}
.Failure {
font-weight:bold; color:purple;
}
.Properties {
text-align:right;
}
</style>
</head>
<body>
<!--h1>JDepend Report</h1>
<ul>
<xsl:for-each select="./Packages/Package">
<xsl:sort select="@name"/>
<li><xsl:value-of select="@name"/></li>
</xsl:for-each>
</ul-->
<h1><a name="top">JDepend Analysis</a></h1>
<p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="https://ant.apache.org">Ant</a>.</p>
<hr size="2" />
<table width="100%"><tr><td>
<a name="NVsummary"><h2>Summary</h2></a>
</td><td align="right">
[<a href="#NVsummary">summary</a>]
[<a href="#NVpackages">packages</a>]
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table>
<table width="100%" class="details">
<tr>
<th>Package</th>
<th>Total Classes</th>
<th><a href="#EXnumber">Abstract Classes</a></th>
<th><a href="#EXnumber">Concrete Classes</a></th>
<th><a href="#EXafferent">Afferent Couplings</a></th>
<th><a href="#EXefferent">Efferent Couplings</a></th>
<th><a href="#EXabstractness">Abstractness</a></th>
<th><a href="#EXinstability">Instability</a></th>
<th><a href="#EXdistance">Distance</a></th>
</tr>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<tr>
<td align="left">
<a>
<xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
<td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
<td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
<td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
<td align="right"><xsl:value-of select="Stats/Ca"/></td>
<td align="right"><xsl:value-of select="Stats/Ce"/></td>
<td align="right"><xsl:value-of select="Stats/A"/></td>
<td align="right"><xsl:value-of select="Stats/I"/></td>
<td align="right"><xsl:value-of select="Stats/D"/></td>
</tr>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) &gt; 0">
<tr>
<td align="left">
<xsl:value-of select="@name"/>
</td>
<td align="left" colspan="8"><xsl:value-of select="error"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
<table width="100%"><tr><td>
<a name="NVpackages"><h2>Packages</h2></a>
</td><td align="right">
[<a href="#NVsummary">summary</a>]
[<a href="#NVpackages">packages</a>]
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/></a></h3>
<table width="100%"><tr>
<td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
<td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
<td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td>
<td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td>
<td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td>
</tr></table>
<table width="100%" class="details">
<tr>
<th>Abstract Classes</th>
<th>Concrete Classes</th>
<th>Used by Packages</th>
<th>Uses Packages</th>
</tr>
<tr>
<td valign="top" width="25%">
<xsl:if test="count(AbstractClasses/Class)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="AbstractClasses/Class">
<xsl:value-of select="node()"/><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(ConcreteClasses/Class)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="ConcreteClasses/Class">
<xsl:value-of select="node()"/><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(UsedBy/Package)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="UsedBy/Package">
<a>
<xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
<xsl:value-of select="node()"/>
</a><br/>
</xsl:for-each>
</td>
<td valign="top" width="25%">
<xsl:if test="count(DependsUpon/Package)=0">
<i>None</i>
</xsl:if>
<xsl:for-each select="DependsUpon/Package">
<a>
<xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute>
<xsl:value-of select="node()"/>
</a><br/>
</xsl:for-each>
</td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
<table width="100%"><tr><td>
<a name="NVcycles"><h2>Cycles</h2></a>
</td><td align="right">
[<a href="#NVsummary">summary</a>]
[<a href="#NVpackages">packages</a>]
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table>
<xsl:if test="count(Cycles/Package) = 0">
<p>There are no cyclic dependancies.</p>
</xsl:if>
<xsl:for-each select="Cycles/Package">
<h3><xsl:value-of select="@Name"/></h3><p>
<xsl:for-each select="Package">
<xsl:value-of select="."/><br/>
</xsl:for-each></p>
</xsl:for-each>
<table width="100%"><tr><td>
<a name="NVexplanations"><h2>Explanations</h2></a>
</td><td align="right">
[<a href="#NVsummary">summary</a>]
[<a href="#NVpackages">packages</a>]
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table>
<p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
<h3><a name="EXnumber">Number of Classes</a></h3>
<p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
<h3><a name="EXafferent">Afferent Couplings</a></h3>
<p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p>
<h3><a name="EXefferent">Efferent Couplings</a></h3>
<p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p>
<h3><a name="EXabstractness">Abstractness</a></h3>
<p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
<p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
<h3><a name="EXinstability">Instability</a></h3>
<p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
<p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
<h3><a name="EXdistance">Distance</a></h3>
<p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
<p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
<p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,745 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.lib.Redirect"
xmlns:string="xalan://java.lang.String"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","/>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Sample stylesheet to be used with Ant JUnitReport output.
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-->
<xsl:param name="output.dir" select="'.'"/>
<xsl:template match="testsuites">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
</redirect:write>
<!-- create the all-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
<!-- process all packages -->
<xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:call-template name="package">
<xsl:with-param name="name" select="@package"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="package">
<xsl:param name="name"/>
<xsl:variable name="package.dir">
<xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
<xsl:if test="$name = ''">.</xsl:if>
</xsl:variable>
<!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:call-template name="classes.list">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:call-template name="package.summary">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
<xsl:for-each select="/testsuites/testsuite[@package = $name]">
<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
<xsl:apply-templates select="." mode="class.details"/>
</redirect:write>
<xsl:if test="string-length(./system-out)!=0">
<redirect:write file="{$output.dir}/{$package.dir}/{@name}-out.html">
<html>
<head>
<title>Standard Output from <xsl:value-of select="@name"/></title>
</head>
<body>
<pre><xsl:value-of select="./system-out"/></pre>
</body>
</html>
</redirect:write>
</xsl:if>
<xsl:if test="string-length(./system-err)!=0">
<redirect:write file="{$output.dir}/{$package.dir}/{@name}-err.html">
<html>
<head>
<title>Standard Error from <xsl:value-of select="@name"/></title>
</head>
<body>
<pre><xsl:value-of select="./system-err"/></pre>
</body>
</html>
</redirect:write>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
<html>
<head>
<title>Unit Test Results.</title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="overview-frame.html" name="packageListFrame"/>
<frame src="allclasses-frame.html" name="classListFrame"/>
</frameset>
<frame src="overview-summary.html" name="classFrame"/>
<noframes>
<h2>Frame Alert</h2>
<p>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
</p>
</noframes>
</frameset>
</html>
</xsl:template>
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, table tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
}
table.details tr td{
background:#eeeee0;
}
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
h4 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h5 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h6 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
.Error {
font-weight:bold; color:red;
}
.Failure {
font-weight:bold; color:purple;
}
.Properties {
text-align:right;
}
</xsl:template>
<!-- ======================================================================
This page is created for every testsuite class.
It prints a summary of the testsuite and detailed information about
testcase methods.
====================================================================== -->
<xsl:template match="testsuite" mode="class.details">
<xsl:variable name="package.name" select="@package"/>
<xsl:variable name="class.name"><xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></xsl:variable>
<html>
<head>
<title>Unit Test Results: <xsl:value-of select="$class.name"/></title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$package.name"/>
</xsl:call-template>
<script type="text/javascript" language="JavaScript">
var TestCases = new Array();
var cur;
<xsl:apply-templates select="properties"/>
</script>
<script type="text/javascript" language="JavaScript"><![CDATA[
function displayProperties (name) {
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
var doc = win.document;
doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("<style type=\"text/css\">");
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
doc.write("table tr td, table tr th { font-size: 68%; }");
doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }");
doc.write("</style>");
doc.write("</head><body>");
doc.write("<h3>Properties of " + name + "</h3>");
doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>");
doc.write("<table class='properties'>");
doc.write("<tr><th>Name</th><th>Value</th></tr>");
for (prop in TestCases[name]) {
doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>");
}
doc.write("</table>");
doc.write("</body></html>");
doc.close();
win.focus();
}
]]>
</script>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<h3>Class <xsl:value-of select="$class.name"/></h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="." mode="print.test"/>
</table>
<h2>Tests</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header"/>
<!--
test can even not be started at all (failure to load the class)
so report the error directly
-->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4"><xsl:apply-templates select="./error"/></td>
</tr>
</xsl:if>
<xsl:apply-templates select="./testcase" mode="print.test"/>
</table>
<div class="Properties">
<a>
<xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
Properties &#187;
</a>
</div>
<xsl:if test="string-length(./system-out)!=0">
<div class="Properties">
<a>
<xsl:attribute name="href">./<xsl:value-of select="@name"/>-out.html</xsl:attribute>
System.out &#187;
</a>
</div>
</xsl:if>
<xsl:if test="string-length(./system-err)!=0">
<div class="Properties">
<a>
<xsl:attribute name="href">./<xsl:value-of select="@name"/>-err.html</xsl:attribute>
System.err &#187;
</a>
</div>
</xsl:if>
</body>
</html>
</xsl:template>
<!--
Write properties into a JavaScript data structure.
This is based on the original idea by Erik Hatcher (ehatcher@apache.org)
-->
<xsl:template match="properties">
cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
<xsl:for-each select="property">
<xsl:sort select="@name"/>
cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
</xsl:for-each>
</xsl:template>
<!-- ======================================================================
This page is created for every package.
It prints the name of all classes that belongs to this package.
@param name the package name to print classes.
====================================================================== -->
<!-- list of classes in a package -->
<xsl:template name="classes.list">
<xsl:param name="name"/>
<html>
<head>
<title>Unit Test Classes: <xsl:value-of select="$name"/></title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</head>
<body>
<table width="100%">
<tr>
<td nowrap="nowrap">
<h2><a href="package-summary.html" target="classFrame">
<xsl:value-of select="$name"/>
<xsl:if test="$name = ''">&lt;none&gt;</xsl:if>
</a></h2>
</td>
</tr>
</table>
<h2>Classes</h2>
<table width="100%">
<xsl:for-each select="/testsuites/testsuite[./@package = $name]">
<xsl:sort select="@name"/>
<tr>
<td nowrap="nowrap">
<a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<!--
Creates an all-classes.html file that contains a link to all package-summary.html
on each class.
-->
<xsl:template match="testsuites" mode="all.classes">
<html>
<head>
<title>All Unit Test Classes</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2>Classes</h2>
<table width="100%">
<xsl:apply-templates select="testsuite" mode="all.classes">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="testsuite" mode="all.classes">
<xsl:variable name="package.name" select="@package"/>
<tr>
<td nowrap="nowrap">
<a target="classFrame">
<xsl:attribute name="href">
<xsl:if test="not($package.name='')">
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
</xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:template>
<!--
Creates an html file that contains a link to all package-summary.html files on
each package existing on testsuites.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="testsuites" mode="all.packages">
<html>
<head>
<title>All Unit Test Packages</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
<h2>Packages</h2>
<table width="100%">
<xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages">
<xsl:sort select="@package"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="testsuite" mode="all.packages">
<tr>
<td nowrap="nowrap">
<a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame">
<xsl:value-of select="@package"/>
<xsl:if test="@package = ''">&lt;none&gt;</xsl:if>
</a>
</td>
</tr>
</xsl:template>
<xsl:template match="testsuites" mode="overview.packages">
<html>
<head>
<title>Unit Test Results: Summary</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h2>Summary</h2>
<xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
<xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
<xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
<xsl:variable name="skippedCount" select="sum(testsuite/@skipped)"/>
<xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Tests</th>
<th>Failures</th>
<th>Errors</th>
<th>Skipped</th>
<th>Success rate</th>
<th>Time</th>
</tr>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
<xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><xsl:value-of select="$testCount"/></td>
<td><xsl:value-of select="$failureCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
<td><xsl:value-of select="$skipCount" /></td>
<td>
<xsl:call-template name="display-percent">
<xsl:with-param name="value" select="$successRate"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
</tr>
</table>
<table border="0" width="95%">
<tr>
<td style="text-align: justify;">
Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
</td>
</tr>
</table>
<h2>Packages</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:sort select="@package" order="ascending"/>
<!-- get the node set containing all testsuites that have the same package -->
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/>
<tr valign="top">
<!-- display a failure if there is any failure/error in the package -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="sum($insamepackage/@errors) &gt; 0">Error</xsl:when>
<xsl:when test="sum($insamepackage/@failures) &gt; 0">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><a href="./{translate(@package,'.','/')}/package-summary.html">
<xsl:value-of select="@package"/>
<xsl:if test="@package = ''">&lt;none&gt;</xsl:if>
</a></td>
<td><xsl:value-of select="sum($insamepackage/@tests)"/></td>
<td><xsl:value-of select="sum($insamepackage/@errors)"/></td>
<td><xsl:value-of select="sum($insamepackage/@failures)"/></td>
<td><xsl:value-of select="sum($insamepackage/@skipped)" /></td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="sum($insamepackage/@time)"/>
</xsl:call-template>
</td>
<td><xsl:value-of select="$insamepackage/@timestamp"/></td>
<td><xsl:value-of select="$insamepackage/@hostname"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template name="package.summary">
<xsl:param name="name"/>
<html>
<head>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</head>
<body>
<xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="$name"/></h3>
<!--table border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table-->
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/>
<xsl:if test="count($insamepackage) &gt; 0">
<h2>Classes</h2>
<p>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="$insamepackage" mode="print.test">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</p>
</xsl:if>
</body>
</html>
</xsl:template>
<!--
transform string like a.b.c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
<xsl:param name="package.name"/>
<link rel="stylesheet" type="text/css" title="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></link>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>Unit Test Results</h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://ant.apache.org/">Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<!-- class header -->
<xsl:template name="testsuite.test.header">
<tr valign="top">
<th width="80%">Name</th>
<th>Tests</th>
<th>Errors</th>
<th>Failures</th>
<th>Skipped</th>
<th nowrap="nowrap">Time(s)</th>
<th nowrap="nowrap">Time Stamp</th>
<th>Host</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="testcase.test.header">
<tr valign="top">
<th>Name</th>
<th>Status</th>
<th width="80%">Type</th>
<th nowrap="nowrap">Time(s)</th>
</tr>
</xsl:template>
<!-- class information -->
<xsl:template match="testsuite" mode="print.test">
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
<xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td>
<td><xsl:apply-templates select="@tests"/></td>
<td><xsl:apply-templates select="@errors"/></td>
<td><xsl:apply-templates select="@failures"/></td>
<td><xsl:apply-templates select="@skipped" /></td>
<td><xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
<td><xsl:apply-templates select="@timestamp"/></td>
<td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
<xsl:template match="testcase" mode="print.test">
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="error">Error</xsl:when>
<xsl:when test="failure">Failure</xsl:when>
<xsl:otherwise>TableRowColor</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><xsl:value-of select="@name"/></td>
<xsl:choose>
<xsl:when test="failure">
<td>Failure</td>
<td><xsl:apply-templates select="failure"/></td>
</xsl:when>
<xsl:when test="error">
<td>Error</td>
<td><xsl:apply-templates select="error"/></td>
</xsl:when>
<xsl:when test="skipped">
<td>Skipped</td>
<td><xsl:apply-templates select="skipped"/></td>
</xsl:when>
<xsl:otherwise>
<td>Success</td>
<td></td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
</tr>
</xsl:template>
<!-- Note : the below template error and failure are the same style
so just call the same style store in the toolkit template -->
<xsl:template match="failure">
<xsl:call-template name="display-failures"/>
</xsl:template>
<xsl:template match="error">
<xsl:call-template name="display-failures"/>
</xsl:template>
<!-- Style for the error and failure in the testcase template -->
<xsl:template name="display-failures">
<xsl:choose>
<xsl:when test="not(@message)">N/A</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@message"/>
</xsl:otherwise>
</xsl:choose>
<!-- display the stacktrace -->
<br/><br/>
<code>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="."/>
</xsl:call-template>
</code>
<!-- the latter is better but might be problematic for non-21" monitors... -->
<!--pre><xsl:value-of select="."/></pre-->
</xsl:template>
<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>
<!--
template that will convert a carriage return into a br tag
@param word the text from which to convert CR to BR tag
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:param name="br"><br/></xsl:param>
<xsl:value-of select='stringutils:replace(string($word),"&#xA;",$br)'/>
</xsl:template>
<xsl:template name="display-time">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.000')"/>
</xsl:template>
<xsl:template name="display-percent">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.00%')"/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,988 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
xmlns:string="xalan://java.lang.String"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","/>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Sample stylesheet to be used with Ant JUnitReport output.
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-->
<xsl:param name="output.dir" select="'.'"/>
<xsl:param name="TITLE">Unit Test Results.</xsl:param>
<xsl:template match="testsuites">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
</redirect:write>
<!-- create the all-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
<!-- create the all-tests.html at the root -->
<redirect:write file="{$output.dir}/all-tests.html">
<xsl:apply-templates select="." mode="all.tests"/>
</redirect:write>
<!-- create the alltests-fails.html at the root -->
<redirect:write file="{$output.dir}/alltests-fails.html">
<xsl:apply-templates select="." mode="all.tests">
<xsl:with-param name="type" select="'fails'"/>
</xsl:apply-templates>
</redirect:write>
<!-- create the alltests-errors.html at the root -->
<redirect:write file="{$output.dir}/alltests-errors.html">
<xsl:apply-templates select="." mode="all.tests">
<xsl:with-param name="type" select="'errors'"/>
</xsl:apply-templates>
</redirect:write>
<!-- create the alltests-skipped.html at the root -->
<redirect:write file="{$output.dir}/alltests-skipped.html">
<xsl:apply-templates select="." mode="all.tests">
<xsl:with-param name="type" select="'skipped'"/>
</xsl:apply-templates>
</redirect:write>
<!-- process all packages -->
<xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:call-template name="package">
<xsl:with-param name="name" select="@package"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="package">
<xsl:param name="name"/>
<xsl:variable name="package.dir">
<xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
<xsl:if test="$name = ''">.</xsl:if>
</xsl:variable>
<!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:call-template name="classes.list">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:call-template name="package.summary">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
<xsl:for-each select="/testsuites/testsuite[@package = $name]">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}.html">
<xsl:apply-templates select="." mode="class.details"/>
</redirect:write>
<xsl:if test="string-length(./system-out)!=0">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-out.html">
<html>
<head>
<title>Standard Output from <xsl:value-of select="@name"/></title>
</head>
<body>
<pre><xsl:value-of select="./system-out"/></pre>
</body>
</html>
</redirect:write>
</xsl:if>
<xsl:if test="string-length(./system-err)!=0">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-err.html">
<html>
<head>
<title>Standard Error from <xsl:value-of select="@name"/></title>
</head>
<body>
<pre><xsl:value-of select="./system-err"/></pre>
</body>
</html>
</redirect:write>
</xsl:if>
<xsl:if test="@failures != 0">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-fails.html">
<xsl:apply-templates select="." mode="class.details">
<xsl:with-param name="type" select="'fails'"/>
</xsl:apply-templates>
</redirect:write>
</xsl:if>
<xsl:if test="@errors != 0">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-errors.html">
<xsl:apply-templates select="." mode="class.details">
<xsl:with-param name="type" select="'errors'"/>
</xsl:apply-templates>
</redirect:write>
</xsl:if>
<xsl:if test="@skipped != 0">
<redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-skipped.html">
<xsl:apply-templates select="." mode="class.details">
<xsl:with-param name="type" select="'skipped'"/>
</xsl:apply-templates>
</redirect:write>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
<html>
<head>
<title><xsl:value-of select="$TITLE"/></title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="overview-frame.html" name="packageListFrame"/>
<frame src="allclasses-frame.html" name="classListFrame"/>
</frameset>
<frame src="overview-summary.html" name="classFrame"/>
<noframes>
<h2>Frame Alert</h2>
<p>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
</p>
</noframes>
</frameset>
</html>
</xsl:template>
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, table tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
}
table.details tr td{
background:#eeeee0;
}
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
h4 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h5 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h6 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
.Error {
font-weight:bold; color:red;
}
.Failure {
font-weight:bold; color:purple;
}
.Properties {
text-align:right;
}
</xsl:template>
<!-- Create list of all/failed/errored/skipped tests -->
<xsl:template match="testsuites" mode="all.tests">
<xsl:param name="type" select="'all'"/>
<html>
<xsl:variable name="title">
<xsl:choose>
<xsl:when test="$type = 'fails'">
<xsl:text>All Failures</xsl:text>
</xsl:when>
<xsl:when test="$type = 'errors'">
<xsl:text>All Errors</xsl:text>
</xsl:when>
<xsl:when test="$type = 'skipped'">
<xsl:text>All Skipped</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>All Tests</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<head>
<title>Unit Test Results: <xsl:value-of select="$title"/></title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h2><xsl:value-of select="$title"/></h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header">
<xsl:with-param name="show.class" select="'yes'"/>
</xsl:call-template>
<!--
test can even not be started at all (failure to load the class)
so report the error directly
-->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4">
<xsl:apply-templates select="./error"/>
</td>
</tr>
</xsl:if>
<xsl:choose>
<xsl:when test="$type = 'fails'">
<xsl:apply-templates select=".//testcase[failure]" mode="print.test">
<xsl:with-param name="show.class" select="'yes'"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$type = 'errors'">
<xsl:apply-templates select=".//testsuite[error]" mode="alltests.error.row"/>
<xsl:apply-templates select=".//testcase[error]" mode="print.test">
<xsl:with-param name="show.class" select="'yes'"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$type = 'skipped'">
<xsl:apply-templates select=".//testcase[skipped]" mode="print.test">
<xsl:with-param name="show.class" select="'yes'"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select=".//testsuite[error]" mode="alltests.error.row"/>
<xsl:apply-templates select=".//testcase" mode="print.test">
<xsl:with-param name="show.class" select="'yes'"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</table>
</body>
</html>
</xsl:template>
<!-- ======================================================================
This page is created for every testsuite class.
It prints a summary of the testsuite and detailed information about
testcase methods.
====================================================================== -->
<xsl:template match="testsuite" mode="class.details">
<xsl:param name="type" select="'all'"/>
<xsl:variable name="package.name" select="@package"/>
<xsl:variable name="class.name"><xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></xsl:variable>
<html>
<head>
<title>Unit Test Results: <xsl:value-of select="$class.name"/></title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$package.name"/>
</xsl:call-template>
<script type="text/javascript" language="JavaScript">
var TestCases = new Array();
var cur;
<xsl:apply-templates select="properties"/>
</script>
<script type="text/javascript" language="JavaScript"><![CDATA[
function displayProperties (name) {
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
var doc = win.document;
doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("<style type=\"text/css\">");
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
doc.write("table tr td, table tr th { font-size: 68%; }");
doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }");
doc.write("</style>");
doc.write("</head><body>");
doc.write("<h3>Properties of " + name + "</h3>");
doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>");
doc.write("<table class='properties'>");
doc.write("<tr><th>Name</th><th>Value</th></tr>");
for (prop in TestCases[name]) {
doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>");
}
doc.write("</table>");
doc.write("</body></html>");
doc.close();
win.focus();
}
]]>
</script>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<h3>Class <xsl:value-of select="$class.name"/></h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="." mode="print.test"/>
</table>
<xsl:choose>
<xsl:when test="$type = 'fails'">
<h2>Failures</h2>
</xsl:when>
<xsl:when test="$type = 'errors'">
<h2>Errors</h2>
</xsl:when>
<xsl:when test="$type = 'skipped'">
<h2>Skipped</h2>
</xsl:when>
<xsl:otherwise>
<h2>Tests</h2>
</xsl:otherwise>
</xsl:choose>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header"/>
<!--
test can even not be started at all (failure to load the class)
so report the error directly
-->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4"><xsl:apply-templates select="./error"/></td>
</tr>
</xsl:if>
<xsl:choose>
<xsl:when test="$type = 'fails'">
<xsl:apply-templates select="./testcase[failure]" mode="print.test"/>
</xsl:when>
<xsl:when test="$type = 'errors'">
<xsl:apply-templates select="./testcase[error]" mode="print.test"/>
</xsl:when>
<xsl:when test="$type = 'skipped'">
<xsl:apply-templates select="./testcase[skipped]" mode="print.test"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="./testcase" mode="print.test"/>
</xsl:otherwise>
</xsl:choose>
</table>
<div class="Properties">
<a>
<xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
Properties &#187;
</a>
</div>
<xsl:if test="string-length(./system-out)!=0">
<div class="Properties">
<a>
<xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-out.html</xsl:attribute>
System.out &#187;
</a>
</div>
</xsl:if>
<xsl:if test="string-length(./system-err)!=0">
<div class="Properties">
<a>
<xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-err.html</xsl:attribute>
System.err &#187;
</a>
</div>
</xsl:if>
</body>
</html>
</xsl:template>
<!--
Write properties into a JavaScript data structure.
This is based on the original idea by Erik Hatcher (ehatcher@apache.org)
-->
<xsl:template match="properties">
cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
<xsl:for-each select="property">
<xsl:sort select="@name"/>
cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
</xsl:for-each>
</xsl:template>
<!-- ======================================================================
This page is created for every package.
It prints the name of all classes that belongs to this package.
@param name the package name to print classes.
====================================================================== -->
<!-- list of classes in a package -->
<xsl:template name="classes.list">
<xsl:param name="name"/>
<html>
<head>
<title>Unit Test Classes: <xsl:value-of select="$name"/></title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</head>
<body>
<table width="100%">
<tr>
<td nowrap="nowrap">
<h2><a href="package-summary.html" target="classFrame">
<xsl:value-of select="$name"/>
<xsl:if test="$name = ''">&lt;none&gt;</xsl:if>
</a></h2>
</td>
</tr>
</table>
<h2>Classes</h2>
<table width="100%">
<xsl:for-each select="/testsuites/testsuite[./@package = $name]">
<xsl:sort select="@name"/>
<tr>
<td nowrap="nowrap">
<a href="{@id}_{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<!--
Creates an all-classes.html file that contains a link to all package-summary.html
on each class.
-->
<xsl:template match="testsuites" mode="all.classes">
<html>
<head>
<title>All Unit Test Classes</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2>Classes</h2>
<table width="100%">
<xsl:apply-templates select="testsuite" mode="all.classes">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="testsuite" mode="all.classes">
<xsl:variable name="package.name" select="@package"/>
<tr>
<td nowrap="nowrap">
<a target="classFrame">
<xsl:attribute name="href">
<xsl:if test="not($package.name='')">
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
</xsl:if><xsl:value-of select="@id"/>_<xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:template>
<!--
Creates an html file that contains a link to all package-summary.html files on
each package existing on testsuites.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="testsuites" mode="all.packages">
<html>
<head>
<title>All Unit Test Packages</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
<h2>Packages</h2>
<table width="100%">
<xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages">
<xsl:sort select="@package"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="testsuite" mode="all.packages">
<tr>
<td nowrap="nowrap">
<a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame">
<xsl:value-of select="@package"/>
<xsl:if test="@package = ''">&lt;none&gt;</xsl:if>
</a>
</td>
</tr>
</xsl:template>
<xsl:template match="testsuites" mode="overview.packages">
<html>
<head>
<title>Unit Test Results: Summary</title>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h2>Summary</h2>
<xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
<xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
<xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
<xsl:variable name="skippedCount" select="sum(testsuite/@skipped)" />
<xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Tests</th>
<th>Failures</th>
<th>Errors</th>
<th>Skipped</th>
<th>Success rate</th>
<th>Time</th>
</tr>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
<xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><a title="Display all tests" href="all-tests.html"><xsl:value-of select="$testCount"/></a></td>
<td><a title="Display all failures" href="alltests-fails.html"><xsl:value-of select="$failureCount"/></a></td>
<td><a title="Display all errors" href="alltests-errors.html"><xsl:value-of select="$errorCount"/></a></td>
<td><a title="Display all skipped test" href="alltests-skipped.html"><xsl:value-of select="$skippedCount" /></a></td>
<td>
<xsl:call-template name="display-percent">
<xsl:with-param name="value" select="$successRate"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
</tr>
</table>
<table border="0" width="95%">
<tr>
<td style="text-align: justify;">
Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
</td>
</tr>
</table>
<h2>Packages</h2>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:sort select="@package" order="ascending"/>
<!-- get the node set containing all testsuites that have the same package -->
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/>
<tr valign="top">
<!-- display a failure if there is any failure/error in the package -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="sum($insamepackage/@errors) &gt; 0">Error</xsl:when>
<xsl:when test="sum($insamepackage/@failures) &gt; 0">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><a href="./{translate(@package,'.','/')}/package-summary.html">
<xsl:value-of select="@package"/>
<xsl:if test="@package = ''">&lt;none&gt;</xsl:if>
</a></td>
<td><xsl:value-of select="sum($insamepackage/@tests)"/></td>
<td><xsl:value-of select="sum($insamepackage/@errors)"/></td>
<td><xsl:value-of select="sum($insamepackage/@failures)"/></td>
<td><xsl:value-of select="sum($insamepackage/@skipped)" /></td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="sum($insamepackage/@time)"/>
</xsl:call-template>
</td>
<td><xsl:value-of select="$insamepackage/@timestamp"/></td>
<td><xsl:value-of select="$insamepackage/@hostname"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template name="package.summary">
<xsl:param name="name"/>
<html>
<head>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</head>
<body>
<xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="$name"/></h3>
<!--table border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table-->
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/>
<xsl:if test="count($insamepackage) &gt; 0">
<h2>Classes</h2>
<p>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="$insamepackage" mode="print.test">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</p>
</xsl:if>
</body>
</html>
</xsl:template>
<!--
transform string like a.b.c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
<xsl:param name="package.name"/>
<link rel="stylesheet" type="text/css" title="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></link>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1><xsl:value-of select="$TITLE"/></h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://ant.apache.org/">Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<!-- class header -->
<xsl:template name="testsuite.test.header">
<tr valign="top">
<th width="80%">Name</th>
<th>Tests</th>
<th>Errors</th>
<th>Failures</th>
<th>Skipped</th>
<th nowrap="nowrap">Time(s)</th>
<th nowrap="nowrap">Time Stamp</th>
<th>Host</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="testcase.test.header">
<xsl:param name="show.class" select="''"/>
<tr valign="top">
<xsl:if test="boolean($show.class)">
<th>Class</th>
</xsl:if>
<th>Name</th>
<th>Status</th>
<th width="80%">Type</th>
<th nowrap="nowrap">Time(s)</th>
</tr>
</xsl:template>
<!-- class information -->
<xsl:template match="testsuite" mode="print.test">
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
<xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><a title="Display all tests" href="{@id}_{@name}.html"><xsl:value-of select="@name"/></a></td>
<td><a title="Display all tests" href="{@id}_{@name}.html"><xsl:apply-templates select="@tests"/></a></td>
<td>
<xsl:choose>
<xsl:when test="@errors != 0">
<a title="Display only errors" href="{@id}_{@name}-errors.html"><xsl:apply-templates select="@errors"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="@errors"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="@failures != 0">
<a title="Display only failures" href="{@id}_{@name}-fails.html"><xsl:apply-templates select="@failures"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="@failures"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="@skipped != 0">
<a title="Display only skipped tests" href="{@id}_{@name}-skipped.html"><xsl:apply-templates select="@skipped"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="@skipped"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td><xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
<td><xsl:apply-templates select="@timestamp"/></td>
<td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
<xsl:template match="testcase" mode="print.test">
<xsl:param name="show.class" select="''"/>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="error">Error</xsl:when>
<xsl:when test="failure">Failure</xsl:when>
<xsl:otherwise>TableRowColor</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:variable name="class.href">
<xsl:value-of select="concat(translate(../@package,'.','/'), '/', ../@id, '_', ../@name, '.html')"/>
</xsl:variable>
<xsl:if test="boolean($show.class)">
<td><a href="{$class.href}"><xsl:value-of select="../@name"/></a></td>
</xsl:if>
<td>
<a name="{@name}"/>
<xsl:choose>
<xsl:when test="boolean($show.class)">
<a href="{concat($class.href, '#', @name)}"><xsl:value-of select="@name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</td>
<xsl:choose>
<xsl:when test="failure">
<td>Failure</td>
<td><xsl:apply-templates select="failure"/></td>
</xsl:when>
<xsl:when test="error">
<td>Error</td>
<td><xsl:apply-templates select="error"/></td>
</xsl:when>
<xsl:when test="skipped">
<td>Skipped</td>
<td><xsl:apply-templates select="skipped"/></td>
</xsl:when>
<xsl:otherwise>
<td>Success</td>
<td></td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
</tr>
</xsl:template>
<!-- Note : the below template skipped, error and failure are the same style
so just call the same style store in the toolkit template -->
<xsl:template match="failure">
<xsl:call-template name="display-failures"/>
</xsl:template>
<xsl:template match="error">
<xsl:call-template name="display-failures"/>
</xsl:template>
<xsl:template match="skipped">
<xsl:call-template name="display-failures"/>
</xsl:template>
<!-- Style for the error and failure in the testcase template -->
<xsl:template name="display-failures">
<xsl:choose>
<xsl:when test="not(@message)">N/A</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@message"/>
</xsl:otherwise>
</xsl:choose>
<!-- display the stacktrace -->
<br/><br/>
<code>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="."/>
</xsl:call-template>
</code>
<!-- the latter is better but might be problematic for non-21" monitors... -->
<!--pre><xsl:value-of select="."/></pre-->
</xsl:template>
<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>
<!--
template that will convert a carriage return into a br tag
@param word the text from which to convert CR to BR tag
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:param name="splitlimit">32</xsl:param>
<xsl:variable name="secondhalfstartindex" select="(string-length($word)+(string-length($word) mod 2)) div 2"/>
<xsl:variable name="secondhalfword" select="substring($word, $secondhalfstartindex)"/>
<!-- When word is very big, a recursive replace is very heap/stack expensive, so subdivide on line break after middle of string -->
<xsl:choose>
<xsl:when test="(string-length($word) > $splitlimit) and (contains($secondhalfword, '&#xa;'))">
<xsl:variable name="secondhalfend" select="substring-after($secondhalfword, '&#xa;')"/>
<xsl:variable name="firsthalflen" select="string-length($word) - string-length($secondhalfword)"/>
<xsl:variable name="firsthalfword" select="substring($word, 1, $firsthalflen)"/>
<xsl:variable name="firsthalfend" select="substring-before($secondhalfword, '&#xa;')"/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="concat($firsthalfword,$firsthalfend)"/>
</xsl:call-template>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="$secondhalfend"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($word, '&#xa;')">
<xsl:value-of select="substring-before($word, '&#xa;')"/>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="substring-after($word, '&#xa;')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$word"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="display-time">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.000')"/>
</xsl:template>
<xsl:template name="display-percent">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.00%')"/>
</xsl:template>
<xsl:template match="testsuite" mode="alltests.error.row">
<xsl:variable name="package.dir">
<xsl:if test="not(@package = '')"><xsl:value-of select="translate(@package,'.','/')"/><xsl:text>/</xsl:text></xsl:if>
</xsl:variable>
<xsl:variable name="class.href">
<xsl:value-of select="concat($package.dir, @id, '_', @name, '.html')"/>
</xsl:variable>
<tr class="Error">
<td><a href="{$class.href}"><xsl:value-of select="@name"/></a></td>
<td colspan="3"><xsl:apply-templates select="./error"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,513 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:string="xalan://java.lang.String">
<xsl:output method="html" indent="yes" encoding="UTF-8"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:param name="TITLE">Unit Test Results.</xsl:param>
<!--
Sample stylesheet to be used with Ant JUnitReport output.
It creates a non-framed report that can be useful to send via
e-mail or such.
-->
<xsl:template match="testsuites">
<html>
<head>
<title><xsl:value-of select="$TITLE"/></title>
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
color:#000000;
}
table tr td, table tr th {
font-size: 68%;
}
table.details tr th{
font-weight: bold;
text-align:left;
background:#a6caf0;
}
table.details tr td{
background:#eeeee0;
}
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
}
h1 {
margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
}
h2 {
margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
}
h3 {
margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
}
h4 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h5 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
h6 {
margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
}
.Error {
font-weight:bold; color:red;
}
.Failure {
font-weight:bold; color:purple;
}
.Properties {
text-align:right;
}
</style>
<script type="text/javascript" language="JavaScript">
var TestCases = new Array();
var cur;
<xsl:for-each select="./testsuite">
<xsl:apply-templates select="properties"/>
</xsl:for-each>
</script>
<script type="text/javascript" language="JavaScript"><![CDATA[
function displayProperties (name) {
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
var doc = win.document;
doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("<style>")
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
doc.write("table tr td, table tr th { font-size: 68%; }");
doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }");
doc.write("</style>");
doc.write("</head><body>");
doc.write("<h3>Properties of " + name + "</h3>");
doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>");
doc.write("<table class='properties'>");
doc.write("<tr><th>Name</th><th>Value</th></tr>");
for (prop in TestCases[name]) {
doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>");
}
doc.write("</table>");
doc.write("</body></html>");
doc.close();
win.focus();
}
]]>
</script>
</head>
<body>
<a name="top"></a>
<xsl:call-template name="pageHeader"/>
<!-- Summary part -->
<xsl:call-template name="summary"/>
<hr size="1" width="95%" align="left"/>
<!-- Package List part -->
<xsl:call-template name="packagelist"/>
<hr size="1" width="95%" align="left"/>
<!-- For each package create its part -->
<xsl:call-template name="packages"/>
<hr size="1" width="95%" align="left"/>
<!-- For each class create the part -->
<xsl:call-template name="classes"/>
</body>
</html>
</xsl:template>
<!-- ================================================================== -->
<!-- Write a list of all packages with an hyperlink to the anchor of -->
<!-- of the package name. -->
<!-- ================================================================== -->
<xsl:template name="packagelist">
<h2>Packages</h2>
Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<!-- list all packages recursively -->
<xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:sort select="@package"/>
<xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/>
<xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/>
<xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/>
<xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/>
<xsl:variable name="skippedCount" select="sum($testsuites-in-package/@skipped)" />
<xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/>
<!-- write a summary for the package -->
<tr valign="top">
<!-- set a nice color depending if there is an error/failure -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
<td><a href="#{@package}"><xsl:value-of select="@package"/></a></td>
<td><xsl:value-of select="$testCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
<td><xsl:value-of select="$failureCount"/></td>
<td><xsl:value-of select="$skippedCount" /></td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
<td><xsl:value-of select="$testsuites-in-package/@timestamp"/></td>
<td><xsl:value-of select="$testsuites-in-package/@hostname"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<!-- ================================================================== -->
<!-- Write a package level report -->
<!-- It creates a table with values from the document: -->
<!-- Name | Tests | Errors | Failures | Time -->
<!-- ================================================================== -->
<xsl:template name="packages">
<!-- create an anchor to this package name -->
<xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
<xsl:sort select="@package"/>
<a name="{@package}"></a>
<h3>Package <xsl:value-of select="@package"/></h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<!-- match the testsuites of this package -->
<xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/>
</table>
<a href="#top">Back to top</a>
<p/>
<p/>
</xsl:for-each>
</xsl:template>
<xsl:template name="classes">
<xsl:for-each select="testsuite">
<xsl:sort select="@name"/>
<!-- create an anchor to this class name -->
<a name="{@name}"></a>
<h3>TestCase <xsl:value-of select="@name"/></h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header"/>
<!--
test can even not be started at all (failure to load the class)
so report the error directly
-->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4"><xsl:apply-templates select="./error"/></td>
</tr>
</xsl:if>
<xsl:apply-templates select="./testcase" mode="print.test"/>
</table>
<div class="Properties">
<a>
<xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
Properties &#187;
</a>
</div>
<p/>
<a href="#top">Back to top</a>
</xsl:for-each>
</xsl:template>
<xsl:template name="summary">
<h2>Summary</h2>
<xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
<xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
<xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
<xsl:variable name="skippedCount" select="sum(testsuite/@skipped)" />
<xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Tests</th>
<th>Failures</th>
<th>Errors</th>
<th>Skipped</th>
<th>Success rate</th>
<th>Time</th>
</tr>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
<xsl:when test="$errorCount &gt; 0">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
<td><xsl:value-of select="$testCount"/></td>
<td><xsl:value-of select="$failureCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
<td><xsl:value-of select="$skippedCount" /></td>
<td>
<xsl:call-template name="display-percent">
<xsl:with-param name="value" select="$successRate"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$timeCount"/>
</xsl:call-template>
</td>
</tr>
</table>
<table border="0" width="95%">
<tr>
<td style="text-align: justify;">
Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated.
</td>
</tr>
</table>
</xsl:template>
<!--
Write properties into a JavaScript data structure.
This is based on the original idea by Erik Hatcher (ehatcher@apache.org)
-->
<xsl:template match="properties">
cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
<xsl:for-each select="property">
<xsl:sort select="@name"/>
cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
</xsl:for-each>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1><xsl:value-of select="$TITLE"/></h1>
<table width="100%">
<tr>
<td align="left"></td>
<td align="right">Designed for use with <a href='http://www.junit.org'>JUnit</a> and <a href='http://ant.apache.org/ant'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<xsl:template match="testsuite" mode="header">
<tr valign="top">
<th width="80%">Name</th>
<th>Tests</th>
<th>Errors</th>
<th>Failures</th>
<th>Skipped</th>
<th nowrap="nowrap">Time(s)</th>
</tr>
</xsl:template>
<!-- class header -->
<xsl:template name="testsuite.test.header">
<tr valign="top">
<th width="80%">Name</th>
<th>Tests</th>
<th>Errors</th>
<th>Failures</th>
<th>Skipped</th>
<th nowrap="nowrap">Time(s)</th>
<th nowrap="nowrap">Time Stamp</th>
<th>Host</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="testcase.test.header">
<tr valign="top">
<th>Name</th>
<th>Status</th>
<th width="80%">Type</th>
<th nowrap="nowrap">Time(s)</th>
</tr>
</xsl:template>
<!-- class information -->
<xsl:template match="testsuite" mode="print.test">
<tr valign="top">
<!-- set a nice color depending if there is an error/failure -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
<xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
<!-- print testsuite information -->
<td><a href="#{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:value-of select="@tests"/></td>
<td><xsl:value-of select="@errors"/></td>
<td><xsl:value-of select="@failures"/></td>
<td><xsl:value-of select="@skipped" /></td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
<td><xsl:apply-templates select="@timestamp"/></td>
<td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
<xsl:template match="testcase" mode="print.test">
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="failure | error">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
<td><xsl:value-of select="@name"/></td>
<xsl:choose>
<xsl:when test="failure">
<td>Failure</td>
<td><xsl:apply-templates select="failure"/></td>
</xsl:when>
<xsl:when test="error">
<td>Error</td>
<td><xsl:apply-templates select="error"/></td>
</xsl:when>
<xsl:when test="skipped">
<td>Skipped</td>
<td><xsl:apply-templates select="skipped"/></td>
</xsl:when>
<xsl:otherwise>
<td>Success</td>
<td></td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
</tr>
</xsl:template>
<xsl:template match="failure">
<xsl:call-template name="display-failures"/>
</xsl:template>
<xsl:template match="error">
<xsl:call-template name="display-failures"/>
</xsl:template>
<xsl:template match="skipped">
<xsl:call-template name="display-failures"/>
</xsl:template>
<!-- Style for the error, failure and skipped in the testcase template -->
<xsl:template name="display-failures">
<xsl:choose>
<xsl:when test="not(@message)">N/A</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@message"/>
</xsl:otherwise>
</xsl:choose>
<!-- display the stacktrace -->
<code>
<br/><br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="."/>
</xsl:call-template>
</code>
<!-- the later is better but might be problematic for non-21" monitors... -->
<!--pre><xsl:value-of select="."/></pre-->
</xsl:template>
<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>
<!--
template that will convert a carriage return into a br tag
@param word the text from which to convert CR to BR tag
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:param name="splitlimit">32</xsl:param>
<xsl:variable name="secondhalfstartindex" select="(string-length($word)+(string-length($word) mod 2)) div 2"/>
<xsl:variable name="secondhalfword" select="substring($word, $secondhalfstartindex)"/>
<!-- When word is very big, a recursive replace is very heap/stack expensive, so subdivide on line break after middle of string -->
<xsl:choose>
<xsl:when test="(string-length($word) > $splitlimit) and (contains($secondhalfword, '&#xa;'))">
<xsl:variable name="secondhalfend" select="substring-after($secondhalfword, '&#xa;')"/>
<xsl:variable name="firsthalflen" select="string-length($word) - string-length($secondhalfword)"/>
<xsl:variable name="firsthalfword" select="substring($word, 1, $firsthalflen)"/>
<xsl:variable name="firsthalfend" select="substring-before($secondhalfword, '&#xa;')"/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="concat($firsthalfword,$firsthalfend)"/>
</xsl:call-template>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="$secondhalfend"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($word, '&#xa;')">
<xsl:value-of select="substring-before($word, '&#xa;')"/>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="substring-after($word, '&#xa;')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$word"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="display-time">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.000')"/>
</xsl:template>
<xsl:template name="display-percent">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.00%')"/>
</xsl:template>
</xsl:stylesheet>

203
lib/ant/etc/log.xsl Normal file
View File

@@ -0,0 +1,203 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
The purpose have this XSL is to provide a nice way to look at the output
from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
@author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
-->
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:template match="/">
<html>
<head>
<style type="text/css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin: 0;
font:normal 100% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
table.status {
font:bold 80% arial,helvetica,sanserif;
background-color:#525D76;
color:#ffffff;
}
table.log tr td, tr th {
font-size: 80%;
}
.error {
color:red;
}
.warn {
color:brown;
}
.info {
color:gray;
}
.debug{
color:gray;
}
.failed {
font-size:80%;
background-color: red;
color:#FFFFFF;
font-weight: bold
}
.complete {
font-size:80%;
background-color: #525D76;
color:#FFFFFF;
font-weight: bold
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
background: #ccc;
color: black;
}
table, th, td {
border: none
}
h3 {
font:bold 80% arial,helvetica,sanserif;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</style>
</head>
<body>
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" class="bannercell">
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
<td style="text-align:right;vertical-align:bottom">
<a href="http://ant.apache.org/">Apache Ant</a>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr><td><hr noshade="yes" size="1"/></td></tr>
</table>
<xsl:apply-templates select="build"/>
</body>
</html>
</xsl:template>
<xsl:template match="build">
<!-- build status -->
<table width="100%">
<xsl:attribute name="class">
<xsl:if test="@error">failed</xsl:if>
<xsl:if test="not(@error)">complete</xsl:if>
</xsl:attribute>
<tr>
<xsl:if test="@error">
<td nowrap="yes">Build Failed</td>
</xsl:if>
<xsl:if test="not(@error)">
<td nowrap="yes">Build Complete</td>
</xsl:if>
<td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td>
</tr>
<tr>
<td colspan="2">
<xsl:if test="@error">
<tt><xsl:value-of select="@error"/></tt><br/>
<i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i>
</xsl:if>
</td>
</tr>
</table>
<table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
<tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
<tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
<tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
<tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
</table>
<!-- build information -->
<h3>Build events</h3>
<table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
<tr>
<th nowrap="yes" align="left" width="1%">target</th>
<th nowrap="yes" align="left" width="1%">task</th>
<th nowrap="yes" align="left">message</th>
</tr>
<xsl:apply-templates select=".//message[@priority != 'debug']"/>
</table>
<p>
<!-- stacktrace -->
<xsl:if test="stacktrace">
<a name="stacktrace"/>
<h3>Error details</h3>
<table width="100%">
<tr><td>
<pre><xsl:value-of select="stacktrace"/></pre>
</td></tr>
</table>
</xsl:if>
</p>
</xsl:template>
<!-- report every message but those with debug priority -->
<xsl:template match="message[@priority!='debug']">
<tr valign="top">
<!-- alternated row style -->
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
<td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
<td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td>
<td class="{@priority}" nowrap="yes">
<xsl:value-of select="text()"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,502 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Stylesheet to transform an XML file generated by the Ant MAudit task into
a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
It use the Xalan redirect extension to write to multiple output files.
-->
<xsl:param name="output.dir" select="'.'"/>
<xsl:template match="classes">
<!-- create the index.html -->
<redirect:write file="{$output.dir}/index.html">
<xsl:call-template name="index.html"/>
</redirect:write>
<!-- create the stylesheet.css -->
<redirect:write file="{$output.dir}/stylesheet.css">
<xsl:call-template name="stylesheet.css"/>
</redirect:write>
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
</redirect:write>
<!-- create the all-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
<!-- process all packages -->
<xsl:for-each select="./class[not(./@package = preceding-sibling::class/@package)]">
<xsl:call-template name="package">
<xsl:with-param name="name" select="@package"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="package">
<xsl:param name="name"/>
<xsl:variable name="package.dir">
<xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
<xsl:if test="$name = ''">.</xsl:if>
</xsl:variable>
<!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:call-template name="classes.list">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- create a package-summary.html in the package directory -->
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:call-template name="package.summary">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
<xsl:for-each select="/classes/class[@package = $name]">
<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
<xsl:apply-templates select="." mode="class.details"/>
</redirect:write>
</xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
<HTML>
<HEAD><TITLE>Audit Results.</TITLE></HEAD>
<FRAMESET cols="20%,80%">
<FRAMESET rows="30%,70%">
<FRAME src="overview-frame.html" name="packageListFrame"/>
<FRAME src="allclasses-frame.html" name="classListFrame"/>
</FRAMESET>
<FRAME src="overview-summary.html" name="classFrame"/>
</FRAMESET>
<noframes>
<H2>Frame Alert</H2>
<P>
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
</P>
</noframes>
</HTML>
</xsl:template>
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</xsl:template>
<!-- print the violations of the class -->
<xsl:template match="class" mode="class.details">
<xsl:variable name="package.name" select="@package"/>
<HTML>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$package.name"/>
</xsl:call-template>
</HEAD>
<BODY>
<xsl:call-template name="pageHeader"/>
<H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="class.audit.header"/>
<xsl:apply-templates select="." mode="print.audit"/>
</table>
<H3>Violations</H3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="violation.audit.header"/>
<xsl:apply-templates select="./violation" mode="print.audit">
<xsl:sort data-type="number" select="@line"/>
</xsl:apply-templates>
</table>
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template name="classes.list">
<xsl:param name="name"/>
<HTML>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</HEAD>
<BODY>
<table width="100%">
<tr>
<td nowrap="nowrap">
<H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2>
</td>
</tr>
</table>
<h2>Classes</h2>
<TABLE WIDTH="100%">
<xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<!-- the class to list -->
<xsl:template match="class" mode="classes.list">
<tr>
<td nowrap="nowrap">
<!-- @bug naming to fix for inner classes -->
<a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:template>
<!--
Creates an all-classes.html file that contains a link to all package-summary.html
on each class.
-->
<xsl:template match="classes" mode="all.classes">
<html>
<head>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2>Classes</h2>
<table width="100%">
<xsl:apply-templates select=".//class" mode="all.classes">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="class" mode="all.classes">
<!-- (ancestor::package)[last()] is buggy in MSXML3 ? -->
<xsl:variable name="package.name" select="@package"/>
<tr>
<td nowrap="nowrap">
<a target="classFrame">
<xsl:attribute name="href">
<xsl:if test="not($package.name='')">
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
</xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:template>
<!--
Creates an html file that contains a link to all package-summary.html files on
each package existing on testsuites.
@bug there will be a problem here, I don't know yet how to handle unnamed package :(
-->
<xsl:template match="classes" mode="all.packages">
<html>
<head>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body>
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
<h2>Packages</h2>
<table width="100%">
<xsl:apply-templates select="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages">
<xsl:sort select="@package" order="ascending"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="class" mode="all.packages">
<tr>
<td nowrap="nowrap">
<a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
<xsl:value-of select="@package"/>
</a>
</td>
</tr>
</xsl:template>
<xsl:template match="classes" mode="overview.packages">
<html>
<head>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
</xsl:call-template>
</head>
<body onload="open('allclasses-frame.html','classListFrame')">
<xsl:call-template name="pageHeader"/>
<h3>Summary</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Audited classes</th>
<th>Reported classes</th>
<th>Violations</th>
</tr>
<tr class="a">
<td><xsl:value-of select="@audited"/></td>
<td><xsl:value-of select="@reported"/></td>
<td><xsl:value-of select="@violations"/></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
Note: Rules checked have originated from style guidelines suggested by the language designers,
experience from the Java development community and insite experience. Violations are generally
reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x)
and Metamata Audit rules (x.x).
Please consult these documents for additional information about violations.
<p/>
Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta.
<p/>
One should note that these violations do not necessary underline errors but should be used
as an indication for <i>possible</i> errors. As always, use your best judgment and review
them carefully, it might save you hours of debugging.
</td>
</tr>
</table>
<h3>Packages</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="class.audit.header"/>
<xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]">
<xsl:sort select="@package" order="ascending"/>
<tr>
<xsl:call-template name="alternate-row"/>
<td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
<td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td>
</tr>
</xsl:for-each>
</table>
<xsl:call-template name="pageFooter"/>
</body>
</html>
</xsl:template>
<xsl:template name="package.summary">
<xsl:param name="name"/>
<HTML>
<HEAD>
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
</xsl:call-template>
</HEAD>
<BODY>
<xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="$name"/></h3>
<!--table border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table-->
<xsl:if test="count(/classes/class[./@package = $name]) &gt; 0">
<H3>Classes</H3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<xsl:call-template name="class.audit.header"/>
<xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</xsl:if>
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
</xsl:template>
<!--
transform string like a.b.c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
<xsl:param name="package.name"/>
<LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bannercell" rowspan="2">
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
<td style="text-align:right"><h2>Source Code Audit</h2></td>
</tr>
<tr>
<td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageFooter">
</xsl:template>
<!-- class header -->
<xsl:template name="class.audit.header">
<tr>
<th width="80%">Name</th>
<th>Violations</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="violation.audit.header">
<tr>
<th>Line</th>
<th>Message</th>
</tr>
</xsl:template>
<!-- class information -->
<xsl:template match="class" mode="print.audit">
<tr>
<xsl:call-template name="alternate-row"/>
<td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td>
<td><xsl:apply-templates select="@violations"/></td>
</tr>
</xsl:template>
<xsl:template match="violation" mode="print.audit">
<tr>
<xsl:call-template name="alternate-row"/>
<td><xsl:value-of select="@line"/></td>
<td><xsl:apply-templates select="@message"/></td>
</tr>
</xsl:template>
<!-- alternated row style -->
<xsl:template name="alternate-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

179
lib/ant/etc/tagdiff.xsl Normal file
View File

@@ -0,0 +1,179 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- a stylesheet to display changelogs ala netbeans -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="title"/>
<xsl:param name="module"/>
<xsl:param name="cvsweb"/>
<xsl:output method="html" indent="yes"/>
<!-- Copy standard document elements. Elements that
should be ignored must be filtered by apply-templates
tags. -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="attribute::*[. != '']"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="tagdiff">
<html>
<head>
<title><xsl:value-of select="$title"/></title>
<style type="text/css">
body, p {
font-family: verdana,arial,helvetica;
font-size: 80%;
color:#000000;
}
.dateAndAuthor {
font-family: verdana,arial,helvetica;
font-size: 80%;
font-weight: bold;
text-align:left;
background:#a6caf0;
}
tr, td{
font-family: verdana,arial,helvetica;
font-size: 80%;
background:#eeeee0;
}
</style>
</head>
<body link="#000000" alink="#000000" vlink="#000000" text="#000000">
<h1>
<a name="top"><xsl:value-of select="$title"/></a>
</h1>
Tagdiff between <xsl:value-of select="@startTag"/> <xsl:value-of select="@startDate"/> and
<xsl:value-of select="@endTag"/> <xsl:value-of select="@endDate"/>
<p align="right">Designed for use with <a href="http://ant.apache.org/">Ant</a>.</p>
<hr size="2"/>
<a name="TOP"/>
<table width="100%">
<tr>
<td align="right">
<a href="#New">New Files</a> |
<a href="#Modified">Modified Files</a> |
<a href="#Removed">Removed Files</a>
</td>
</tr>
</table>
<table border="0" width="100%" cellpadding="3" cellspacing="1">
<xsl:call-template name="show-entries">
<xsl:with-param name="title">New Files</xsl:with-param>
<xsl:with-param name="anchor">New</xsl:with-param>
<xsl:with-param name="entries" select=".//entry[file/revision][not(file/prevrevision)]"/>
</xsl:call-template>
<xsl:call-template name="show-entries">
<xsl:with-param name="title">Modified Files</xsl:with-param>
<xsl:with-param name="anchor">Modified</xsl:with-param>
<xsl:with-param name="entries" select=".//entry[file/revision][file/prevrevision]"/>
</xsl:call-template>
<!-- change to entries select to address bug #36827 -->
<xsl:call-template name="show-entries">
<xsl:with-param name="title">Removed Files</xsl:with-param>
<xsl:with-param name="anchor">Removed</xsl:with-param>
<xsl:with-param name="entries" select=".//entry[not(file/revision)][file/prevrevision]"/>
</xsl:call-template>
</table>
</body>
</html>
</xsl:template>
<xsl:template name="show-entries">
<xsl:param name="title"/>
<xsl:param name="anchor"/>
<xsl:param name="entries"/>
<tr>
<td colspan="2" class="dateAndAuthor">
<a>
<xsl:attribute name="name"><xsl:value-of select="$anchor"/></xsl:attribute>
<xsl:value-of select="$title"/> - <xsl:value-of select="count($entries)"/> entries
</a>
<a href="#TOP">(back to top)</a>
</td>
</tr>
<tr>
<td width="20">
<xsl:text> </xsl:text>
</td>
<td>
<ul>
<xsl:apply-templates select="$entries"/>
</ul>
</td>
</tr>
</xsl:template>
<xsl:template match="entry">
<xsl:apply-templates select="file"/>
</xsl:template>
<xsl:template match="date">
<i><xsl:value-of select="."/></i>
</xsl:template>
<xsl:template match="time">
<i><xsl:value-of select="."/></i>
</xsl:template>
<xsl:template match="author">
<i>
<a>
<xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
<xsl:value-of select="."/>
</a>
</i>
</xsl:template>
<xsl:template match="file">
<li>
<a target="_new">
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" /></xsl:attribute>
<xsl:value-of select="name" />
</a>
<xsl:if test="string-length(prevrevision) > 0 or string-length(revision) > 0">
<xsl:text> </xsl:text>
<a target="_new">
<xsl:choose>
<xsl:when test="string-length(prevrevision) = 0 ">
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&amp;content-type=text/x-cvsweb-markup</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&amp;r2=<xsl:value-of select="prevrevision"/>&amp;diff_format=h</xsl:attribute>
</xsl:otherwise>
</xsl:choose> (<xsl:if test="count(prevrevision) &gt; 0"> <xsl:value-of select="prevrevision"/> --&gt; </xsl:if> <xsl:value-of select="revision"/>)
</a>
</xsl:if>
</li>
</xsl:template>
<!-- Any elements within a msg are processed,
so that we can preserve HTML tags. -->
<xsl:template match="msg">
<b><xsl:apply-templates/></b>
</xsl:template>
</xsl:stylesheet>

View File

@@ -23,48 +23,48 @@
-->
<project name="fetch" default="all" basedir=".">
<description>
This build file downloads JAR files that optional Ant tasks use,
and installs them in a location that is accessible the next time Ant runs.
<description>
This build file downloads JAR files that optional Ant tasks use,
and installs them in a location that is accessible the next time Ant runs.
You can choose three locations, by going -Ddest=LOCATION on the command line
-Ddest=user user lib dir ${user.home}/.ant/lib
-Ddest=system ant lib dir ${ant.home}/lib
-Ddest=optional optional dir $${basedir}/lib/optional (for Ant developers)
You can choose three locations, by going -Ddest=LOCATION on the command line
-Ddest=user user lib dir ${user.home}/.ant/lib
-Ddest=system ant lib dir ${ant.home}/lib
-Ddest=optional optional dir $${basedir}/lib/optional (for Ant developers)
You may also need to set proxy settings. On Java1.5, Ant tries to get
this from the OS, unless you use the -noproxy option.
You may also need to set proxy settings. On Java 1.5, Ant tries to get
this from the OS, unless you use the -noproxy option.
Proxies can be configured manually setting the JVM proxy values in the
ANT_OPTS environment variable.
Proxies can be configured manually setting the JVM proxy values in the
ANT_OPTS environment variable.
For example, to set the proxy up in the tcsh shell, the command would be
something like:
For example, to set the proxy up in the tcsh shell, the command would
be something like:
For csh/tcsh:
setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
For bash:
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
For Windows, set the environment variable in the appropriate dialog box
and open a new console. or, by hand
set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
</description>
For csh/tcsh:
setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
For bash:
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
For Windows, set the environment variable in the appropriate dialog box
and open a new console. or, by hand
set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
</description>
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
<property file="${user.home}/.ant/ant.properties"/>
<property name="lib.dir" location="lib" />
<property name="optional.dir" location="${lib.dir}/optional" />
<property name="userlib.dir" location="${user.home}/.ant/lib" />
<property name="lib.dir" location="lib"/>
<property name="optional.dir" location="${lib.dir}/optional"/>
<property name="userlib.dir" location="${user.home}/.ant/lib"/>
<!-- load in our properties table -->
<!-- Load in our properties table -->
<property file="${lib.dir}/libraries.properties"/>
<!-- Temporary cache for working files -->
<property name="temp.dir" location="${user.home}/.ant/tempcache" />
<property name="keep.temp.dir" value="true" />
<property name="temp.dir" location="${user.home}/.ant/tempcache"/>
<property name="keep.temp.dir" value="true"/>
<import file="get-m2.xml" />
<import file="get-m2.xml"/>
<target name="pick-dest">
<fail>
@@ -80,49 +80,58 @@ Set -Ddest=LOCATION on the command line
</fail>
<condition property="dest.dir"
value="${lib.dir}">
<equals arg1="${dest}" arg2="system" />
value="${lib.dir}">
<equals arg1="${dest}" arg2="system"/>
</condition>
<condition property="dest.dir"
value="${optional.dir}">
<equals arg1="${dest}" arg2="optional" />
value="${optional.dir}">
<equals arg1="${dest}" arg2="optional"/>
</condition>
<condition property="dest.dir"
value="${userlib.dir}">
<equals arg1="${dest}" arg2="user" />
value="${userlib.dir}">
<equals arg1="${dest}" arg2="user"/>
</condition>
<fail unless="dest.dir">Unknown destination : ${dest}</fail>
<echo>Downloading to ${dest.dir}</echo>
<property name="m2.dest.dir" value="${dest.dir}" />
<property name="m2.dest.dir" value="${dest.dir}"/>
</target>
<target name="macros" depends="pick-dest,get-m2"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<fail>
Cannot execute multiple targets due to the bug in Maven Ant tasks
<condition>
<contains string="${ant.project.invoked-targets}" substring=","/>
</condition>
</fail>
<macrodef name="f2">
<attribute name="project" />
<attribute name="project"/>
<attribute name="archive" default="@{project}"/>
<attribute name="repository" default="${m2.repo}"/>
<attribute name="id" default="central"/>
<sequential>
<fail>
Unknown archive @{archive} -no property @{archive}.version defined in ${lib.dir}/libraries.properties.
Unknown archive @{archive} -no property @{archive}.version defined in ${lib.dir}/libraries.properties.
<condition>
<not>
<isset property="@{archive}.version"/>
<isset property="@{archive}.version"/>
</not>
</condition>
</fail>
<artifact:dependencies pathID="@{archive}.path">
<dependency groupID="@{project}"
artifactID="@{archive}"
version="${@{archive}.version}"/>
<remoteRepository url="@{repository}" />
<artifact:dependencies pathID="@{archive}.path" useScope="runtime">
<dependency groupId="@{project}"
artifactId="@{archive}"
version="${@{archive}.version}">
<!-- exclude dependencies of ant-antunit (they should be in optional scope) -->
<exclusion groupId="org.apache.ant" artifactId="ant"/>
<exclusion groupId="org.apache.ant" artifactId="ant-launcher"/>
</dependency>
<artifact:remoteRepository url="@{repository}" id="@{id}"/>
</artifact:dependencies>
<!-- now we are left with the problem of getting the files
into our directory -->
<!-- now we are left with the problem of getting the files into our directory -->
<copy todir="${dest.dir}">
<path refid="@{archive}.path" />
<path refid="@{archive}.path"/>
<flattenmapper/>
</copy>
</sequential>
@@ -131,43 +140,41 @@ Set -Ddest=LOCATION on the command line
<target name="nonm2-macros" depends="pick-dest">
<macrodef name="get-ftp-file">
<attribute name="host" />
<attribute name="host"/>
<attribute name="port" default="21"/>
<attribute name="remotedir" />
<attribute name="filename" />
<attribute name="localdir" default="${dest.dir}" />
<attribute name="remotedir"/>
<attribute name="filename"/>
<attribute name="localdir" default="${dest.dir}"/>
<attribute name="user" default="anonymous"/>
<attribute name="pw" default="anonymous"/>
<sequential>
<ftp server="@{host}" port="@{port}" userid="@{user}" password="@{pw}" passive="true"
remotedir="@{remotedir}" action="get" depends="true" preserveLastModified="true"
skipFailedTransfers="true">
remotedir="@{remotedir}" action="get" depends="true" preserveLastModified="true"
skipFailedTransfers="true">
<fileset dir="@{localdir}">
<include name="@{filename}" />
<include name="@{filename}"/>
</fileset>
</ftp>
</sequential>
</macrodef>
</target>
<!-- any init stuff -->
<target name="init" depends="macros" />
<target name="init" depends="macros"/>
<target name="init-no-m2" depends="nonm2-macros" />
<target name="init-no-m2" depends="nonm2-macros"/>
<target name="init-cache">
<available property="temp.cache.already.exists" file="${temp.dir}" type="dir" />
<available property="temp.cache.already.exists" file="${temp.dir}" type="dir"/>
<condition property="user.wants.temp.cache">
<and>
<isset property="keep.temp.dir" />
<isset property="keep.temp.dir"/>
<not>
<or>
<equals arg1="${keep.temp.dir}" arg2="false" casesensitive="false" />
<equals arg1="${keep.temp.dir}" arg2="no" casesensitive="false" />
<equals arg1="${keep.temp.dir}" arg2="off" casesensitive="false" />
<equals arg1="${keep.temp.dir}" arg2="false" casesensitive="false"/>
<equals arg1="${keep.temp.dir}" arg2="no" casesensitive="false"/>
<equals arg1="${keep.temp.dir}" arg2="off" casesensitive="false"/>
</or>
</not>
</and>
@@ -175,161 +182,209 @@ Set -Ddest=LOCATION on the command line
<condition property="delete.temp.cache">
<and>
<not>
<isset property="temp.cache.already.exists" />
<isset property="temp.cache.already.exists"/>
</not>
<not>
<isset property="user.wants.temp.cache" />
<isset property="user.wants.temp.cache"/>
</not>
</and>
</condition>
</target>
<target name="-setup-temp-cache" depends="init-cache" unless="temp.cache.already.exists"
description="Setup temporary cache for downloaded files">
<mkdir dir="${temp.dir}" />
description="Set up temporary cache for downloaded files">
<mkdir dir="${temp.dir}"/>
</target>
<target name="-cleanup-temp-cache" depends="init-cache" if="delete.temp.cache"
description="Gets rid of the temporary cache directory">
<delete dir="${temp.dir}" />
description="Get rid of the temporary cache directory">
<delete dir="${temp.dir}"/>
</target>
<target name="diag" depends="init">
<echoproperties />
<echoproperties/>
</target>
<target name="antunit"
description="load AntUnit library"
depends="init">
<f2 project="org.apache.ant" archive="ant-antunit"/>
</target>
<target name="ivy"
description="load Ivy dependency manager"
depends="init">
<f2 project="org.apache.ivy" archive="ivy"/>
</target>
<target name="logging"
description="load logging libraries"
depends="init">
<f2 project="log4j" />
<f2 project="commons-logging" archive="commons-logging-api" />
description="load logging libraries (Commons and Log4j)"
depends="init">
<f2 project="log4j"/>
<f2 project="commons-logging" archive="commons-logging-api"/>
</target>
<target name="junit"
description="load junit libraries"
description="load JUnit libraries"
depends="init">
<f2 project="junit"/>
<f2 project="org.hamcrest" archive="hamcrest-library"/>
</target>
<target name="junitlauncher"
description="load junitlauncher libraries"
depends="init">
<f2 project="junit" />
<f2 project="org.junit.platform" archive="junit-platform-launcher" />
</target>
<target name="junit-engine-jupiter"
description="load junit jupiter engine libraries (necessary only for internal Ant project tests)"
depends="init">
<f2 project="org.junit.jupiter" archive="junit-jupiter-engine" />
</target>
<target name="junit-engine-vintage"
description="load junit vintage engine libraries (necessary only for internal Ant project tests)"
depends="init">
<f2 project="org.junit.vintage" archive="junit-vintage-engine" />
</target>
<target name="xml"
description="load full XML libraries (xalan, resolver)"
depends="init">
<f2 project="xalan" />
<f2 project="xml-resolver" />
description="load full XML libraries (Xalan and xml-resolver)"
depends="init">
<f2 project="xalan"/>
<f2 project="xml-resolver"/>
</target>
<target name="networking"
description="load networking libraries (commons-net; jsch)"
depends="init">
<f2 project="commons-net" />
description="load networking libraries (commons-net and JSch)"
depends="init">
<f2 project="commons-net"/>
<f2 project="com.jcraft" archive="jsch"/>
</target>
<target name="regexp"
description="load regexp libraries"
depends="init">
<f2 project="regexp" />
<f2 project="oro" />
description="load regexp libraries"
depends="init">
<f2 project="jakarta-regexp"/>
<f2 project="oro"/>
</target>
<target name="antlr"
description="load antlr libraries"
depends="init">
<f2 project="antlr" />
description="load ANother Tool for Language Recognition (ANTLR)"
depends="init">
<f2 project="antlr"/>
</target>
<target name="bcel"
description="load bcel libraries"
depends="init">
<f2 project="bcel" />
description="load Byte Code Engineering Library (BCEL)"
depends="init">
<f2 project="org.apache.bcel" archive="bcel"/>
</target>
<target name="jdepend"
description="load jdepend libraries"
depends="init">
<f2 project="jdepend" />
description="load JDepend libraries"
depends="init">
<f2 project="jdepend"/>
</target>
<target name="bsf"
description="load bsf libraries"
depends="init">
<f2 project="bsf" />
description="load Bean Scripting Framework"
depends="init">
<f2 project="bsf"/>
</target>
<target name="jruby"
description="load jruby"
description="load JRuby"
depends="bsf">
<f2 project="org.jruby" archive="jruby"/>
</target>
<target name="beanshell"
description="load beanshell support"
description="load BeanShell support"
depends="bsf">
<f2 project="org.beanshell" archive="bsh"/>
<f2 project="org.beanshell" archive="bsh-core"/>
</target>
<target name="jython"
description="load jython"
description="load Jython"
depends="bsf">
<f2 project="jython" archive="jython"/>
<f2 project="org.python" archive="jython"/>
</target>
<target name="rhino"
description="load rhino"
description="load Rhino"
depends="bsf">
<f2 project="rhino" archive="js"/>
<f2 project="org.mozilla" archive="rhino"/>
</target>
<target name="script"
description="load script languages (except jython)"
description="load script languages (except Jython)"
depends="bsf,jruby,beanshell,rhino"/>
<target name="debugging"
description="internal ant debugging"
description="internal Ant debugging"
depends="init">
<f2 project="which" />
<f2 project="which"/>
</target>
<target name="javamail" depends="init"
description="load javamail">
<f2 project="javax.mail" archive="mail"/>
<target name="javamail"
description="load Java Mail"
depends="init">
<f2 project="javax.mail" archive="javax.mail-api"/>
</target>
<target name="jspc" depends="init" description="loads Jasper">
<target name="jspc"
description="load Jasper"
depends="init">
<f2 project="tomcat" archive="jasper-compiler"/>
<f2 project="tomcat" archive="jasper-runtime"/>
<f2 project="javax.servlet" archive="servlet-api"/>
</target>
<target name="jai" depends="init"
description="load java advanced imaging">
<f2 project="javax.media" archive="jai-core" repository="https://repository.jboss.org/nexus/content/groups/public/"/>
<f2 project="com.sun.media" archive="jai-codec" repository="https://repository.jboss.org/nexus/content/groups/public/"/>
<target name="jai"
description="load Java Advanced Imaging"
depends="init">
<f2 project="javax.media" archive="jai-core" id="jboss"
repository="https://repository.jboss.org/nexus/content/groups/public/"/>
<f2 project="com.sun.media" archive="jai-codec" id="jboss"
repository="https://repository.jboss.org/nexus/content/groups/public/"/>
</target>
<target name="netrexx" depends="init-no-m2,-setup-temp-cache,-fetch-netrexx,-fetch-netrexx-no-commons-net"
description="load NetRexx compiler">
<target name="netrexx"
description="load NetRexx compiler"
depends="init-no-m2,-setup-temp-cache,-fetch-netrexx,-fetch-netrexx-no-commons-net">
<copy todir="${dest.dir}" flatten="true">
<zipfileset src="${temp.dir}/NetRexx.zip">
<include name="NetRexx\lib\NetRexxC.jar" />
<include name="NetRexx\browse\license.txt" />
<include name="NetRexx\lib\NetRexxC.jar"/>
<include name="NetRexx\browse\license.txt"/>
</zipfileset>
</copy>
<antcall target="-cleanup-temp-cache"/>
</target>
<available property="have.commons.net" classname="org.apache.commons.net.ftp.FTPClientConfig"/>
<target name="-fetch-netrexx" if="have.commons.net">
<get-ftp-file host="ftp.software.ibm.com" remotedir="/software/awdtools/netrexx"
filename="NetRexx.zip" localdir="${temp.dir}" />
filename="NetRexx.zip" localdir="${temp.dir}"/>
</target>
<target name="-fetch-netrexx-no-commons-net" unless="have.commons.net">
<get src="ftp://ftp.software.ibm.com/software/awdtools/netrexx/NetRexx.zip" dest="${temp.dir}/NetRexx.zip" skipexisting="true"/>
<get src="ftp://ftp.software.ibm.com/software/awdtools/netrexx/NetRexx.zip"
dest="${temp.dir}/NetRexx.zip" skipexisting="true"/>
</target>
<target name="xz"
description="load XZ for Java"
depends="init">
<f2 project="org.tukaani" archive="xz"/>
</target>
<target name="all"
description="load all the libraries (except jython)"
depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,javamail,jspc,jai,netrexx" />
depends="antunit,ivy,logging,junit,junitlauncher,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,
javamail,jspc,jai,xz,netrexx,junit-engine-vintage,junit-engine-jupiter"/>
</project>

Binary file not shown.

View File

@@ -27,13 +27,13 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-antlr</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + ANTLR</name>
<description>antlr specific task.
The implementation forks a java process, therefore the antlr jar file is only needed at runtime</description>
@@ -41,15 +41,14 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
<!-- add a dependency with antlr 2.7.2 consistent with libraries.properties antlr 2.7.6 is also available on ibiblio-->
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.2</version>
<version>2.7.7</version>
<optional>true</optional>
<scope>runtime</scope>
</dependency>

Binary file not shown.

View File

@@ -27,25 +27,25 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-bcel</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + BCEL</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>bcel</groupId>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>5.1</version>
<version>6.2</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -27,19 +27,19 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-bsf</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + BSF</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>

Binary file not shown.

View File

@@ -26,25 +26,25 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-log4j</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Log4J</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
<version>1.2.17</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -27,19 +27,19 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-oro</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Apache Oro</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -48,6 +48,12 @@
<version>2.0.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>

Binary file not shown.

View File

@@ -26,25 +26,25 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-regexp</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Apache Regexp</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>regexp</groupId>
<artifactId>regexp</artifactId>
<version>1.3</version>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -26,25 +26,25 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-resolver</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Apache Resolver</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>1.1</version>
<version>1.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -55,7 +55,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>org/apache/tools/ant/types/resolver/**</include>
<include>org/apache/tools/ant/types/resolver/*.java</include>
</includes>
</configuration>
</plugin>

Binary file not shown.

View File

@@ -26,26 +26,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-xalan2</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Xalan 2</name>
<description>contains Xalan2-specific features</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<version>2.7.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -72,7 +72,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>

Binary file not shown.

View File

@@ -26,26 +26,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-commons-logging</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Commons Logging</name>
<description>Ant Listener based on commons-logging</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.4</version>
<version>1.1</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -26,26 +26,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Commons Net</name>
<description>ftp, rexec and telnet tasks</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.0</version>
<version>3.6</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -27,13 +27,13 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jai</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JAI</name>
<description>image task and corresponding types.
</description>
@@ -41,7 +41,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>

Binary file not shown.

View File

@@ -26,13 +26,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-javamail</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JavaMail</name>
<description>implementation of the mail task based on javamail.
Required to send emails to SMTP servers using user/password combinations
@@ -41,22 +41,16 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<artifactId>javax.mail-api</artifactId>
<version>1.6.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>

Binary file not shown.

View File

@@ -27,13 +27,13 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jdepend</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JDepend</name>
<description>task jdepend invoking the jdepend parser. There is also a version 2.9.1 of the
jdepend parser available on the maven repository</description>
@@ -41,13 +41,13 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jdepend</groupId>
<artifactId>jdepend</artifactId>
<version>2.7</version>
<version>2.9.1</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -26,13 +26,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jmf</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JMF</name>
<description>contains the sound task and a soundplayer listener
download the dependency from http://java.sun.com/products/java-media/jmf/</description>
@@ -40,7 +40,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -26,13 +26,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JSch</name>
<description>contains the sshexec and scp tasks
</description>
@@ -40,13 +40,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.50</version>
<version>0.1.54</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -26,26 +26,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JUnit</name>
<description>contains the junit and junirreport tasks</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -67,12 +67,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<fileset dir="${project.build.sourceDirectory}/../etc">
<include name="junit-frames.xsl"/>
<include name="junit-noframes.xsl"/>
<include name="junit-frames-saxon.xsl"/>
<include name="junit-noframes-saxon.xsl"/>
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>

Binary file not shown.

View File

@@ -26,26 +26,26 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit4</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + JUnit 4</name>
<description>contains JUnit 4.x support</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>compile</scope>
</dependency>
</dependencies>

Binary file not shown.

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This POM has been created manually by the Ant Development Team.
Please contact us if you are not satisfied with the data contained in this POM.
URL : http://ant.apache.org
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junitlauncher</artifactId>
<version>1.10.5</version>
<name>Apache Ant + JUnit 5</name>
<description>contains JUnit 5.x support</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>org/apache/tools/ant/taskdefs/optional/junitlauncher/*</include>
</includes>
<testIncludes>
<include>org/apache/tools/ant/taskdefs/optional/junitlauncher/*</include>
</testIncludes>
</configuration>
</plugin>
</plugins>
<sourceDirectory>../../../../src/main</sourceDirectory>
<testSourceDirectory>../../../../src/tests/junit</testSourceDirectory>
<outputDirectory>../../../../target/${project.artifactId}/classes</outputDirectory>
<testOutputDirectory>../../../../target/${project.artifactId}/testcases</testOutputDirectory>
<directory>../../../../target/${project.artifactId}</directory>
</build>
</project>

Binary file not shown.

View File

@@ -27,13 +27,13 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant Launcher</name>
<build>
<plugins>
@@ -44,7 +44,6 @@
<includes>
<include>org/apache/tools/ant/launch/*.java</include>
</includes>
</configuration>
</plugin>
</plugins>

Binary file not shown.

View File

@@ -26,13 +26,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-netrexx</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + NetRexx</name>
<description>NetRexxC task
dependency can be downloaded from http://www.ibm.com/software/awdtools/netrexx/download.html</description>
@@ -40,7 +40,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<!-- Processed too early, before maven-antrun-plugin gets a chance to work:

View File

@@ -20,12 +20,13 @@
Please contact us if you are not satisfied with the data contained in this POM.
URL : http://ant.apache.org
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<packaging>pom</packaging>
<description>master POM</description>
<licenses>
@@ -51,9 +52,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
</repository>
</distributionManagement>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/ant/core/trunk</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/core/trunk</developerConnection>
<url>http://svn.apache.org/repos/asf/ant/core/trunk</url>
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/ant.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/ant.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf/ant.git</url>
</scm>
<ciManagement>
<system>hudson</system>
@@ -98,16 +99,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<module>ant-jsch</module>
<module>ant-junit</module>
<module>ant-junit4</module>
<module>ant-junitlauncher</module>
<module>ant-launcher</module>
<module>ant-netrexx</module>
<module>ant-swing</module>
<module>ant-testutil</module>
<module>ant-xz</module>
</modules>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -121,26 +124,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.7.0</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>2.21.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.12</version>
<version>2.21.0</version>
</plugin>
</plugins>
</pluginManagement>

Binary file not shown.

View File

@@ -27,20 +27,20 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-swing</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant + Swing</name>
<description>a listener and a splash task based on Swing</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -62,5 +62,4 @@
<testOutputDirectory>../../../../target/${project.artifactId}/testcases</testOutputDirectory>
<directory>../../../../target/${project.artifactId}</directory>
</build>
</project>

Binary file not shown.

View File

@@ -27,26 +27,26 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant Test Utilities</name>
<description>test utility classes</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -70,5 +70,4 @@
<outputDirectory>../../../../target/${project.artifactId}/classes</outputDirectory>
<directory>../../../../target/${project.artifactId}</directory>
</build>
</project>

BIN
lib/ant/lib/ant-xz.jar Normal file

Binary file not shown.

71
lib/ant/lib/ant-xz.pom Normal file
View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This POM has been created manually by the Ant Development Team.
Please contact us if you are not satisfied with the data contained in this POM.
URL : http://ant.apache.org
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant-xz</artifactId>
<version>1.10.5</version>
<name>Apache Ant + XZ for Java</name>
<description>contains the xz compression support</description>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>org/apache/tools/ant/taskdefs/optional/xz/*</include>
<include>org/apache/tools/ant/types/optional/xz/*</include>
</includes>
</configuration>
</plugin>
</plugins>
<sourceDirectory>../../../../src/main</sourceDirectory>
<testSourceDirectory>../../../../src/testcases</testSourceDirectory>
<outputDirectory>../../../../target/${project.artifactId}/classes</outputDirectory>
<testOutputDirectory>../../../../target/${project.artifactId}/testcases</testOutputDirectory>
<directory>../../../../target/${project.artifactId}</directory>
</build>
</project>

Binary file not shown.

View File

@@ -27,27 +27,49 @@
<groupId>org.apache.ant</groupId>
<artifactId>ant-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.9.4</version>
<version>1.10.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<url>http://ant.apache.org/</url>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<name>Apache Ant Core</name>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.9.4</version>
<version>1.10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-antunit</artifactId>
<version>1.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<filters>
@@ -98,46 +120,50 @@
<configuration>
<excludes>
<exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude>
<exclude>org/apache/tools/ant/types/resolver/**</exclude>
<exclude>org/apache/tools/ant/listener/Log4jListener*</exclude>
<exclude>org/apache/tools/ant/listener/CommonsLoggingListener*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaRegexp*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaOro*</exclude>
<exclude>org/apache/tools/ant/taskdefs/email/MimeMailer*</exclude>
<exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude>
<exclude>org/apache/tools/ant/launch/**</exclude>
<exclude>org/apache/tools/ant/listener/CommonsLoggingListener*</exclude>
<exclude>org/apache/tools/ant/listener/Log4jListener*</exclude>
<exclude>org/apache/tools/ant/taskdefs/email/MimeMailer*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/NetRexxC*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/Script*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/image/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/jdepend/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/junit/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/junitlauncher/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/net/FTP*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/net/RExec*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/net/TelnetTask*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/junit/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/ssh/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/image/*</exclude>
<exclude>org/apache/tools/ant/types/optional/image/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/Script*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/script/**</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/ssh/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/xz/*</exclude>
<exclude>org/apache/tools/ant/types/optional/*Script*</exclude>
<exclude>org/apache/tools/ant/types/optional/image/*</exclude>
<exclude>org/apache/tools/ant/types/optional/xz/*</exclude>
<exclude>org/apache/tools/ant/types/resolver/**</exclude>
<exclude>org/apache/tools/ant/util/ScriptRunner.java</exclude>
<exclude>org/apache/tools/ant/util/optional/ScriptRunner.java</exclude>
<exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude>
<exclude>org/apache/tools/ant/util/depend/bcel/*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/NetRexxC*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/jdepend/*</exclude>
<exclude>org/apache/tools/ant/util/optional/ScriptRunner.java</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaOro*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaRegexp*</exclude>
</excludes>
<testExcludes>
<exclude>org/apache/tools/ant/filters/util/JavaClassHelper*</exclude>
<exclude>org/apache/tools/ant/types/resolver/**</exclude>
<exclude>org/apache/tools/ant/util/Script*</exclude>
<exclude>org/apache/tools/ant/listener/Log4jListener*</exclude>
<exclude>org/apache/tools/ant/listener/CommonsLoggingListener*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaRegexp*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaOro*</exclude>
<exclude>org/apache/tools/ant/util/regexp/Jdk14Regexp*</exclude>
<exclude>org/apache/tools/ant/taskdefs/email/MimeMailer*</exclude>
<exclude>org/apache/tools/ant/launch/**</exclude>
<exclude>org/apache/tools/ant/listener/CommonsLoggingListener*</exclude>
<exclude>org/apache/tools/ant/listener/Log4jListener*</exclude>
<exclude>org/apache/tools/ant/taskdefs/StyleTest*</exclude>
<exclude>org/apache/tools/ant/taskdefs/email/MimeMailer*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/junit/</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/junitlauncher/</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/net/FTP*</exclude>
<exclude>org/apache/tools/ant/taskdefs/optional/ssh/*</exclude>
<exclude>org/apache/tools/ant/types/resolver/**</exclude>
<exclude>org/apache/tools/ant/util/Script*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaOro*</exclude>
<exclude>org/apache/tools/ant/util/regexp/JakartaRegexp*</exclude>
<exclude>org/apache/tools/ant/util/regexp/Jdk14Regexp*</exclude>
</testExcludes>
</configuration>
</plugin>
@@ -145,7 +171,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<omitBasedir>true</omitBasedir>
<basedir>../../../..</basedir>
<systemProperties>
<property>
<name>ant.home</name>
@@ -163,10 +189,6 @@
<name>offline</name>
<value>true</value>
</property>
<property>
<name>root</name>
<value>../../../..</value>
</property>
</systemProperties>
</configuration>
</plugin>

View File

@@ -13,53 +13,61 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#this file declares the libraries for use in
#a given release of the components
# This file declares the libraries for use in a given release of the components
#if you change this, change the checksum to match
m2.version=2.0.4
m2.url=http\://repo1.maven.org/maven2
m2.artifact-name=maven-artifact-ant
m2.jar.name=${m2.artifact-name}-${m2.version}-dep.jar
# If you change this, change the checksum to match
m2.version=2.1.3
m2.url=https://archive.apache.org/dist/maven/ant-tasks
m2.artifact-name=maven-ant-tasks
m2.jar.name=${m2.artifact-name}-${m2.version}.jar
#this is the URL of the antlib library, that is pulled down for everything else.
m2.antlib.url=${m2.url}/org/apache/maven/${m2.artifact-name}/${m2.version}/${m2.jar.name}
m2.antlib.url=${m2.url}/${m2.version}/binaries/${m2.jar.name}
#this is the sha1 checksum of the artifact
m2.sha1.checksum=4e7ddfdb91600e9b59bb965ff8eef2f06015df50
m2.sha1.checksum=b09be554228d66d208e5fef5266844aacf443abc
# Repository to use by default for fetching dependencies.
m2.repo=http://repo1.maven.org/maven2/
#versions of different libraries. Please keep in alphabetical order, except
#when a specific dependency forces them to be out-of-order
# Versions of different libraries. Please keep in alphabetical order, except
# when a specific dependency forces them to be out-of-order
ivy.version=2.4.0
ant-antunit.version=1.4
antlr.version=2.7.7
bcel.version=5.1
bcel.version=6.2
bsf.version=2.4.0
bsh.version=2.0b4
bsh-core.version=${bsh.version}
commons-net.version=1.4.1
commons-net.version=3.6
commons-logging.version=1.1
commons-logging-api.version=${commons-logging.version}
hamcrest-core.version=1.3
hamcrest-library.version=${hamcrest-core.version}
jai-core.version=1.1.3
jai-codec.version=1.1.3
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
jdepend.version=2.9.1
jruby.version=0.9.8
junit.version=4.11
jsch.version=0.1.50
jython.version=2.1
#log4j 1.2.15 requires JMS and a few other Sun jars that are not in the m2 repo
jruby.version=1.6.8
junit.version=4.12
rhino.version=1.7.10
junit-platform-launcher.version=1.2.0
# Only used for internal tests in Ant project
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
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
#js is the javascript implementation of the rhino project
#17R1 is compiled with Java5 so we can't use the jar when building with JDK 1.4
js.version=1.6R7
oro.version=2.0.8
regexp.version=1.3
servlet-api.version=2.3
which.version=1.0
xalan.version=2.7.1
xalan.version=2.7.2
xml-resolver.version=1.2
mail.version=1.4
#paired
xz.version=1.8
# paired
jacl.version=1.2.6
tcljava.version=${jacl.version}

48
lib/ant/patch.xml Normal file
View File

@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
=======================================================================
Use Apache Ant to generate a patch file for Apache Ant.
=======================================================================
-->
<project name="create-patch" default="patchpackage" basedir=".">
<property environment="env"/>
<property name="patch.package" value="patch.tar.gz"/>
<property name="patch.file" value="patch.txt"/>
<condition property="git.found">
<or>
<available file="git" filepath="${env.PATH}"/>
<available file="git.exe" filepath="${env.PATH}"/>
<available file="git.exe" filepath="${env.Path}"/>
</or>
</condition>
<target name="createpatch">
<fail unless="git.found"
message="You need a version of git to create the patch"/>
<exec executable="git" output="${patch.file}">
<arg value="diff"/>
</exec>
</target>
<target name="patchpackage" depends="createpatch">
<gzip src="${patch.file}" destfile="${patch.file}.gz"/>
</target>
</project>

BIN
lib/ant/src.zip Normal file

Binary file not shown.

Binary file not shown.