mirror of https://gitee.com/openkylin/ant.git
Import Upstream version 1.10.13
This commit is contained in:
commit
885d0fe350
|
@ -0,0 +1,485 @@
|
||||||
|
Amongst other, the following people contributed to ant:
|
||||||
|
|
||||||
|
Adam Blinkinsop
|
||||||
|
Adam Bryzak
|
||||||
|
Adam Murdoch
|
||||||
|
Adam Retter
|
||||||
|
Adam Sotona
|
||||||
|
Adrian Nistor
|
||||||
|
Adrien Grand
|
||||||
|
Aleksandr Ishutin
|
||||||
|
Aleksei Zotov
|
||||||
|
Alex
|
||||||
|
Alex Rosen
|
||||||
|
Alexander Grund
|
||||||
|
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
|
||||||
|
Arcadius Ahouansou
|
||||||
|
Arjan Veenstra
|
||||||
|
Arnaud Vandyck
|
||||||
|
Arnout J. Kuiper
|
||||||
|
Arturo Bernal
|
||||||
|
Arun Jamwal
|
||||||
|
Aslak Hellesôy
|
||||||
|
Atsuhiko Yamanaka
|
||||||
|
Avik Sengupta
|
||||||
|
Balazs Fejes 2
|
||||||
|
barney2k7
|
||||||
|
Bart Vanhaute
|
||||||
|
Basil Crow
|
||||||
|
Ben Galbraith
|
||||||
|
Ben Gertzfield
|
||||||
|
Benjamin Burgess
|
||||||
|
Benoit Moussaud
|
||||||
|
Bernd Dutkowski
|
||||||
|
Bernhard Rosenkraenzer
|
||||||
|
Brad Clark
|
||||||
|
Brant Langer Gurganus
|
||||||
|
Brian Curnow
|
||||||
|
Brian Deitte
|
||||||
|
Brian Felder
|
||||||
|
Brian Repko
|
||||||
|
Bruce Atherton
|
||||||
|
Cedomir Igaly
|
||||||
|
Charles Duffy
|
||||||
|
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
|
||||||
|
Costin Manolache
|
||||||
|
Craeg Strong
|
||||||
|
Craig Cottingham
|
||||||
|
Craig R. McClanahan
|
||||||
|
Craig Pell
|
||||||
|
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
|
||||||
|
Darrell DeBoer
|
||||||
|
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
|
||||||
|
Don Brown
|
||||||
|
Don Ferguson
|
||||||
|
Don Jeffery
|
||||||
|
Donal Quinlan
|
||||||
|
Donald Leslie
|
||||||
|
Drew Sudell
|
||||||
|
Earl Hood
|
||||||
|
Edison Guo
|
||||||
|
Eduard Wirch
|
||||||
|
Edwin Woudt
|
||||||
|
Eli Tucker
|
||||||
|
Emmanuel Bourg
|
||||||
|
Eugène Adell
|
||||||
|
Eric Barboni
|
||||||
|
Eric Delaunay
|
||||||
|
Eric Olsen
|
||||||
|
Eric Pugh
|
||||||
|
Erik Costlow
|
||||||
|
Erik Hatcher
|
||||||
|
Erik Langenbach
|
||||||
|
Erik Meade
|
||||||
|
Ernst de Haan
|
||||||
|
Francesco Steccanella
|
||||||
|
Frank Harnack
|
||||||
|
Frank Somers
|
||||||
|
Frank Zeyda
|
||||||
|
František Kučera
|
||||||
|
Frédéric Bothamy
|
||||||
|
Frederic Lavigne
|
||||||
|
Gal Shachor
|
||||||
|
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
|
||||||
|
Gösen
|
||||||
|
Greg Nelson
|
||||||
|
Greg Roodt
|
||||||
|
Greg Schueler
|
||||||
|
Grégoire Vatry
|
||||||
|
Günther Kögel
|
||||||
|
Harish Prabandham
|
||||||
|
Haroon Rafique
|
||||||
|
Helder Pereira
|
||||||
|
Hiroaki Nakamura
|
||||||
|
Holger Engels
|
||||||
|
Holger Joest
|
||||||
|
Ignacio Coloma
|
||||||
|
Ingenonsya France
|
||||||
|
Ingmar Stein
|
||||||
|
Irene Rusman
|
||||||
|
Isaac Shabtay
|
||||||
|
Issa Gorissen
|
||||||
|
Ivan Ivanov
|
||||||
|
J Bleijenbergh
|
||||||
|
JC Mann
|
||||||
|
Jack J. Woehr
|
||||||
|
Jacobus Martinus Kruithof
|
||||||
|
Jaikiran Pai
|
||||||
|
James Duncan Davidson
|
||||||
|
James Todd
|
||||||
|
Jan Cumps
|
||||||
|
Jan Matèrne
|
||||||
|
Jan Mynarik
|
||||||
|
Jan Stolze
|
||||||
|
Jason Hunter
|
||||||
|
Jason Pettiss
|
||||||
|
Jason Salter
|
||||||
|
Jason Yip
|
||||||
|
Jay Dickon Glanville
|
||||||
|
Jay Peck
|
||||||
|
Jay van der Meer
|
||||||
|
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
|
||||||
|
Jimmy Casey
|
||||||
|
Joel Tucci
|
||||||
|
Joerg Wassmer
|
||||||
|
Joey Richey
|
||||||
|
Johann Herunter
|
||||||
|
John Elion
|
||||||
|
John Sisson
|
||||||
|
Jon Dickinson
|
||||||
|
Jon Skeet
|
||||||
|
Jon S. Stevens
|
||||||
|
Jonathan K. Schneider
|
||||||
|
Jose Alberto Fernandez
|
||||||
|
Joseph Walton
|
||||||
|
Josh Lucas
|
||||||
|
Juerg Wanner
|
||||||
|
Julian Simpson
|
||||||
|
Julien Lepiller
|
||||||
|
Justin Vallon
|
||||||
|
Justyna Horwat
|
||||||
|
Karl Jansen
|
||||||
|
Keiron Liddle
|
||||||
|
Keith Visco
|
||||||
|
Keith W. Campbell
|
||||||
|
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
|
||||||
|
Marc Guillemot
|
||||||
|
Marc Strapetz
|
||||||
|
Marcel Schutte
|
||||||
|
Marcus Börger
|
||||||
|
Mario Frasca
|
||||||
|
Mariusz Nowostawski
|
||||||
|
Mark A. Ziesemer
|
||||||
|
Mark DeLaFranier
|
||||||
|
Mark Harmer
|
||||||
|
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 Warman
|
||||||
|
Matthew Watson
|
||||||
|
Matthew Yanos
|
||||||
|
Matthias Bhend
|
||||||
|
Matthias Gutheil
|
||||||
|
Matthias Johann Vill
|
||||||
|
Michael Bayne
|
||||||
|
Michael Clarke
|
||||||
|
Michael Davey
|
||||||
|
Michael J. Sikorsky
|
||||||
|
Michael McCallum
|
||||||
|
Michael Montuori
|
||||||
|
Michael Newcomb
|
||||||
|
Michael Nygard
|
||||||
|
Michael Saunders
|
||||||
|
Michael Seele
|
||||||
|
Mickaël Guessant
|
||||||
|
Miha
|
||||||
|
Mike Davis
|
||||||
|
Mike Roberts
|
||||||
|
Mike Williams
|
||||||
|
Mikolaj Izdebski
|
||||||
|
Miroslav Zaťko
|
||||||
|
Mounir El Hajj
|
||||||
|
Nathan Beyer
|
||||||
|
Nick Chalko
|
||||||
|
Nick Crossley
|
||||||
|
Nick Davis
|
||||||
|
Nick Fortescue
|
||||||
|
Nick King
|
||||||
|
Nick Pellow
|
||||||
|
Nico Seessle
|
||||||
|
Nicola Ken Barozzi
|
||||||
|
Nicolas Lalevée
|
||||||
|
Nigel Magnay
|
||||||
|
Oliver Merkel
|
||||||
|
Oliver Rossmueller
|
||||||
|
Olivier Parent
|
||||||
|
Omer Shapira
|
||||||
|
Ondra Medek
|
||||||
|
Patrick Altaie
|
||||||
|
Patrick C. Beard
|
||||||
|
Patrick Chanezon
|
||||||
|
Patrick Gus Heck
|
||||||
|
Patrick Martin
|
||||||
|
Paul Austin
|
||||||
|
Paul Christmann
|
||||||
|
Paul Galbraith
|
||||||
|
Paul King
|
||||||
|
Paulo Gaspar
|
||||||
|
Pavan Bayyapu
|
||||||
|
Pavel Jisl
|
||||||
|
Paweł 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
|
||||||
|
Piotr P. Karwasz
|
||||||
|
Preston Bannister
|
||||||
|
Ralf Hergert
|
||||||
|
Rami Ojares
|
||||||
|
Randy Watler
|
||||||
|
Raphael Pierquin
|
||||||
|
Ray Waldin
|
||||||
|
Razzi Abuissa
|
||||||
|
Reinhard Pointner
|
||||||
|
Remie Bolte
|
||||||
|
René Krell
|
||||||
|
Reudismam Rolim
|
||||||
|
Richard Evans
|
||||||
|
Richard Steele
|
||||||
|
Rick Beton
|
||||||
|
Rob Oxspring
|
||||||
|
Rob van Oostrum
|
||||||
|
Rob Riasol
|
||||||
|
Robbie Gibson
|
||||||
|
Robert H. Anderson
|
||||||
|
Robert Clark
|
||||||
|
Robert Flaherty
|
||||||
|
Robert Shaw
|
||||||
|
Robert Streich
|
||||||
|
Robert Watkins
|
||||||
|
Roberto Scaramuzzi
|
||||||
|
Robin Green
|
||||||
|
Robin Power
|
||||||
|
Robin Verduijn
|
||||||
|
Rodrigo Schmidt
|
||||||
|
Roger Vaughn
|
||||||
|
Roman Ivashin
|
||||||
|
Roman Savko
|
||||||
|
Ronen Mashal
|
||||||
|
Russell Gold
|
||||||
|
Ryan Bennitt
|
||||||
|
Sam Ruby
|
||||||
|
Sandra Metz
|
||||||
|
Santosh R. Dhariwal
|
||||||
|
Scott Carlson
|
||||||
|
Scott Ellsworth
|
||||||
|
Scott Johnson
|
||||||
|
Scott M. Stirling
|
||||||
|
Sean Egan
|
||||||
|
Sean P. Kane
|
||||||
|
Sebastian Kantha
|
||||||
|
Sebastien Arod
|
||||||
|
Shiraz Kanga
|
||||||
|
Simeon Fitch
|
||||||
|
Simon Law
|
||||||
|
Simon Legner
|
||||||
|
Simone Bordet
|
||||||
|
Stefan Bodewig
|
||||||
|
Stefan Heimann
|
||||||
|
Stefano Mazzocchi
|
||||||
|
stephan
|
||||||
|
Stephan Michels
|
||||||
|
Stephan Strittmatter
|
||||||
|
Stephane Bailliez
|
||||||
|
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
|
||||||
|
Taylor Smock
|
||||||
|
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
|
||||||
|
TJ Rothwell
|
||||||
|
Tom Ball
|
||||||
|
Tom Brus
|
||||||
|
Tom Cunningham
|
||||||
|
Tom Dimock
|
||||||
|
Tom Eugelink
|
||||||
|
Tom May
|
||||||
|
Tomasz Bech
|
||||||
|
Tomáš Zezula
|
||||||
|
Tony Gravagno
|
||||||
|
Trejkaz Xaoza
|
||||||
|
Ulrich Schmidt
|
||||||
|
Uwe Schindler
|
||||||
|
Valentino Miazzo
|
||||||
|
Victor Toni
|
||||||
|
Ville Skyttä
|
||||||
|
Vimil Saju
|
||||||
|
Vincent Legoll
|
||||||
|
Vincent Privat
|
||||||
|
Vitold Sedyshev
|
||||||
|
Vladislav Bauer
|
||||||
|
Volker Leidl
|
||||||
|
Waldek Herka
|
||||||
|
Wang Weijun
|
||||||
|
Wenjing Wang
|
||||||
|
Will Wang
|
||||||
|
William Bernardet
|
||||||
|
William Ferguson
|
||||||
|
William Webber
|
||||||
|
Wolf Siberski
|
||||||
|
Wolfgang Baer
|
||||||
|
Wolfgang Frech
|
||||||
|
Wolfgang Glas
|
||||||
|
Wolfgang Werner
|
||||||
|
Xavier Hanin
|
||||||
|
Xavier Witdouck
|
||||||
|
Xia Li
|
||||||
|
Yohann Roussel
|
||||||
|
Yuji Yamano
|
||||||
|
Yves Martin
|
||||||
|
Zach Garner
|
||||||
|
Zdenek Wagner
|
||||||
|
Øystein Gisnås
|
|
@ -0,0 +1,2 @@
|
||||||
|
For installation instructions see the manual by opening manual/index.html
|
||||||
|
or see it online at <https://ant.apache.org/manual/index.html>.
|
|
@ -0,0 +1,272 @@
|
||||||
|
/*
|
||||||
|
* Apache License
|
||||||
|
* Version 2.0, January 2004
|
||||||
|
* http://www.apache.org/licenses/
|
||||||
|
*
|
||||||
|
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
*
|
||||||
|
* 1. Definitions.
|
||||||
|
*
|
||||||
|
* "License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
* and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
*
|
||||||
|
* "Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
* the copyright owner that is granting the License.
|
||||||
|
*
|
||||||
|
* "Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
* other entities that control, are controlled by, or are under common
|
||||||
|
* control with that entity. For the purposes of this definition,
|
||||||
|
* "control" means (i) the power, direct or indirect, to cause the
|
||||||
|
* direction or management of such entity, whether by contract or
|
||||||
|
* otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
* outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
*
|
||||||
|
* "You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
* exercising permissions granted by this License.
|
||||||
|
*
|
||||||
|
* "Source" form shall mean the preferred form for making modifications,
|
||||||
|
* including but not limited to software source code, documentation
|
||||||
|
* source, and configuration files.
|
||||||
|
*
|
||||||
|
* "Object" form shall mean any form resulting from mechanical
|
||||||
|
* transformation or translation of a Source form, including but
|
||||||
|
* not limited to compiled object code, generated documentation,
|
||||||
|
* and conversions to other media types.
|
||||||
|
*
|
||||||
|
* "Work" shall mean the work of authorship, whether in Source or
|
||||||
|
* Object form, made available under the License, as indicated by a
|
||||||
|
* copyright notice that is included in or attached to the work
|
||||||
|
* (an example is provided in the Appendix below).
|
||||||
|
*
|
||||||
|
* "Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
* form, that is based on (or derived from) the Work and for which the
|
||||||
|
* editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
* represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
* of this License, Derivative Works shall not include works that remain
|
||||||
|
* separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
* the Work and Derivative Works thereof.
|
||||||
|
*
|
||||||
|
* "Contribution" shall mean any work of authorship, including
|
||||||
|
* the original version of the Work and any modifications or additions
|
||||||
|
* to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
* submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
* or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
* the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
* means any form of electronic, verbal, or written communication sent
|
||||||
|
* to the Licensor or its representatives, including but not limited to
|
||||||
|
* communication on electronic mailing lists, source code control systems,
|
||||||
|
* and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
* Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
* excluding communication that is conspicuously marked or otherwise
|
||||||
|
* designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
*
|
||||||
|
* "Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
* on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
* subsequently incorporated within the Work.
|
||||||
|
*
|
||||||
|
* 2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
* this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
* copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
* publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
* Work and such Derivative Works in Source or Object form.
|
||||||
|
*
|
||||||
|
* 3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
* this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
* (except as stated in this section) patent license to make, have made,
|
||||||
|
* use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
* where such license applies only to those patent claims licensable
|
||||||
|
* by such Contributor that are necessarily infringed by their
|
||||||
|
* Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
* with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
* institute patent litigation against any entity (including a
|
||||||
|
* cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
* or a Contribution incorporated within the Work constitutes direct
|
||||||
|
* or contributory patent infringement, then any patent licenses
|
||||||
|
* granted to You under this License for that Work shall terminate
|
||||||
|
* as of the date such litigation is filed.
|
||||||
|
*
|
||||||
|
* 4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
* Work or Derivative Works thereof in any medium, with or without
|
||||||
|
* modifications, and in Source or Object form, provided that You
|
||||||
|
* meet the following conditions:
|
||||||
|
*
|
||||||
|
* (a) You must give any other recipients of the Work or
|
||||||
|
* Derivative Works a copy of this License; and
|
||||||
|
*
|
||||||
|
* (b) You must cause any modified files to carry prominent notices
|
||||||
|
* stating that You changed the files; and
|
||||||
|
*
|
||||||
|
* (c) You must retain, in the Source form of any Derivative Works
|
||||||
|
* that You distribute, all copyright, patent, trademark, and
|
||||||
|
* attribution notices from the Source form of the Work,
|
||||||
|
* excluding those notices that do not pertain to any part of
|
||||||
|
* the Derivative Works; and
|
||||||
|
*
|
||||||
|
* (d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
* distribution, then any Derivative Works that You distribute must
|
||||||
|
* include a readable copy of the attribution notices contained
|
||||||
|
* within such NOTICE file, excluding those notices that do not
|
||||||
|
* pertain to any part of the Derivative Works, in at least one
|
||||||
|
* of the following places: within a NOTICE text file distributed
|
||||||
|
* as part of the Derivative Works; within the Source form or
|
||||||
|
* documentation, if provided along with the Derivative Works; or,
|
||||||
|
* within a display generated by the Derivative Works, if and
|
||||||
|
* wherever such third-party notices normally appear. The contents
|
||||||
|
* of the NOTICE file are for informational purposes only and
|
||||||
|
* do not modify the License. You may add Your own attribution
|
||||||
|
* notices within Derivative Works that You distribute, alongside
|
||||||
|
* or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
* that such additional attribution notices cannot be construed
|
||||||
|
* as modifying the License.
|
||||||
|
*
|
||||||
|
* You may add Your own copyright statement to Your modifications and
|
||||||
|
* may provide additional or different license terms and conditions
|
||||||
|
* for use, reproduction, or distribution of Your modifications, or
|
||||||
|
* for any such Derivative Works as a whole, provided Your use,
|
||||||
|
* reproduction, and distribution of the Work otherwise complies with
|
||||||
|
* the conditions stated in this License.
|
||||||
|
*
|
||||||
|
* 5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
* any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
* by You to the Licensor shall be under the terms and conditions of
|
||||||
|
* this License, without any additional terms or conditions.
|
||||||
|
* Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
* the terms of any separate license agreement you may have executed
|
||||||
|
* with Licensor regarding such Contributions.
|
||||||
|
*
|
||||||
|
* 6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
* names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
* except as required for reasonable and customary use in describing the
|
||||||
|
* origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
*
|
||||||
|
* 7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
* agreed to in writing, Licensor provides the Work (and each
|
||||||
|
* Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
* implied, including, without limitation, any warranties or conditions
|
||||||
|
* of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
* appropriateness of using or redistributing the Work and assume any
|
||||||
|
* risks associated with Your exercise of permissions under this License.
|
||||||
|
*
|
||||||
|
* 8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
* whether in tort (including negligence), contract, or otherwise,
|
||||||
|
* unless required by applicable law (such as deliberate and grossly
|
||||||
|
* negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
* liable to You for damages, including any direct, indirect, special,
|
||||||
|
* incidental, or consequential damages of any character arising as a
|
||||||
|
* result of this License or out of the use or inability to use the
|
||||||
|
* Work (including but not limited to damages for loss of goodwill,
|
||||||
|
* work stoppage, computer failure or malfunction, or any and all
|
||||||
|
* other commercial damages or losses), even if such Contributor
|
||||||
|
* has been advised of the possibility of such damages.
|
||||||
|
*
|
||||||
|
* 9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
* the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
* and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
* or other liability obligations and/or rights consistent with this
|
||||||
|
* License. However, in accepting such obligations, You may act only
|
||||||
|
* on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
* of any other Contributor, and only if You agree to indemnify,
|
||||||
|
* defend, and hold each Contributor harmless for any liability
|
||||||
|
* incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
* of your accepting any such warranty or additional liability.
|
||||||
|
*
|
||||||
|
* END OF TERMS AND CONDITIONS
|
||||||
|
*
|
||||||
|
* APPENDIX: How to apply the Apache License to your work.
|
||||||
|
*
|
||||||
|
* To apply the Apache License to your work, attach the following
|
||||||
|
* boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
* replaced with your own identifying information. (Don't include
|
||||||
|
* the brackets!) The text should be enclosed in the appropriate
|
||||||
|
* comment syntax for the file format. We also recommend that a
|
||||||
|
* file or class name and description of purpose be included on the
|
||||||
|
* same "printed page" as the copyright notice for easier
|
||||||
|
* identification within third-party archives.
|
||||||
|
*
|
||||||
|
* Copyright [yyyy] [name of copyright owner]
|
||||||
|
*
|
||||||
|
* Licensed 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
|
||||||
|
*
|
||||||
|
* https://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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
W3C® SOFTWARE NOTICE AND LICENSE
|
||||||
|
https://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
||||||
|
|
||||||
|
This work (and included software, documentation such as READMEs, or other
|
||||||
|
related items) is being provided by the copyright holders under the following
|
||||||
|
license. By obtaining, using and/or copying this work, you (the licensee) agree
|
||||||
|
that you have read, understood, and will comply with the following terms and
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
Permission to copy, modify, and distribute this software and its documentation,
|
||||||
|
with or without modification, for any purpose and without fee or royalty is
|
||||||
|
hereby granted, provided that you include the following on ALL copies of the
|
||||||
|
software and documentation or portions thereof, including modifications:
|
||||||
|
|
||||||
|
1. The full text of this NOTICE in a location viewable to users of the
|
||||||
|
redistributed or derivative work.
|
||||||
|
2. Any pre-existing intellectual property disclaimers, notices, or terms
|
||||||
|
and conditions. If none exist, the W3C Software Short Notice should be
|
||||||
|
included (hypertext is preferred, text is permitted) within the body
|
||||||
|
of any redistributed or derivative code.
|
||||||
|
3. Notice of any changes or modifications to the files, including the date
|
||||||
|
changes were made. (We recommend you provide URIs to the location from
|
||||||
|
which the code is derived.)
|
||||||
|
|
||||||
|
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
|
||||||
|
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||||
|
TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
|
||||||
|
THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
|
||||||
|
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||||
|
|
||||||
|
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
||||||
|
|
||||||
|
The name and trademarks of copyright holders may NOT be used in advertising or
|
||||||
|
publicity pertaining to the software without specific, written prior permission.
|
||||||
|
Title to copyright in this software and any associated documentation will at
|
||||||
|
all times remain with copyright holders.
|
||||||
|
|
||||||
|
____________________________________
|
||||||
|
|
||||||
|
This formulation of W3C's notice and license became active on December 31 2002.
|
||||||
|
This version removes the copyright ownership notice such that this license can
|
||||||
|
be used with materials other than those owned by the W3C, reflects that ERCIM
|
||||||
|
is now a host of the W3C, includes references to this specific dated version of
|
||||||
|
the license, and removes the ambiguous grant of "use". Otherwise, this version
|
||||||
|
is the same as the previous version and is written so as to preserve the Free
|
||||||
|
Software Foundation's assessment of GPL compatibility and OSI's certification
|
||||||
|
under the Open Source Definition. Please see our Copyright FAQ for common
|
||||||
|
questions about using materials from our site, including specific terms and
|
||||||
|
conditions for packages like libwww, Amaya, and Jigsaw. Other questions about
|
||||||
|
this notice can be directed to site-policy@w3.org.
|
||||||
|
|
||||||
|
Joseph Reagle <site-policy@w3.org>
|
||||||
|
|
||||||
|
This license came from: http://www.megginson.com/SAX/copying.html
|
||||||
|
However please note future versions of SAX may be covered
|
||||||
|
under http://saxproject.org/?selected=pd
|
||||||
|
|
||||||
|
SAX2 is Free!
|
||||||
|
|
||||||
|
I hereby abandon any property rights to SAX 2.0 (the Simple API for
|
||||||
|
XML), and release all of the SAX 2.0 source code, compiled code, and
|
||||||
|
documentation contained in this distribution into the Public Domain.
|
||||||
|
SAX comes with NO WARRANTY or guarantee of fitness for any
|
||||||
|
purpose.
|
||||||
|
|
||||||
|
David Megginson, david@megginson.com
|
||||||
|
2000-05-05
|
|
@ -0,0 +1,9 @@
|
||||||
|
Apache Ant
|
||||||
|
Copyright 1999-2023 The Apache Software Foundation
|
||||||
|
|
||||||
|
This product includes software developed at
|
||||||
|
The Apache Software Foundation (https://www.apache.org/).
|
||||||
|
|
||||||
|
The <sync> task is based on code Copyright (c) 2002, Landmark
|
||||||
|
Graphics Corp that has been kindly donated to the Apache Software
|
||||||
|
Foundation.
|
|
@ -0,0 +1,100 @@
|
||||||
|
|
||||||
|
Apache Ant
|
||||||
|
|
||||||
|
|
||||||
|
What is it?
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Ant is a Java based build tool. In theory it is kind of like "make"
|
||||||
|
without makes wrinkles and with the full portability of pure java code.
|
||||||
|
|
||||||
|
|
||||||
|
Why?
|
||||||
|
----
|
||||||
|
|
||||||
|
Why another build tool when there is already make, gnumake, nmake, jam,
|
||||||
|
and others? Because all of those tools have limitations that its original
|
||||||
|
author couldn't live with when developing software across multiple platforms.
|
||||||
|
|
||||||
|
Make-like tools are inherently shell based. They evaluate a set of
|
||||||
|
dependencies and then execute commands not unlike what you would issue on a
|
||||||
|
shell. This means that you can easily extend these tools by using or writing
|
||||||
|
any program for the OS that you are working on. However, this also means that
|
||||||
|
you limit yourself to the OS, or at least the OS type such as Unix, that you
|
||||||
|
are working on.
|
||||||
|
|
||||||
|
Makefiles are inherently evil as well. Anybody who has worked on them for any
|
||||||
|
time has run into the dreaded tab problem. "Is my command not executing
|
||||||
|
because I have a space in front of my tab!!!" said the original author of Ant
|
||||||
|
way too many times. Tools like Jam took care of this to a great degree, but
|
||||||
|
still use yet another format to use and remember.
|
||||||
|
|
||||||
|
Ant is different. Instead a model where it is extended with shell based
|
||||||
|
commands, it is extended using Java classes. Instead of writing shell
|
||||||
|
commands, the configuration files are XML based calling out a target tree
|
||||||
|
where various tasks get executed. Each task is run by an object which
|
||||||
|
implements a particular Task interface.
|
||||||
|
|
||||||
|
Granted, this removes some of the expressive power that is inherent by being
|
||||||
|
able to construct a shell command such as `find . -name foo -exec rm {}` but
|
||||||
|
it gives you the ability to be cross platform. To work anywhere and
|
||||||
|
everywhere. And hey, if you really need to execute a shell command, Ant has
|
||||||
|
an exec rule that allows different commands to be executed based on the OS
|
||||||
|
that it is executing on.
|
||||||
|
|
||||||
|
The Latest Version
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Details of the latest version can be found on the Apache Ant
|
||||||
|
Project web site <https://ant.apache.org/>.
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Documentation is available in HTML format, in the manual/ directory.
|
||||||
|
For information about building and installing Ant, see
|
||||||
|
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
|
||||||
|
---------
|
||||||
|
|
||||||
|
This software is licensed under the terms you may find in the file
|
||||||
|
named "LICENSE" in this directory.
|
||||||
|
|
||||||
|
This distribution includes cryptographic software. The country in
|
||||||
|
which you currently reside may have restrictions on the import,
|
||||||
|
possession, use, and/or re-export to another country, of
|
||||||
|
encryption software. BEFORE using any encryption software, please
|
||||||
|
check your country's laws, regulations and policies concerning the
|
||||||
|
import, possession, or use, and re-export of encryption software, to
|
||||||
|
see if this is permitted. See <https://www.wassenaar.org/> for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
The U.S. Government Department of Commerce, Bureau of Industry and
|
||||||
|
Security (BIS), has classified this software as Export Commodity
|
||||||
|
Control Number (ECCN) 5D002.C.1, which includes information security
|
||||||
|
software using or performing cryptographic functions with asymmetric
|
||||||
|
algorithms. The form and manner of this Apache Software Foundation
|
||||||
|
distribution makes it eligible for export under the License Exception
|
||||||
|
ENC Technology Software Unrestricted (TSU) exception (see the BIS
|
||||||
|
Export Administration Regulations, Section 740.13) for both object
|
||||||
|
code and source code.
|
||||||
|
|
||||||
|
The following provides more details on the included cryptographic
|
||||||
|
software:
|
||||||
|
|
||||||
|
For the SSH family of tasks (<sshexec> and <scp>) Ant requires the
|
||||||
|
JSch <http://www.jcraft.com/jsch/index.html> library as well as the
|
||||||
|
Java Cryptography extensions
|
||||||
|
<https://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html>. Ant does not
|
||||||
|
include these libraries itself, but is designed to use them.
|
||||||
|
|
||||||
|
Thanks for using Ant.
|
||||||
|
|
||||||
|
The Apache Ant Project
|
||||||
|
<https://ant.apache.org/>
|
|
@ -0,0 +1,145 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
REM You will need to specify JAVA_HOME.
|
||||||
|
REM For compiling Ant Java 1.4 or higher is required.
|
||||||
|
|
||||||
|
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 https://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.
|
||||||
|
|
||||||
|
set OLDJAVA=%JAVA%
|
||||||
|
set OLDJAVAC=%JAVAC%
|
||||||
|
set BOOTOLDCLASSPATH=%CLASSPATH%
|
||||||
|
set OLDANTHOME=%ANT_HOME%
|
||||||
|
|
||||||
|
set ANT_HOME=.
|
||||||
|
|
||||||
|
if "" == "%JAVA%" if "" == "%JAVA_HOME%" set JAVA=java
|
||||||
|
if "" == "%JAVA%" set JAVA=%JAVA_HOME%\bin\java
|
||||||
|
|
||||||
|
if "" == "%JAVAC%" if "" == "%JAVA_HOME%" set JAVAC=javac
|
||||||
|
if "" == "%JAVAC%" set JAVAC=%JAVA_HOME%\bin\javac
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ... Bootstrapping Ant Distribution
|
||||||
|
|
||||||
|
if exist bootstrap\nul rmdir/s/q bootstrap
|
||||||
|
if exist build\nul rmdir/s/q build
|
||||||
|
|
||||||
|
SET LOCALCLASSPATH=
|
||||||
|
for %%i in (lib\optional\*.jar) do call src\script\lcp.bat %%i
|
||||||
|
if exist "%JAVA_HOME%\lib\tools.jar" call src\script\lcp.bat %JAVA_HOME%\lib\tools.jar
|
||||||
|
if exist "%JAVA_HOME%\lib\classes.zip" call src\script\lcp.bat %JAVA_HOME%\lib\classes.zip
|
||||||
|
|
||||||
|
set TOOLS=src\main\org\apache\tools
|
||||||
|
set CLASSDIR=build\classes
|
||||||
|
|
||||||
|
SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;%CLASSPATH%
|
||||||
|
|
||||||
|
echo JAVA_HOME=%JAVA_HOME%
|
||||||
|
echo JAVA=%JAVA%
|
||||||
|
echo JAVAC=%JAVAC%
|
||||||
|
echo CLASSPATH=%CLASSPATH%
|
||||||
|
echo ANT_HOME=%ANT_HOME%
|
||||||
|
|
||||||
|
if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
|
||||||
|
|
||||||
|
if not exist build\nul mkdir build
|
||||||
|
if not exist build\classes\nul mkdir build\classes
|
||||||
|
|
||||||
|
rem Check if javac tool supports the --release param
|
||||||
|
SET JAVAC_RELEASE_VERSION=""
|
||||||
|
echo "public class JavacVersionCheck {}" > %CLASSDIR%\JavacVersionCheck.java
|
||||||
|
"%JAVAC%" --release 8 -d %CLASSDIR% %CLASSDIR%\JavacVersionCheck.java >nul 2>&1
|
||||||
|
IF %ERRORLEVEL% EQU 0 SET JAVAC_RELEASE_VERSION="--release 8"
|
||||||
|
DEL %CLASSDIR%\JavacVersionCheck.java %CLASSDIR%\JavacVersionCheck.class >nul 2>&1
|
||||||
|
echo.
|
||||||
|
IF %JAVAC_RELEASE_VERSION% == "" (
|
||||||
|
echo ... Compiling Ant Classes
|
||||||
|
"%JAVAC%" %BOOTJAVAC_OPTS% -d %CLASSDIR% %TOOLS%\bzip2\*.java %TOOLS%\tar\*.java %TOOLS%\zip\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java %TOOLS%\ant\taskdefs\condition\*.java %TOOLS%\ant\taskdefs\compilers\*.java %TOOLS%\ant\types\resources\*.java %TOOLS%\ant\property\*.java
|
||||||
|
) ELSE (
|
||||||
|
echo ... Compiling Ant Classes with %JAVAC_RELEASE_VERSION%
|
||||||
|
"%JAVAC%" %BOOTJAVAC_OPTS% -d %CLASSDIR% %JAVAC_RELEASE_VERSION% %TOOLS%\bzip2\*.java %TOOLS%\tar\*.java %TOOLS%\zip\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java %TOOLS%\ant\taskdefs\condition\*.java %TOOLS%\ant\taskdefs\compilers\*.java %TOOLS%\ant\types\resources\*.java %TOOLS%\ant\property\*.java
|
||||||
|
)
|
||||||
|
|
||||||
|
if ERRORLEVEL 1 goto mainend
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ... Copying Required Files
|
||||||
|
|
||||||
|
copy %TOOLS%\ant\taskdefs\*.properties %CLASSDIR%\org\apache\tools\ant\taskdefs
|
||||||
|
copy %TOOLS%\ant\types\*.properties %CLASSDIR%\org\apache\tools\ant\types
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ... Building Ant Distribution
|
||||||
|
|
||||||
|
if not "%OS%"=="Windows_NT" goto win9xStart
|
||||||
|
:winNTStart
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
REM parse command line arguments
|
||||||
|
rem Need to check if we are using the 4NT shell...
|
||||||
|
if "%eval[2+2]" == "4" goto setup4NT
|
||||||
|
|
||||||
|
rem On NT/2K grab all arguments at once
|
||||||
|
set ANT_CMD_LINE_ARGS=%*
|
||||||
|
goto doneStart
|
||||||
|
|
||||||
|
:setup4NT
|
||||||
|
set ANT_CMD_LINE_ARGS=%$
|
||||||
|
goto doneStart
|
||||||
|
|
||||||
|
:win9xStart
|
||||||
|
rem Slurp the command line arguments. This loop allows for an unlimited number of
|
||||||
|
rem arguments (up to the command line limit, anyway).
|
||||||
|
|
||||||
|
set ANT_CMD_LINE_ARGS=
|
||||||
|
|
||||||
|
:setupArgs
|
||||||
|
if %1a==a goto doneStart
|
||||||
|
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setupArgs
|
||||||
|
|
||||||
|
:doneStart
|
||||||
|
rem This label provides a place for the argument list loop to break out
|
||||||
|
rem and for NT handling to skip to.
|
||||||
|
|
||||||
|
"%JAVA%" %ANT_OPTS% org.apache.tools.ant.Main -emacs %ANT_CMD_LINE_ARGS% bootstrap
|
||||||
|
|
||||||
|
set ANT_CMD_LINE_ARGS=
|
||||||
|
if not "%OS%"=="Windows_NT" goto mainEnd
|
||||||
|
:winNTend
|
||||||
|
@endlocal
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ... Cleaning Up Build Directories
|
||||||
|
|
||||||
|
if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ... Done Bootstrapping Ant Distribution
|
||||||
|
|
||||||
|
set JAVA=%OLDJAVA%
|
||||||
|
set JAVAC=%OLDJAVAC%
|
||||||
|
set CLASSPATH=%BOOTOLDCLASSPATH%
|
||||||
|
set ANT_HOME=%OLDANTHOME%
|
||||||
|
set OLDJAVA=
|
||||||
|
set OLDJAVAC=
|
||||||
|
set BOOTOLDCLASSPATH=
|
||||||
|
set LOCALCLASSPATH=
|
||||||
|
set OLDANTHOME=
|
||||||
|
set TOOLS=
|
|
@ -0,0 +1,185 @@
|
||||||
|
#!/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
|
||||||
|
#
|
||||||
|
# https://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.
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false
|
||||||
|
darwin=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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# You will need to specify JAVA_HOME if compiling with 1.2 or later.
|
||||||
|
|
||||||
|
if [ -n "$JAVA_HOME" ]; then
|
||||||
|
if [ -f "$JAVA_HOME/lib/tools.jar" ]; then
|
||||||
|
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$JAVA_HOME/lib/classes.zip" ]; then
|
||||||
|
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Warning: JAVA_HOME environment variable not set."
|
||||||
|
echo " If build fails because sun.* classes could not be found"
|
||||||
|
echo " you will need to set the JAVA_HOME environment variable"
|
||||||
|
echo " to the installation directory of java."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables:
|
||||||
|
# JAVA_HOME/jre/sh for java and rmid
|
||||||
|
# JAVA_HOME/sh for javac and rmic
|
||||||
|
if [ -z "$JAVAC" ]; then
|
||||||
|
if [ -n "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "$JAVA_HOME/sh/javac" ]; then
|
||||||
|
JAVAC=${JAVA_HOME}/sh/javac
|
||||||
|
else
|
||||||
|
JAVAC=${JAVA_HOME}/bin/javac
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVAC=javac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVACMD" ]; then
|
||||||
|
if [ -n "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ]; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly."
|
||||||
|
echo " We cannot execute $JAVACMD"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
ANT_HOME=.
|
||||||
|
export ANT_HOME
|
||||||
|
|
||||||
|
echo ... Bootstrapping Ant Distribution
|
||||||
|
|
||||||
|
if [ -d "bootstrap" ]; then
|
||||||
|
rm -r bootstrap
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "build" ]; then
|
||||||
|
rm -r build
|
||||||
|
fi
|
||||||
|
|
||||||
|
DIRLIBS=lib/optional/*.jar
|
||||||
|
for i in ${DIRLIBS}; do
|
||||||
|
# if the directory is empty, then it will return the input string
|
||||||
|
# this is stupid, so case for it
|
||||||
|
if [ "$i" != "${DIRLIBS}" ]; then
|
||||||
|
CLASSPATH=$CLASSPATH:"$i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
TOOLS=src/main/org/apache/tools
|
||||||
|
CLASSDIR=build/classes
|
||||||
|
|
||||||
|
CLASSPATH=${CLASSDIR}:src/main:${CLASSPATH}
|
||||||
|
|
||||||
|
# For Cygwin, switch to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CLASSPATH
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
mkdir -p ${CLASSDIR}
|
||||||
|
mkdir -p bin
|
||||||
|
|
||||||
|
# Check if javac tool supports the --release param
|
||||||
|
echo "public class JavacVersionCheck {}" > ${CLASSDIR}/JavacVersionCheck.java
|
||||||
|
"${JAVAC}" --release 8 -d ${CLASSDIR} ${CLASSDIR}/JavacVersionCheck.java 1>&2 2>/dev/null
|
||||||
|
ret=$?
|
||||||
|
rm ${CLASSDIR}/JavacVersionCheck.java ${CLASSDIR}/JavacVersionCheck.class 1>&2 2>/dev/null
|
||||||
|
JAVAC_RELEASE_VERSION=
|
||||||
|
if [ $ret -eq 0 ]; then
|
||||||
|
# set --release to 8
|
||||||
|
JAVAC_RELEASE_VERSION="--release 8"
|
||||||
|
fi
|
||||||
|
if [ "${JAVAC_RELEASE_VERSION}" = "" ]; then
|
||||||
|
echo ... Compiling Ant Classes
|
||||||
|
else
|
||||||
|
echo ... Compiling Ant Classes with ${JAVAC_RELEASE_VERSION}
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} ${JAVAC_RELEASE_VERSION} \
|
||||||
|
${TOOLS}/bzip2/*.java ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
|
||||||
|
${TOOLS}/ant/util/regexp/RegexpMatcher.java \
|
||||||
|
${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
|
||||||
|
${TOOLS}/ant/property/*.java \
|
||||||
|
${TOOLS}/ant/types/*.java \
|
||||||
|
${TOOLS}/ant/types/resources/*.java \
|
||||||
|
${TOOLS}/ant/*.java ${TOOLS}/ant/taskdefs/*.java \
|
||||||
|
${TOOLS}/ant/taskdefs/compilers/*.java \
|
||||||
|
${TOOLS}/ant/taskdefs/condition/*.java
|
||||||
|
ret=$?
|
||||||
|
if [ $ret != 0 ]; then
|
||||||
|
echo ... Failed compiling Ant classes !
|
||||||
|
exit $ret
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ... Copying Required Files
|
||||||
|
|
||||||
|
cp src/main/org/apache/tools/ant/taskdefs/defaults.properties \
|
||||||
|
${CLASSDIR}/org/apache/tools/ant/taskdefs
|
||||||
|
cp src/main/org/apache/tools/ant/types/defaults.properties \
|
||||||
|
${CLASSDIR}/org/apache/tools/ant/types
|
||||||
|
cp src/script/antRun bin
|
||||||
|
chmod +x bin/antRun
|
||||||
|
|
||||||
|
echo ... Building Ant Distribution
|
||||||
|
|
||||||
|
"${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap
|
||||||
|
ret=$?
|
||||||
|
if [ $ret != 0 ]; then
|
||||||
|
echo ... Failed Building Ant Distribution !
|
||||||
|
exit $ret
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ... Cleaning Up Build Directories
|
||||||
|
|
||||||
|
rm -rf ${CLASSDIR}
|
||||||
|
rm -rf bin
|
||||||
|
|
||||||
|
echo ... Done Bootstrapping Ant Distribution
|
|
@ -0,0 +1,40 @@
|
||||||
|
@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 https://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.
|
||||||
|
|
||||||
|
set REAL_ANT_HOME=%ANT_HOME%
|
||||||
|
set ANT_HOME=%~dp0\bootstrap
|
||||||
|
if exist bootstrap\lib\ant.jar if exist bootstrap\bin\ant.bat if exist bootstrap\bin\lcp.bat if exist bootstrap\bin\antRun.bat goto runAnt
|
||||||
|
call bootstrap.bat
|
||||||
|
if exist bootstrap\lib\ant.jar if exist bootstrap\bin\ant.bat if exist bootstrap\bin\lcp.bat if exist bootstrap\bin\antRun.bat goto runAnt
|
||||||
|
echo Bootstrap FAILED
|
||||||
|
REM set the error code
|
||||||
|
color 00
|
||||||
|
goto cleanup
|
||||||
|
|
||||||
|
:runAnt
|
||||||
|
if not "%REAL_ANT_HOME%" == "" goto install_ant
|
||||||
|
call bootstrap\bin\ant.bat -lib lib/optional %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
goto cleanup
|
||||||
|
|
||||||
|
:install_ant
|
||||||
|
call bootstrap\bin\ant.bat -nouserlib -lib lib/optional -Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
|
||||||
|
rem clean up
|
||||||
|
:cleanup
|
||||||
|
set ANT_HOME=%REAL_ANT_HOME%
|
||||||
|
set REAL_ANT_HOME=
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
#!/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
|
||||||
|
#
|
||||||
|
# https://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.
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false
|
||||||
|
darwin=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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
REALANTHOME=$ANT_HOME
|
||||||
|
if [ -z "$PWD" ]; then
|
||||||
|
ANT_HOME=./bootstrap
|
||||||
|
else
|
||||||
|
ANT_HOME="$PWD"/bootstrap
|
||||||
|
fi
|
||||||
|
export ANT_HOME
|
||||||
|
|
||||||
|
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun; then
|
||||||
|
/bin/sh ./bootstrap.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun; then
|
||||||
|
echo Bootstrap FAILED
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$REALANTHOME" != "" ]; then
|
||||||
|
if $cygwin; then
|
||||||
|
REALANTHOME=`cygpath --windows "$REALANTHOME"`
|
||||||
|
fi
|
||||||
|
ANT_INSTALL="-Dant.install=$REALANTHOME"
|
||||||
|
else
|
||||||
|
ANT_INSTALL="-emacs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
bootstrap/bin/ant -nouserlib -lib lib/optional "$ANT_INSTALL" $*
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,418 @@
|
||||||
|
<?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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
=======================================================================
|
||||||
|
Build file to fetch optional libraries for Apache Ant
|
||||||
|
=======================================================================
|
||||||
|
-->
|
||||||
|
<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.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
|
<!-- 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"/>
|
||||||
|
|
||||||
|
<!-- 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"/>
|
||||||
|
|
||||||
|
<import file="get-m2.xml"/>
|
||||||
|
|
||||||
|
<target name="pick-dest">
|
||||||
|
<fail>
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<isset property="dest"/>
|
||||||
|
</not>
|
||||||
|
</condition>ERROR
|
||||||
|
Set -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)
|
||||||
|
</fail>
|
||||||
|
|
||||||
|
<condition property="dest.dir"
|
||||||
|
value="${lib.dir}">
|
||||||
|
<equals arg1="${dest}" arg2="system"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="dest.dir"
|
||||||
|
value="${optional.dir}">
|
||||||
|
<equals arg1="${dest}" arg2="optional"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="dest.dir"
|
||||||
|
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}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="macros" depends="pick-dest,get-m2"
|
||||||
|
xmlns:resolver="antlib:org.apache.maven.resolver.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="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.
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<isset property="@{archive}.version"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
<resolver:resolve>
|
||||||
|
<resolver:remoterepo url="@{repository}" id="@{id}"/>
|
||||||
|
<dependencies id="@{archive}.path">
|
||||||
|
<dependency groupId="@{project}"
|
||||||
|
artifactId="@{archive}"
|
||||||
|
version="${@{archive}.version}"
|
||||||
|
scope="runtime">
|
||||||
|
<!-- 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>
|
||||||
|
</dependencies>
|
||||||
|
<!-- create a path containing all these resolved dependencies -->
|
||||||
|
<path refid="@{archive}.path"/>
|
||||||
|
</resolver:resolve>
|
||||||
|
<!-- now we are left with the problem of getting the files into our directory -->
|
||||||
|
<copy todir="${dest.dir}">
|
||||||
|
<path refid="@{archive}.path"/>
|
||||||
|
<flattenmapper/>
|
||||||
|
</copy>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="nonm2-macros" depends="pick-dest">
|
||||||
|
<macrodef name="get-ftp-file">
|
||||||
|
<attribute name="host"/>
|
||||||
|
<attribute name="port" default="21"/>
|
||||||
|
<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">
|
||||||
|
<fileset dir="@{localdir}">
|
||||||
|
<include name="@{filename}"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- any init stuff -->
|
||||||
|
<target name="init" depends="macros"/>
|
||||||
|
|
||||||
|
<target name="init-no-m2" depends="nonm2-macros"/>
|
||||||
|
|
||||||
|
<target name="init-cache">
|
||||||
|
<available property="temp.cache.already.exists" file="${temp.dir}" type="dir"/>
|
||||||
|
<condition property="user.wants.temp.cache">
|
||||||
|
<and>
|
||||||
|
<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"/>
|
||||||
|
</or>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
<condition property="delete.temp.cache">
|
||||||
|
<and>
|
||||||
|
<not>
|
||||||
|
<isset property="temp.cache.already.exists"/>
|
||||||
|
</not>
|
||||||
|
<not>
|
||||||
|
<isset property="user.wants.temp.cache"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-setup-temp-cache" depends="init-cache" unless="temp.cache.already.exists"
|
||||||
|
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="Get rid of the temporary cache directory">
|
||||||
|
<delete dir="${temp.dir}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="diag" depends="init">
|
||||||
|
<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 (Commons and Log4j)"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="log4j"/>
|
||||||
|
<f2 project="commons-logging" archive="commons-logging-api"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="junit"
|
||||||
|
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="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 and xml-resolver)"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="xalan"/>
|
||||||
|
<f2 project="xml-resolver"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="networking"
|
||||||
|
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="jakarta-regexp"/>
|
||||||
|
<f2 project="oro"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="antlr"
|
||||||
|
description="load ANother Tool for Language Recognition (ANTLR)"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="antlr"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="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"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="bsf"
|
||||||
|
description="load Bean Scripting Framework"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="bsf"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jruby"
|
||||||
|
description="load JRuby"
|
||||||
|
depends="bsf">
|
||||||
|
<f2 project="org.jruby" archive="jruby"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="beanshell"
|
||||||
|
description="load BeanShell support"
|
||||||
|
depends="bsf">
|
||||||
|
<f2 project="org.beanshell" archive="bsh"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jython"
|
||||||
|
description="load Jython"
|
||||||
|
depends="bsf">
|
||||||
|
<f2 project="org.python" archive="jython"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="rhino"
|
||||||
|
description="load Rhino"
|
||||||
|
depends="bsf">
|
||||||
|
<f2 project="org.mozilla" archive="rhino"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="graal.js"
|
||||||
|
description="load Graal.js">
|
||||||
|
<f2 project="org.graalvm.js" archive="js"/>
|
||||||
|
<f2 project="org.graalvm.js" archive="js-scriptengine"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="script"
|
||||||
|
description="load script languages (except Jython)"
|
||||||
|
depends="bsf,jruby,beanshell,rhino,graal.js"/>
|
||||||
|
|
||||||
|
<target name="debugging"
|
||||||
|
description="internal Ant debugging"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="which"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="javamail"
|
||||||
|
description="load Java Mail"
|
||||||
|
depends="init">
|
||||||
|
<f2 project="com.sun.mail" archive="javax.mail"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jakartamail"
|
||||||
|
description="load Jakarta Mail"
|
||||||
|
depends="init">
|
||||||
|
<!-- We only need this one dependency as per
|
||||||
|
the project doc https://eclipse-ee4j.github.io/mail/
|
||||||
|
This alone should bring in all necessary dependencies (including the API
|
||||||
|
jars and the activation jars -->
|
||||||
|
<f2 project="com.sun.mail" archive="jakarta.mail"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<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"
|
||||||
|
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"
|
||||||
|
description="load NetRexx compiler"
|
||||||
|
depends="init-no-m2,-setup-temp-cache,-fetch-netrexx,-fetch-netrexx-no-commons-net">
|
||||||
|
<checksum file="${temp.dir}/NetRexx.zip" algorithm="SHA-256" property="${netrexx.sha256}" verifyProperty="netrexx.hash.matches"/>
|
||||||
|
<fail message="NetRexx.zip fetched via ftp has an unexpected SHA-256 checksum, the file may have been tampered with">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<istrue value="${netrexx.hash.matches}"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
<copy todir="${dest.dir}" flatten="true">
|
||||||
|
<zipfileset src="${temp.dir}/NetRexx.zip">
|
||||||
|
<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}"/>
|
||||||
|
</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"/>
|
||||||
|
</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="antunit,ivy,logging,junit,junitlauncher,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script,
|
||||||
|
javamail,jakartamail,jspc,jai,xz,junit-engine-vintage,junit-engine-jupiter,netrexx"/>
|
||||||
|
</project>
|
|
@ -0,0 +1,121 @@
|
||||||
|
<?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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
=======================================================================
|
||||||
|
Build file to fetch maven2 tasks; extracted from (Ant's) fetch.xml
|
||||||
|
=======================================================================
|
||||||
|
-->
|
||||||
|
<project name="get-m2" default="get-m2" basedir=".">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
This build file downloads the Maven2 Ant tasks,
|
||||||
|
and installs them in the location specified by the m2.dest.dir property.
|
||||||
|
|
||||||
|
You may need to set proxy settings. On Java1.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.
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
|
<property file="get-m2.properties" />
|
||||||
|
|
||||||
|
<property name="m2.antlib.resource"
|
||||||
|
value="org/apache/maven/resolver/ant/antlib.xml" />
|
||||||
|
|
||||||
|
<property name="m2.antlib.uri"
|
||||||
|
value="antlib:org.apache.maven.resolver.ant" />
|
||||||
|
|
||||||
|
<macrodef name="require">
|
||||||
|
<attribute name="property" />
|
||||||
|
<sequential>
|
||||||
|
<fail unless="@{property}">$${@{property}} not specified</fail>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="probe-m2">
|
||||||
|
<require property="m2.dest.dir" />
|
||||||
|
<require property="m2.jar.name" />
|
||||||
|
|
||||||
|
<!-- Look for M2 ant tasks in our classpath-->
|
||||||
|
<property name="m2.artifact" location="${m2.dest.dir}/${m2.jar.name}" />
|
||||||
|
<available property="m2.antlib.found" resource="${m2.antlib.resource}" />
|
||||||
|
<condition property="m2.antlib.typefound">
|
||||||
|
<typefound name="${m2.antlib.uri}:artifact" />
|
||||||
|
</condition>
|
||||||
|
<available property="m2.artifact.found" file="${m2.artifact}" type="file" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="download-m2" depends="probe-m2" unless="m2.artifact.found">
|
||||||
|
<require property="m2.antlib.url" />
|
||||||
|
<echo>Downloading to ${m2.dest.dir}</echo>
|
||||||
|
|
||||||
|
<mkdir dir="${m2.dest.dir}" />
|
||||||
|
<!-- fetch M2 ant tasks into our repository, if it is not there-->
|
||||||
|
<get src="${m2.antlib.url}"
|
||||||
|
dest="${m2.artifact}"
|
||||||
|
verbose="true"
|
||||||
|
usetimestamp="false" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dont-validate-m2-checksum" depends="probe-m2"
|
||||||
|
if="m2.artifact.found">
|
||||||
|
<property name="checksum.equal" value="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="validate-m2-checksum"
|
||||||
|
depends="download-m2,dont-validate-m2-checksum"
|
||||||
|
if="m2.sha1.checksum" unless="m2.artifact.found">
|
||||||
|
<checksum file="${m2.artifact}"
|
||||||
|
algorithm="SHA"
|
||||||
|
property="${m2.sha1.checksum}"
|
||||||
|
verifyProperty="checksum.equal" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="checksum-mismatch" depends="validate-m2-checksum"
|
||||||
|
if="m2.sha1.checksum" unless="${checksum.equal}">
|
||||||
|
<delete file="${m2.artifact}" />
|
||||||
|
<fail>
|
||||||
|
Failed to verify the downloaded file ${m2.antlib.url}" against the checksum
|
||||||
|
coded into libraries.properties.
|
||||||
|
The local copy has been deleted, for security reasons
|
||||||
|
</fail>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="checksum-match" depends="checksum-mismatch"
|
||||||
|
unless="m2.antlib.found">
|
||||||
|
<taskdef classpath="${m2.artifact}" resource="${m2.antlib.resource}"
|
||||||
|
uri="${m2.antlib.uri}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="get-m2" depends="checksum-match"
|
||||||
|
description="Download the Maven Artifact Resolver Ant tasks" />
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,3 @@
|
||||||
|
Please refer to the Ant manual under Installing Ant / Library
|
||||||
|
Dependencies for a list of the jar requirements for various optional
|
||||||
|
tasks and features.
|
|
@ -0,0 +1,85 @@
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
# https://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 file declares the libraries for use in a given release of the components
|
||||||
|
|
||||||
|
# If you change this, change the checksum to match
|
||||||
|
m2.version=1.4.0
|
||||||
|
m2.url=https://repo1.maven.org/maven2/org/apache/maven/resolver
|
||||||
|
m2.artifact-name=maven-resolver-ant-tasks
|
||||||
|
m2.jar.name=${m2.artifact-name}-${m2.version}-uber.jar
|
||||||
|
#this is the URL of the antlib library, that is pulled down for everything else.
|
||||||
|
m2.antlib.url=${m2.url}/${m2.artifact-name}/${m2.version}/${m2.jar.name}
|
||||||
|
#this is the sha1 checksum of the artifact
|
||||||
|
m2.sha1.checksum=c4642858aa22465650ad2a469b24e22696177441
|
||||||
|
|
||||||
|
# Repository to use by default for fetching dependencies.
|
||||||
|
m2.repo=https://repo1.maven.org/maven2/
|
||||||
|
|
||||||
|
# hashes of libraries loaded over insecure connections
|
||||||
|
netrexx.sha256=1f99f054e9b1e412d29823088f3fa7cfce90a7af25d907a60a6d7908a6b97ea4
|
||||||
|
|
||||||
|
# Versions of different libraries. Please keep in alphabetical order, except
|
||||||
|
# when a specific dependency forces them to be out-of-order
|
||||||
|
ivy.version=2.5.0
|
||||||
|
ant-antunit.version=1.4.1
|
||||||
|
antlr.version=2.7.7
|
||||||
|
bcel.version=6.7.0
|
||||||
|
bsf.version=2.4.0
|
||||||
|
bsh.version=2.0b5
|
||||||
|
commons-net.version=3.9.0
|
||||||
|
commons-logging.version=1.1
|
||||||
|
commons-logging-api.version=${commons-logging.version}
|
||||||
|
js.version=20.1.0
|
||||||
|
js-scriptengine.version=${js.version}
|
||||||
|
# Note - When updating the hamcrest versions here, make sure to also update the
|
||||||
|
# "src-dist" target in build.xml to copy the correct hamcrest jars
|
||||||
|
# into the source distribution
|
||||||
|
hamcrest-core.version=1.3
|
||||||
|
hamcrest-library.version=${hamcrest-core.version}
|
||||||
|
jai-core.version=1.1.3
|
||||||
|
jai-codec.version=1.1.3
|
||||||
|
# Later 1.6 versions call themselves "jakarta.mail" but do not use the namespace yet
|
||||||
|
javax.mail.version=1.6.2
|
||||||
|
jakarta.mail.version=2.0.1
|
||||||
|
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}
|
||||||
|
jdepend.version=2.9.1
|
||||||
|
jruby.version=1.6.8
|
||||||
|
# Note - When updating the junit.version here, make sure to also update the
|
||||||
|
# "src-dist" target in build.xml to copy the correct junit 4.x jar
|
||||||
|
# into the source distribution
|
||||||
|
junit.version=4.13.1
|
||||||
|
rhino.version=1.7.11
|
||||||
|
junit-platform-launcher.version=1.8.2
|
||||||
|
# Only used for internal tests in Ant project
|
||||||
|
junit-vintage-engine.version=5.8.2
|
||||||
|
# Only used for internal tests in Ant project
|
||||||
|
junit-jupiter-engine.version=5.8.2
|
||||||
|
jsch.version=0.1.55
|
||||||
|
jython.version=2.7.2
|
||||||
|
# log4j 1.2.15 requires JMS and a few other Sun jars that are not in the m2 repo
|
||||||
|
log4j.version=1.2.14
|
||||||
|
oro.version=2.0.8
|
||||||
|
servlet-api.version=2.3
|
||||||
|
which.version=1.0
|
||||||
|
xalan.version=2.7.2
|
||||||
|
xml-resolver.version=1.2
|
||||||
|
xz.version=1.8
|
||||||
|
# paired
|
||||||
|
jacl.version=1.2.6
|
||||||
|
tcljava.version=${jacl.version}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
|
@ -0,0 +1,53 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Apache AntWork Plugin for the Jext Java Text Editor</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 id="authors">AntWork Plugin for the Jext Java Text Editor</h1>
|
||||||
|
by
|
||||||
|
<ul>
|
||||||
|
<li>Klaus Hartlage (<a href="mailto:KHartlage@t-online.de">KHartlage@t-online.de</a>)</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<p>You can download the plugin
|
||||||
|
at: <a href="https://sourceforge.net/projects/jext/files/OldFiles/antwork_plugin.zip/download"
|
||||||
|
target="_top">https://sourceforge.net/projects/jext/files/OldFiles/antwork_plugin.zip/download</a></p>
|
||||||
|
|
||||||
|
<h2>Installation instructions from the Readme.txt</h2>
|
||||||
|
|
||||||
|
<p>You have to enable the Jext Console to see the Apache Ant output (menu:
|
||||||
|
Edit→Options…–General Panel), because Ant messages are redirected to the Jext
|
||||||
|
console.</p>
|
||||||
|
|
||||||
|
<p>You can configure the Ant call in the Jext menu: Edit→Options…– Plugin
|
||||||
|
Options–Antwork Plugin Panel; here you can set Ant home directory and the path to your build
|
||||||
|
file.</p>
|
||||||
|
|
||||||
|
<p>You can start AntWork in the menu: Plugins→Ant→Work Now! In the appearing dialog box
|
||||||
|
you can enter the target which you want to compile.</p>
|
||||||
|
|
||||||
|
<p>If a <code>javac</code> error occurs in the Ant run, an error list opens within Jext. With a
|
||||||
|
double click on the error message you jump to the error in the specified Java source file.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,203 @@
|
||||||
|
/*
|
||||||
|
* Apache License
|
||||||
|
* Version 2.0, January 2004
|
||||||
|
* https://www.apache.org/licenses/
|
||||||
|
*
|
||||||
|
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
*
|
||||||
|
* 1. Definitions.
|
||||||
|
*
|
||||||
|
* "License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
* and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
*
|
||||||
|
* "Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
* the copyright owner that is granting the License.
|
||||||
|
*
|
||||||
|
* "Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
* other entities that control, are controlled by, or are under common
|
||||||
|
* control with that entity. For the purposes of this definition,
|
||||||
|
* "control" means (i) the power, direct or indirect, to cause the
|
||||||
|
* direction or management of such entity, whether by contract or
|
||||||
|
* otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
* outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
*
|
||||||
|
* "You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
* exercising permissions granted by this License.
|
||||||
|
*
|
||||||
|
* "Source" form shall mean the preferred form for making modifications,
|
||||||
|
* including but not limited to software source code, documentation
|
||||||
|
* source, and configuration files.
|
||||||
|
*
|
||||||
|
* "Object" form shall mean any form resulting from mechanical
|
||||||
|
* transformation or translation of a Source form, including but
|
||||||
|
* not limited to compiled object code, generated documentation,
|
||||||
|
* and conversions to other media types.
|
||||||
|
*
|
||||||
|
* "Work" shall mean the work of authorship, whether in Source or
|
||||||
|
* Object form, made available under the License, as indicated by a
|
||||||
|
* copyright notice that is included in or attached to the work
|
||||||
|
* (an example is provided in the Appendix below).
|
||||||
|
*
|
||||||
|
* "Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
* form, that is based on (or derived from) the Work and for which the
|
||||||
|
* editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
* represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
* of this License, Derivative Works shall not include works that remain
|
||||||
|
* separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
* the Work and Derivative Works thereof.
|
||||||
|
*
|
||||||
|
* "Contribution" shall mean any work of authorship, including
|
||||||
|
* the original version of the Work and any modifications or additions
|
||||||
|
* to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
* submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
* or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
* the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
* means any form of electronic, verbal, or written communication sent
|
||||||
|
* to the Licensor or its representatives, including but not limited to
|
||||||
|
* communication on electronic mailing lists, source code control systems,
|
||||||
|
* and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
* Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
* excluding communication that is conspicuously marked or otherwise
|
||||||
|
* designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
*
|
||||||
|
* "Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
* on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
* subsequently incorporated within the Work.
|
||||||
|
*
|
||||||
|
* 2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
* this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
* copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
* publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
* Work and such Derivative Works in Source or Object form.
|
||||||
|
*
|
||||||
|
* 3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
* this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
* (except as stated in this section) patent license to make, have made,
|
||||||
|
* use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
* where such license applies only to those patent claims licensable
|
||||||
|
* by such Contributor that are necessarily infringed by their
|
||||||
|
* Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
* with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
* institute patent litigation against any entity (including a
|
||||||
|
* cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
* or a Contribution incorporated within the Work constitutes direct
|
||||||
|
* or contributory patent infringement, then any patent licenses
|
||||||
|
* granted to You under this License for that Work shall terminate
|
||||||
|
* as of the date such litigation is filed.
|
||||||
|
*
|
||||||
|
* 4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
* Work or Derivative Works thereof in any medium, with or without
|
||||||
|
* modifications, and in Source or Object form, provided that You
|
||||||
|
* meet the following conditions:
|
||||||
|
*
|
||||||
|
* (a) You must give any other recipients of the Work or
|
||||||
|
* Derivative Works a copy of this License; and
|
||||||
|
*
|
||||||
|
* (b) You must cause any modified files to carry prominent notices
|
||||||
|
* stating that You changed the files; and
|
||||||
|
*
|
||||||
|
* (c) You must retain, in the Source form of any Derivative Works
|
||||||
|
* that You distribute, all copyright, patent, trademark, and
|
||||||
|
* attribution notices from the Source form of the Work,
|
||||||
|
* excluding those notices that do not pertain to any part of
|
||||||
|
* the Derivative Works; and
|
||||||
|
*
|
||||||
|
* (d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
* distribution, then any Derivative Works that You distribute must
|
||||||
|
* include a readable copy of the attribution notices contained
|
||||||
|
* within such NOTICE file, excluding those notices that do not
|
||||||
|
* pertain to any part of the Derivative Works, in at least one
|
||||||
|
* of the following places: within a NOTICE text file distributed
|
||||||
|
* as part of the Derivative Works; within the Source form or
|
||||||
|
* documentation, if provided along with the Derivative Works; or,
|
||||||
|
* within a display generated by the Derivative Works, if and
|
||||||
|
* wherever such third-party notices normally appear. The contents
|
||||||
|
* of the NOTICE file are for informational purposes only and
|
||||||
|
* do not modify the License. You may add Your own attribution
|
||||||
|
* notices within Derivative Works that You distribute, alongside
|
||||||
|
* or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
* that such additional attribution notices cannot be construed
|
||||||
|
* as modifying the License.
|
||||||
|
*
|
||||||
|
* You may add Your own copyright statement to Your modifications and
|
||||||
|
* may provide additional or different license terms and conditions
|
||||||
|
* for use, reproduction, or distribution of Your modifications, or
|
||||||
|
* for any such Derivative Works as a whole, provided Your use,
|
||||||
|
* reproduction, and distribution of the Work otherwise complies with
|
||||||
|
* the conditions stated in this License.
|
||||||
|
*
|
||||||
|
* 5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
* any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
* by You to the Licensor shall be under the terms and conditions of
|
||||||
|
* this License, without any additional terms or conditions.
|
||||||
|
* Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
* the terms of any separate license agreement you may have executed
|
||||||
|
* with Licensor regarding such Contributions.
|
||||||
|
*
|
||||||
|
* 6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
* names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
* except as required for reasonable and customary use in describing the
|
||||||
|
* origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
*
|
||||||
|
* 7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
* agreed to in writing, Licensor provides the Work (and each
|
||||||
|
* Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
* implied, including, without limitation, any warranties or conditions
|
||||||
|
* of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
* appropriateness of using or redistributing the Work and assume any
|
||||||
|
* risks associated with Your exercise of permissions under this License.
|
||||||
|
*
|
||||||
|
* 8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
* whether in tort (including negligence), contract, or otherwise,
|
||||||
|
* unless required by applicable law (such as deliberate and grossly
|
||||||
|
* negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
* liable to You for damages, including any direct, indirect, special,
|
||||||
|
* incidental, or consequential damages of any character arising as a
|
||||||
|
* result of this License or out of the use or inability to use the
|
||||||
|
* Work (including but not limited to damages for loss of goodwill,
|
||||||
|
* work stoppage, computer failure or malfunction, or any and all
|
||||||
|
* other commercial damages or losses), even if such Contributor
|
||||||
|
* has been advised of the possibility of such damages.
|
||||||
|
*
|
||||||
|
* 9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
* the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
* and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
* or other liability obligations and/or rights consistent with this
|
||||||
|
* License. However, in accepting such obligations, You may act only
|
||||||
|
* on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
* of any other Contributor, and only if You agree to indemnify,
|
||||||
|
* defend, and hold each Contributor harmless for any liability
|
||||||
|
* incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
* of your accepting any such warranty or additional liability.
|
||||||
|
*
|
||||||
|
* END OF TERMS AND CONDITIONS
|
||||||
|
*
|
||||||
|
* APPENDIX: How to apply the Apache License to your work.
|
||||||
|
*
|
||||||
|
* To apply the Apache License to your work, attach the following
|
||||||
|
* boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
* replaced with your own identifying information. (Don't include
|
||||||
|
* the brackets!) The text should be enclosed in the appropriate
|
||||||
|
* comment syntax for the file format. We also recommend that a
|
||||||
|
* file or class name and description of purpose be included on the
|
||||||
|
* same "printed page" as the copyright notice for easier
|
||||||
|
* identification within third-party archives.
|
||||||
|
*
|
||||||
|
* Copyright [yyyy] [name of copyright owner]
|
||||||
|
*
|
||||||
|
* Licensed 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
|
||||||
|
*
|
||||||
|
* https://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.
|
||||||
|
*/
|
|
@ -0,0 +1,136 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Borland EJB Tasks</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="log">BorlandDeployTool</h2>
|
||||||
|
<p>by Benoit Moussaud (<a href="mailto:benoit.moussaud@criltelecom.com">benoit.moussaud@criltelecom.com</a>)</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>The BorlandDeployTool is a vendor specific nested element for the Ejbjar optional task.</p>
|
||||||
|
<p>BorlandDeployTool is dedicated to the Borland Application Server 4.5.x and Borland Enterprise
|
||||||
|
Server 5.x. It generates and compiles the stubs and skeletons for all EJBs described in the
|
||||||
|
Deployment Descriptor, builds the jar file including the support files and verifies whether the
|
||||||
|
produced jar is valid or not.</p>
|
||||||
|
|
||||||
|
<p>Benoit Moussaud maintains a
|
||||||
|
separate <a href="https://web.archive.org/web/20141122083215/http://www.moussaud.org/ejbjar.html"
|
||||||
|
target="_top">FAQ</a> for this task at his homepage.</p>
|
||||||
|
|
||||||
|
<h3>Borland element</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td>The base directory in which the generated Borland ready jar files are stored</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debug</td>
|
||||||
|
<td>If <q>true</q>, turn on the debug mode for each Borland tools
|
||||||
|
(<code>java2iiop</code>, <code>iastool</code>, ...)</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verify</td>
|
||||||
|
<td>If <q>true</q>, turn on the verification at the end of the jar production.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verifyargs</td>
|
||||||
|
<td>extra parameter for verify command</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>String value appended to the basename of the deployment descriptor to create the filename of
|
||||||
|
the Borland EJB jar file.</td>
|
||||||
|
<td>No; defaults to <q class="no-break">-ejb.jar</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>basdtd</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Defines the location of the DTD which covers the Borland
|
||||||
|
specific deployment descriptors. This should not be necessary if you have borland in your
|
||||||
|
classpath. If you do not, you should use a nested
|
||||||
|
<a href="ejb.html#ejbjar-dtd"><code><dtd></code></a> element, described
|
||||||
|
in the ejbjar task documentation.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ejbdtd</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Defines the location of the ejb-jar DTD in the class
|
||||||
|
hierarchy. This should not be necessary if you have borland in your classpath. If you do not,
|
||||||
|
you should use a nested <a href="ejb.html#ejbjar-dtd"><code><dtd></code></a> element,
|
||||||
|
described in the ejbjar task documentation.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>generateclient</td>
|
||||||
|
<td>If <q>true</q>, turn on the generation of the corresponding EJB jar.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>set the Borland Application Version.
|
||||||
|
<ul>
|
||||||
|
<li>4 means B.A.S (Borland Application Server) 4.x, target will add ejb-inprise.xml file</li>
|
||||||
|
<li>5 means B.E.S (Borland Application Server) 5.x, target will add ejb-borland.xml file</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>4</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>java2iiopParams</td>
|
||||||
|
<td>If filled, the params are added to the <kbd>java2iiop</kbd> command
|
||||||
|
(ex: <kbd>-no_warn_missing_define</kbd>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>The following <samp>build.xml</samp> snippet is an example of how to use Borland element in
|
||||||
|
the <code>ejbjar</code> task</p>
|
||||||
|
<pre>
|
||||||
|
<ejbjar srcdir="${build.classes}" basejarname="vsmp" descriptordir="${rsc.dir}/hrmanager">
|
||||||
|
<borland destdir="lib" verify="on" generateclient="on" version="5">
|
||||||
|
<classpath refid="classpath"/>
|
||||||
|
</borland>
|
||||||
|
<include name="**\ejb-jar.xml"/>
|
||||||
|
<support dir="${build.classes}">
|
||||||
|
<include name="demo\*.class"/>
|
||||||
|
<include name="demo\helper\*.class"/>
|
||||||
|
</support>
|
||||||
|
</ejbjar></pre>
|
||||||
|
<p>The <code>borland</code> element will generate into the <samp>lib</samp> directory an EJB jar
|
||||||
|
file using the deployment descriptor placed into the <samp>${rsc.dir}/hrmanager</samp> directory.
|
||||||
|
The verify phase is turned on and the generate client phase as well.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,87 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>BorlandGenerateClient Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="log">BorlandGenerateClient</h2>
|
||||||
|
<p>by Benoit Moussaud (<a href="mailto:benoit.moussaud@criltelecom.com">benoit.moussaud@criltelecom.com</a>)</p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>The BorlandGenerateClient is a task dedicated to Borland Application Server v 4.5. It offers to
|
||||||
|
generate the client jar file corresponding to an EJB jar file.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ejbjar</td>
|
||||||
|
<td>EJB jar file</td>
|
||||||
|
<td>yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debug</td>
|
||||||
|
<td>If <q>true</q>, turn on the debug mode for each Borland tool
|
||||||
|
(<code>java2iiop</code>, <code>iastool</code>, ...)</td>
|
||||||
|
<td>no; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clientjar</td>
|
||||||
|
<td>client jar file name. If missing the client jar file name is build using
|
||||||
|
the <var>ejbjar</var> file name: <var>ejbjar</var>=<q>hellobean-ejb.jar</q>
|
||||||
|
⇒ <q>hellobean-ejbclient.jar</q></td>
|
||||||
|
<td>no</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mode</td>
|
||||||
|
<td>choose the command launching mode. Two values: <q>java</q> or <q>fork</q>
|
||||||
|
(default). <q>java</q> is not supported for <var>version</var>=<q>5</q>. Possibility to
|
||||||
|
specify a classpath.</td>
|
||||||
|
<td>no</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>set the Borland Application Version.
|
||||||
|
<ul>
|
||||||
|
<li><q>4</q> means B.A.S (Borland Application Server 4.x)</li>
|
||||||
|
<li><q>5</q> means B.E.S (Borland Application Server 5.x)</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>4</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>The following <samp>build.xml</samp> snippet is an example of how to use Borland element in
|
||||||
|
the <code>ejbjar</code> task using the <q>fork</q> <var>mode</var>.</p>
|
||||||
|
<pre>
|
||||||
|
<blgenclient ejbjar="lib/secutest-ejb.jar" clientjar="lib/client.jar" debug="true" mode="fork" version="5">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="mymodule.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</blgenclient></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,360 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Ant Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="ant">Ant</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Runs Apache Ant on a supplied buildfile. This can be used to build subprojects. <strong>This
|
||||||
|
task must not be used outside of a <code>target</code> if it invokes the same build file it is part
|
||||||
|
of.</strong></p>
|
||||||
|
|
||||||
|
<p>When the <var>antfile</var> attribute is omitted, the file <samp>build.xml</samp> in the supplied
|
||||||
|
directory (<var>dir</var> attribute) is used.</p>
|
||||||
|
<p>If no target attribute is supplied, the default target of the new project is used.</p>
|
||||||
|
<p>By default, all of the properties of the current project will be available in the new project.
|
||||||
|
Alternatively, you can set the <var>inheritAll</var> attribute to <q>false</q> and only
|
||||||
|
"user" properties (i.e., those passed on the command-line) will be passed to the new
|
||||||
|
project. In either case, the set of properties passed to the new project will override the
|
||||||
|
properties that are set in the new project (See also the <a href="property.html">property</a>
|
||||||
|
task).</p>
|
||||||
|
|
||||||
|
<p>You can also set properties in the new project from the old project by using
|
||||||
|
nested <code>property</code> tags. These properties are always passed to the new project and any
|
||||||
|
project created in that project regardless of the setting of <var>inheritAll</var>. This allows you
|
||||||
|
to parameterize your subprojects.</p>
|
||||||
|
|
||||||
|
<p>When more than one nested <code><property></code> element would set a property of the same
|
||||||
|
name, the one declared last will win. This is for backwards compatibility reasons even though it is
|
||||||
|
different from the way <code><property></code> tasks in build files behave.</p>
|
||||||
|
|
||||||
|
<p>Properties defined on the command line cannot be overridden by
|
||||||
|
nested <code><property></code> elements. <em>Since Ant 1.8.0</em>, the same is true for
|
||||||
|
nested structures of <code><ant></code> tasks: if a build file <var>A</var>
|
||||||
|
invokes <var>B</var> via an <code><ant></code> task setting a property with a
|
||||||
|
nested <code><property></code> element and <var>B</var> contains an <code><ant></code>
|
||||||
|
tasks invoking <var>C</var>, <var>C</var> will see the value set in <var>A</var>, even
|
||||||
|
if <var>B</var> used a nested <code><property></code> element as well.</p>
|
||||||
|
|
||||||
|
<p>References to data types can also be passed to the new project, but by default they are not. If
|
||||||
|
you set the <var>inheritrefs</var> attribute to <q>true</q>, all references will be copied, but they
|
||||||
|
will not override references defined in the new project.</p>
|
||||||
|
|
||||||
|
<p>Nested <a href="#reference"><code><reference></code></a> elements can also be used to copy
|
||||||
|
references from the calling project to the new project, optionally under a different <var>id</var>.
|
||||||
|
References taken from nested elements will override existing references that have been defined
|
||||||
|
outside of targets in the new project—but not those defined inside of targets.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>antfile</td>
|
||||||
|
<td>the buildfile to use. This file is expected to be a filename relative to the <var>dir</var>
|
||||||
|
attribute given.</td>
|
||||||
|
<td>No; defaults to <q>build.xml</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>the directory to use as a <var>basedir</var> for the new Ant project
|
||||||
|
(unless <var>useNativeBasedir</var> is set to <q>true</q>). This will override
|
||||||
|
the <var>basedir</var> setting of the called project.<br/> Also serves as the directory to
|
||||||
|
resolve the <var>antfile</var> and <var>output</var> attribute's values (if any).
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to the current project's <var>basedir</var>, unless <var>inheritall</var> has
|
||||||
|
been set to <q>false</q>, in which case it doesn't have a default value</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>the target of the new Ant project that should be executed.</td>
|
||||||
|
<td>No; defaults to the new project's default target</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>Filename to write the Ant output to. This is relative to the value of the <var>dir</var>
|
||||||
|
attribute if it has been set or to the <var>basedir</var> of the current project otherwise.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inheritAll</td>
|
||||||
|
<td>If <q>true</q>, pass all properties to the new Ant project.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inheritRefs</td>
|
||||||
|
<td>If <q>true</q>, pass all references to the new Ant project.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useNativeBasedir</td>
|
||||||
|
<td>If set to <q>true</q>, the child build will use the same <var>basedir</var> as it would have
|
||||||
|
used when run from the command line (i.e. the <var>basedir</var> one would expect when looking
|
||||||
|
at the child build's buildfile). <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>property</h4>
|
||||||
|
<p>See the description of the <a href="property.html">property</a> task.<br/> These properties
|
||||||
|
become equivalent to properties you define on the command line. These are special properties and
|
||||||
|
they will always get passed down, even through additional <code><*ant*></code> tasks
|
||||||
|
with <var>inheritAll</var> set to <q>false</q> (see above).<br/> Note that the <var>refid</var>
|
||||||
|
attribute points to a reference in the calling project, not in the new one.</p>
|
||||||
|
|
||||||
|
<h4 id="reference">reference</h4>
|
||||||
|
<p>Used to choose references that shall be copied into the new project, optionally changing
|
||||||
|
their <var>id</var>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refid</td>
|
||||||
|
<td>The <var>id</var> of the reference in the calling project.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>torefid</td>
|
||||||
|
<td>The <var>id</var> of the reference in the new project.</td>
|
||||||
|
<td>No; defaults to the value of <var>refid</var></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>propertyset</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify a set of properties to be copied into the new project
|
||||||
|
with <a href="../Types/propertyset.html">propertyset</a>s.</p>
|
||||||
|
|
||||||
|
<h4>target</h4>
|
||||||
|
<p><em>Since Ant 1.6.3</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify multiple targets using nested <code><target></code> elements instead of
|
||||||
|
using the <var>target</var> attribute. These will be executed as if Ant had been invoked with a
|
||||||
|
single target whose dependencies are the targets so specified, in the order specified.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The name of the called target.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Basedir of the new project</h3>
|
||||||
|
|
||||||
|
<p>If you set <var>useNativeBasedir</var> to true, the <var>basedir</var> of the new project will be
|
||||||
|
whatever the <var>basedir</var> attribute of the <code><project></code> element of the new
|
||||||
|
project says (or the new project's directory if the there is no <var>basedir</var>
|
||||||
|
attribute)—no matter what any other attribute of this task says and no matter how deeply
|
||||||
|
nested into levels of <code><ant></code> invocations this task lives.</p>
|
||||||
|
|
||||||
|
<p>If you haven't set <var>useNativeBasedir</var> or set it to <q>false</q>, the following rules
|
||||||
|
apply:</p>
|
||||||
|
|
||||||
|
<p>The <var>basedir</var> value of the new project is affected by the two attributes, <var>dir</var>
|
||||||
|
and <var>inheritall</var>, as well as the <code><ant></code> task's history. The current
|
||||||
|
behaviour is known to be confusing but cannot be changed without breaking backwards compatibility in
|
||||||
|
subtle ways.</p>
|
||||||
|
|
||||||
|
<p>If the <code><ant></code> task is in a "top level" build file, i.e. the project containing
|
||||||
|
the <code><ant></code> task has not itself been invoked as part of a
|
||||||
|
different <code><ant></code> (or <code><antcall></code>) task "higher up", the following
|
||||||
|
table shows the details:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><var>dir</var> attribute</th>
|
||||||
|
<th scope="col"><var>inheritAll</var> attribute</th>
|
||||||
|
<th scope="col">new project's <var>basedir</var></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value provided</td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td>value of <var>dir</var> attribute</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value provided</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td>value of <var>dir</var> attribute</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td><var>basedir</var> of calling project (the one whose build
|
||||||
|
file contains the <code><ant></code> task).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td><var>basedir</var> attribute of the <code><project></code> element
|
||||||
|
of the new project</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>If on the other hand the <code><ant></code> task is already nested into another invocation,
|
||||||
|
the parent invocation's settings affect the outcome of the <var>basedir</var> value. The current
|
||||||
|
task's <var>dir</var> attribute will always win, but if the <var>dir</var> attribute has been
|
||||||
|
omitted an even more complex situation arises:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">parent <var>dir</var> attribute</th>
|
||||||
|
<th scope="col">parent <var>inheritAll</var> attribute</th>
|
||||||
|
<th scope="col">current <var>inheritAll</var> attribute</th>
|
||||||
|
<th scope="col">new project's <var>basedir</var></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value provided</td>
|
||||||
|
<td>any</td>
|
||||||
|
<td>any</td>
|
||||||
|
<td>value of parent's <var>dir</var> attribute</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td><var>basedir</var> of parent project (the one whose build file called the build file that
|
||||||
|
contains the current <code><ant></code> task).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td><var>basedir</var> of parent project (the one whose build file called the build file that
|
||||||
|
contains the current <code><ant></code> task).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
<td><var>basedir</var> of calling project (the one whose build file contains the
|
||||||
|
current <code><ant></code> task).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>omitted</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
<td><var>basedir</var> attribute of the <code><project></code> element of the new
|
||||||
|
project</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>If you add even deeper levels of nesting, things get even more complicated and you need to apply
|
||||||
|
the above table recursively.</p>
|
||||||
|
|
||||||
|
<p>If the <var>basedir</var> of the outermost build has been specified as a property on the command
|
||||||
|
line (i.e. <kbd>-Dbasedir=some-value</kbd> or a <kbd>-propertyfile</kbd> argument) the value
|
||||||
|
provided will get an even higher priority. For any <code><ant></code> task that doesn't
|
||||||
|
specify a <var>dir</var> attribute, the new project's <var>basedir</var> will be the value specified
|
||||||
|
on the command line—no matter how deeply nested into layers of build files the task may
|
||||||
|
be.</p>
|
||||||
|
|
||||||
|
<p>The same happens if the <var>basedir</var> is specified as a nested <code><property></code>
|
||||||
|
of an <code><ant></code> task. The <var>basedir</var> of build files started at deeper levels
|
||||||
|
will be set to the specified value of the property element unless the corresponding Ant tasks set
|
||||||
|
the <var>dir</var> attribute explicitly.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>These are different ways of using the task:</p>
|
||||||
|
<pre>
|
||||||
|
<ant antfile="subproject/subbuild.xml" target="compile"/>
|
||||||
|
|
||||||
|
<ant dir="subproject"/>
|
||||||
|
|
||||||
|
<ant antfile="subproject/property_based_subbuild.xml">
|
||||||
|
<property name="param1" value="version 1.x"/>
|
||||||
|
<property file="config/subproject/default.properties"/>
|
||||||
|
</ant>
|
||||||
|
|
||||||
|
<ant inheritAll="false" antfile="subproject/subbuild.xml">
|
||||||
|
<property name="output.type" value="html"/>
|
||||||
|
</ant></pre>
|
||||||
|
|
||||||
|
<p>These lines invoke the same build file:</p>
|
||||||
|
<pre>
|
||||||
|
<ant antfile="sub1/sub2/build.xml"/>
|
||||||
|
<ant antfile="sub2/build.xml" dir="sub1"/>
|
||||||
|
<ant antfile="build.xml" dir="sub1/sub2"/></pre>
|
||||||
|
|
||||||
|
<p>The build file of the calling project defines some <code><path></code> elements like
|
||||||
|
this:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<path id="path1">
|
||||||
|
...
|
||||||
|
</path>
|
||||||
|
<path id="path2">
|
||||||
|
...
|
||||||
|
</path></pre>
|
||||||
|
|
||||||
|
<p>and the called build file (<samp>subbuild.xml</samp>) also defines a <code><path></code>
|
||||||
|
with the <var>id</var> <samp>path1</samp>, but <samp>path2</samp> is not defined; then</p>
|
||||||
|
|
||||||
|
<pre><ant antfile="subbuild.xml" inheritrefs="true"/></pre>
|
||||||
|
|
||||||
|
<p>will not override <samp>subbuild</samp>'s definition of <samp>path1</samp>, but make the parent's
|
||||||
|
definition of <samp>path2</samp> available in the <samp>subbuild</samp>, whereas</p>
|
||||||
|
|
||||||
|
<pre><ant antfile="subbuild.xml"/></pre>
|
||||||
|
|
||||||
|
<p>as well as</p>
|
||||||
|
|
||||||
|
<pre><ant antfile="subbuild.xml" inheritrefs="false"/></pre>
|
||||||
|
|
||||||
|
<p>will neither override <samp>path1</samp> nor copy <samp>path2</samp>, while</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<ant antfile="subbuild.xml" inheritrefs="false">
|
||||||
|
<reference refid="path1"/>
|
||||||
|
</ant></pre>
|
||||||
|
|
||||||
|
<p>will override <samp>subbuild</samp>'s definition of <samp>path1</samp>, and</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<ant antfile="subbuild.xml" inheritrefs="false">
|
||||||
|
<reference refid="path1" torefid="path2"/>
|
||||||
|
</ant></pre>
|
||||||
|
|
||||||
|
<p>will copy the parent's definition of <samp>path1</samp> into the new project using
|
||||||
|
the <var>id</var> <samp>path2</samp>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,177 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>AntCall Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="antcall">AntCall</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Call another target within the same buildfile optionally specifying some properties (params in
|
||||||
|
this context). <strong>This task must not be used outside of a <code>target</code>.</strong></p>
|
||||||
|
|
||||||
|
<p>By default, all of the properties of the current project will be available in the new project.
|
||||||
|
Alternatively, you can set the <var>inheritAll</var> attribute to <q>false</q> and only
|
||||||
|
"user" properties (i.e., those passed on the command-line) will be passed to the new
|
||||||
|
project. In either case, the set of properties passed to the new project will override the
|
||||||
|
properties that are set in the new project (see also the <a href="property.html">property</a>
|
||||||
|
task).</p>
|
||||||
|
<p>You can also set properties in the new project from the old project by using
|
||||||
|
nested <code><param></code> tags. These properties are always passed to the new project and
|
||||||
|
any project created in that project regardless of the setting of <var>inheritAll</var>. This allows
|
||||||
|
you to parameterize your subprojects. Properties defined on the command line can not be overridden
|
||||||
|
by nested <code><param></code> elements.</p>
|
||||||
|
|
||||||
|
<p>When more than one nested <code><param></code> element would set a property of the same
|
||||||
|
name, the one declared last will win. This is for backwards compatibility reasons even so it is
|
||||||
|
different from the way <code><property></code> tasks in build files behave.</p>
|
||||||
|
|
||||||
|
<p>Nested <a href="#reference"><code><reference></code></a> elements can be used to copy
|
||||||
|
references from the calling project to the new project, optionally under a different <var>id</var>.
|
||||||
|
References taken from nested elements will override existing references that have been defined
|
||||||
|
outside of targets in the new project—but not those defined inside of targets.</p>
|
||||||
|
|
||||||
|
<p>When a target is invoked by <code>antcall</code>, all of its dependent targets will also be
|
||||||
|
called within the context of any new parameters. For example. if the target <q>doSomethingElse</q>;
|
||||||
|
depended on the target <q>init</q>, then the <code>antcall</code> of <q>doSomethingElse</q> will
|
||||||
|
call <q>init</q> during the call. Of course, any properties defined in the <code>antcall</code>
|
||||||
|
task or inherited from the calling target will be fixed and not overridable in the <q>init</q>
|
||||||
|
target—or indeed in the <q>doSomethingElse</q> target.</p>
|
||||||
|
|
||||||
|
<p>The called target(s) are run in a new project; be aware that this means properties, references,
|
||||||
|
etc. set by called targets will not persist back to the calling project.</p>
|
||||||
|
|
||||||
|
<p>If the build file changes after you've started the build, the behavior of this task is
|
||||||
|
undefined.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>The target to execute.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inheritAll</td>
|
||||||
|
<td>If <q>true</q>, pass all properties to the new Apache Ant project.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inheritRefs</td>
|
||||||
|
<td>If <q>true</q>, pass all references to the new Ant project.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Note on <code>inheritRefs</code></h3>
|
||||||
|
|
||||||
|
<p><code><antcall></code> will not override existing references, even if you
|
||||||
|
set <var>inheritRefs</var> to true. As the called build files is the same build file as the calling
|
||||||
|
one, this means it will not override any reference set via an <var>id</var> attribute at all. The
|
||||||
|
only references that can be inherited by the child project are those defined by
|
||||||
|
nested <code><reference></code> elements or references defined by tasks directly (not using
|
||||||
|
the <var>id</var> attribute).</p>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>param</h4>
|
||||||
|
<p>Specifies the properties to set before running the specified
|
||||||
|
target. See <a href="property.html">property</a> for usage guidelines.<br/> These properties become
|
||||||
|
equivalent to properties you define on the command line. These are special properties and they will
|
||||||
|
always get passed down, even through additional <code><*ant*></code> tasks
|
||||||
|
with <var>inheritAll</var> set to <q>false</q> (see above).</p>
|
||||||
|
|
||||||
|
<h4 id="reference">reference</h4>
|
||||||
|
<p>Used to choose references that shall be copied into the new project, optionally changing
|
||||||
|
their <var>id</var>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refid</td>
|
||||||
|
<td>The <var>id</var> of the reference in the calling project.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>torefid</td>
|
||||||
|
<td>The <var>id</var> of the reference in the new project.</td>
|
||||||
|
<td>No; defaults to the value of <var>refid</var></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>propertyset</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify a set of properties to be copied into the new project
|
||||||
|
with <a href="../Types/propertyset.html">propertyset</a>s.</p>
|
||||||
|
|
||||||
|
<h4>target</h4>
|
||||||
|
<p><em>Since Ant 1.6.3</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify multiple targets using nested <code><target></code> elements instead of
|
||||||
|
using the <var>target</var> attribute. These will be executed as if Ant had been invoked with a
|
||||||
|
single target whose dependencies are the targets so specified, in the order specified.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The name of the called target.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>The following</p>
|
||||||
|
<pre>
|
||||||
|
<target name="default">
|
||||||
|
<antcall target="doSomethingElse">
|
||||||
|
<param name="param1" value="value"/>
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="doSomethingElse">
|
||||||
|
<echo message="param1=${param1}"/>
|
||||||
|
</target></pre>
|
||||||
|
<p>will run the target <var>doSomethingElse</var> and echo <code>param1=value</code>, whereas</p>
|
||||||
|
<pre>
|
||||||
|
<antcall ... >
|
||||||
|
<reference refid="path1" torefid="path2"/>
|
||||||
|
</antcall></pre>
|
||||||
|
<p>will copy the parent's definition of <samp>path1</samp> into the new project using
|
||||||
|
the <var>id</var> <samp>path2</samp>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,148 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>ANTLR Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="antlr">ANTLR</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Invokes the <a href="https://www.antlr.org/" target="_top">ANTLR</a> Translator generator on a
|
||||||
|
grammar file.</p>
|
||||||
|
<p>To use the ANTLR task, set the <var>target</var> attribute to the name of the grammar file to
|
||||||
|
process. Optionally, you can also set the <var>outputdirectory</var> to write the generated file to
|
||||||
|
a specific directory. Otherwise ANTLR writes the generated files to the directory containing the
|
||||||
|
grammar file.</p>
|
||||||
|
<p>This task only invokes ANTLR if the grammar file (or the supergrammar specified by
|
||||||
|
the <var>glib</var> attribute) is newer than the generated files.</p>
|
||||||
|
<p><strong>Note</strong>: This task depends on external libraries not included in the Apache Ant
|
||||||
|
distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more
|
||||||
|
information.</p>
|
||||||
|
<p>Antlr 2.7.2 Note: <em>You will need <samp>antlrall.jar</samp> that can be created by
|
||||||
|
the <q>antlr-all.jar</q> target of the Makefile provided with the download.</em></p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>The grammar file to process.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputdirectory</td>
|
||||||
|
<td>The directory to write the generated files to.</td>
|
||||||
|
<td>No; defaults to the directory containing the grammar file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>glib</td>
|
||||||
|
<td>An optional super grammar file that the target grammar overrides. This feature is only
|
||||||
|
needed for advanced vocabularies.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debug</td>
|
||||||
|
<td>When set to <q>yes</q>, this flag adds code to the generated parser that will launch the
|
||||||
|
ParseView debugger upon invocation.<br/> Note: ParseView is a separate component that needs
|
||||||
|
to be installed or your grammar will have compilation errors.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>html</td>
|
||||||
|
<td>Emit an HTML version of the grammar with hyperlinked actions if set to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>diagnostic</td>
|
||||||
|
<td>Generate a text file with debugging information based on the target grammar if set
|
||||||
|
to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>trace</td>
|
||||||
|
<td>Force <strong>all</strong> rules to call traceIn/traceOut if set to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>traceParser</td>
|
||||||
|
<td>Only force parser rules to call traceIn/traceOut if set to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>traceLexer</td>
|
||||||
|
<td>Only force lexer rules to call traceIn/traceOut if set to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>traceTreeWalker</td>
|
||||||
|
<td>Only force tree walker rules to call traceIn/traceOut if set to <q>yes</q>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<!--tr>
|
||||||
|
<td>fork</td>
|
||||||
|
<td>Run ANTLR in a separate JVM.</td>
|
||||||
|
<td>No; default is <q>off</q></td>
|
||||||
|
</tr-->
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>The directory to invoke JVM in.<!--(ignored if fork is disabled)--></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3 id="nested">Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<p>The task supports a nested <code><classpath></code> element, that represents
|
||||||
|
a <a href="../using.html#path">path-like structure</a>. It is given as a convenience if you have to
|
||||||
|
specify the original ANTLR directory. In most cases, dropping the appropriate ANTLR jar in the
|
||||||
|
normal Ant lib repository will be enough.</p>
|
||||||
|
|
||||||
|
<h4>jvmarg</h4>
|
||||||
|
|
||||||
|
<p><!--If fork is enabled, -->Additional parameters may be passed to the new JVM via
|
||||||
|
nested <code><jvmarg></code> attributes, for example:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<antlr target="...">
|
||||||
|
<jvmarg value="-Djava.compiler=NONE"/>
|
||||||
|
...
|
||||||
|
</antlr></pre>
|
||||||
|
|
||||||
|
<p>would run ANTLR in a JVM without JIT.</p>
|
||||||
|
|
||||||
|
<p><code><jvmarg></code> allows all attributes described
|
||||||
|
in <a href="../using.html#arg">Command line arguments</a>.</p>
|
||||||
|
|
||||||
|
<h3>Example</h3>
|
||||||
|
<p>Invoke ANTLR on grammar file <samp>etc/java.g</samp>, writing the generated files
|
||||||
|
to <samp>build/src</samp>:</p>
|
||||||
|
<pre>
|
||||||
|
<antlr
|
||||||
|
target="etc/java.g"
|
||||||
|
outputdirectory="build/src"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,92 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>AntStructure Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="antstructure">AntStructure</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Generates an DTD for Apache Ant buildfiles which contains information about all tasks currently
|
||||||
|
known to Ant.</p>
|
||||||
|
|
||||||
|
<p>Actually the DTD will not be a real DTD for buildfiles since Ant's usage of XML cannot be
|
||||||
|
captured with a DTD. Several elements in Ant can have different attribute lists depending on the
|
||||||
|
element that contains them. <a href="fail.html"><code><fail></code></a> for example can be a
|
||||||
|
task or a nested child element of the <a href="../Tasks/sound.html"><code><sound></code></a>
|
||||||
|
task. Don't consider the generated DTD something to rely upon.</p>
|
||||||
|
|
||||||
|
<p>Also note that the DTD generated by this task is incomplete, you can always add XML entities
|
||||||
|
using <a href="taskdef.html"><code><taskdef></code></a>
|
||||||
|
or <a href="typedef.html"><code><typedef></code></a>.
|
||||||
|
See <a href="https://web.archive.org/web/20071231061243/http://www.sdv.fr/pages/casa/html/ant-dtd.en.html"
|
||||||
|
target="_top">here</a> for a way to get around this problem.</p>
|
||||||
|
<p>This task doesn't know about required attributes, all will be listed
|
||||||
|
as <code>#IMPLIED</code>.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em> custom structure printers can be used instead of the one that emits a DTD.
|
||||||
|
In order to plug in your own structure, you have to implement the
|
||||||
|
interface <code class="code">org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter</code>
|
||||||
|
and <code><typedef></code> your class and use the new type as a nested element of this
|
||||||
|
task—see the example below.
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>file to write the DTD to.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Basic usage</p>
|
||||||
|
|
||||||
|
<pre><antstructure output="project.dtd"/></pre>
|
||||||
|
|
||||||
|
<p>Emit your own structure instead of a DTD: first you need to implement the interface</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
package org.example;
|
||||||
|
import org.apache.tools.ant.taskdefs.AntStructure;
|
||||||
|
public class MyPrinter implements AntStructure.StructurePrinter {
|
||||||
|
...
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<p>and then use it via typedef</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<typedef name="myprinter" classname="org.example.MyPrinter"/>
|
||||||
|
<antstructure output="project.my">
|
||||||
|
<myprinter/>
|
||||||
|
</antstructure></pre>
|
||||||
|
|
||||||
|
<p>Your own <code class="code">StructurePrinter</code> can accept attributes and nested elements
|
||||||
|
just like any other Ant type or task.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,87 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Antversion Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="antversion">Antversion</h2>
|
||||||
|
<p><em>Since Ant 1.7.0</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Stores the Apache Ant version (when used as task) or checks for a specific Ant version (when used
|
||||||
|
as condition).</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" rowspan="2">Attribute</th>
|
||||||
|
<th scope="col" rowspan="2">Description</th>
|
||||||
|
<th scope="col" colspan="2">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Task</th>
|
||||||
|
<th scope="col">Condition</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>atleast</td>
|
||||||
|
<td>The version that this Ant is of at least. The format
|
||||||
|
is <code>major.minor.point</code>.</td>
|
||||||
|
<td class="center">No</td>
|
||||||
|
<td rowspan="2">Exactly one of these</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>exactly</td>
|
||||||
|
<td>The version that this Ant is of exactly. The format is <code>major.minor.point</code>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to set.</td>
|
||||||
|
<td class="center">Yes</td>
|
||||||
|
<td>Ignored</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Store the current Ant version in the property <code>antversion</code>.</p>
|
||||||
|
<pre><antversion property="antversion"/></pre>
|
||||||
|
|
||||||
|
<p>Store the Ant version in the property <code>antversion</code> if the current Ant version is 1.6.0
|
||||||
|
or higher. Otherwise the property remains unset.</p>
|
||||||
|
<pre><antversion property="antversion" atleast="1.6"/></pre>
|
||||||
|
|
||||||
|
<p>Set the property <code>ant-is-exact-7</code> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.1
|
||||||
|
would match.</p>
|
||||||
|
<pre><antversion property="ant-is-exact-7" exactly="1.7.0"/></pre>
|
||||||
|
|
||||||
|
<p>Set <code>Ant17isOnline</code> if Ant 1.7.0 is running and can get a non-error-response from the
|
||||||
|
Ant homepage.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="Ant17isOnline">
|
||||||
|
<and>
|
||||||
|
<antversion exactly="1.7.0"/>
|
||||||
|
<http url="https://ant.apache.org"/>
|
||||||
|
</and>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,464 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Apply Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="apply">Apply</h2>
|
||||||
|
<p><em>The name <code>execon</code> is <u>deprecated</u> and only kept for backwards
|
||||||
|
compatibility.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Executes a system command. When the <var>os</var> attribute is specified, then the command is
|
||||||
|
only executed when Apache Ant is run on one of the specified operating systems.</p>
|
||||||
|
|
||||||
|
<p>The files and/or directories of a number of <a href="../Types/resources.html#collection">Resource
|
||||||
|
Collection</a>s –- including but not restricted
|
||||||
|
to <a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s
|
||||||
|
(<em>since Ant 1.6</em>) or <a href="../Types/filelist.html">FileList</a>s (<em>since Ant 1.6</em>)
|
||||||
|
–- are passed as arguments to the system command.</p>
|
||||||
|
<p>If you specify a nested <a href="../Types/mapper.html">mapper</a>, the timestamp of each source
|
||||||
|
file is compared to the timestamp of a target file which is defined by the
|
||||||
|
nested <code>mapper</code> element and searched for in the given <var>dest</var>, if specified.</p>
|
||||||
|
<p>At least one <code>fileset</code> or <code>filelist</code> is required, and you must not specify
|
||||||
|
more than one <code>mapper</code>.</p>
|
||||||
|
|
||||||
|
<p>Note that you cannot interact with the forked program, the only way to send input to it is via
|
||||||
|
the <var>input</var> and <var>inputstring</var> attributes.</p>
|
||||||
|
|
||||||
|
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4>
|
||||||
|
|
||||||
|
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use
|
||||||
|
the <code><apply></code> task with <var>spawn</var> set to <q>false</q>, you must provide
|
||||||
|
explicit input to the forked process or Ant will be suspended because it tries to read from the
|
||||||
|
standard input.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>executable</td>
|
||||||
|
<td>the command to execute without any command line arguments.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>the directory where the command is expected to place target files when it is executed.</td>
|
||||||
|
<td>No; ignored unless a nested mapper is specified; by default, the target filenames returned
|
||||||
|
by the mapper will be interpreted as absolute paths</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>spawn</td>
|
||||||
|
<td>whether or not you want the commands to be spawned.<br/> If you spawn a command, its output
|
||||||
|
will not be logged by Ant.<br/> The input, output, error, and result property settings are not
|
||||||
|
active when spawning a process.<br/> <em>since Ant 1.6</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>the directory in which the command should be executed.</td>
|
||||||
|
<td>No; if <var>vmlauncher</var> is <q>true</q>, defaults to the current working directory,
|
||||||
|
otherwise the project's <var>basedir</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>relative</td>
|
||||||
|
<td>whether the filenames should be passed on the command line as relative pathnames (relative
|
||||||
|
to the base directory of the corresponding fileset/list for source files or
|
||||||
|
the <var>dest</var> attribute for target files).</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forwardslash</td>
|
||||||
|
<td>whether the file names should be passed with forward slashes even if the operating system
|
||||||
|
requires other file separator. The option is ignored if the system file separator is a forward
|
||||||
|
slash.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <code><os></code> condition.
|
||||||
|
<em>since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>the file to which the output of the command should be redirected. If the error stream is
|
||||||
|
not also redirected to a file or property, it will appear in this output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>The file to which the standard error of the command should be redirected. <em>since Ant
|
||||||
|
1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>logError</td>
|
||||||
|
<td>This attribute is used when you wish to see error output in Ant's log and you are
|
||||||
|
redirecting output to a file/property. The error output will not be included in the output
|
||||||
|
file/property. If you redirect error with the <var>error</var> or <var>errorProperty</var>
|
||||||
|
attributes, this will have no effect. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>whether output should be appended to or overwrite an existing file. If you
|
||||||
|
set <var>parallel</var> to <q>false</q>, you will probably want to set this one
|
||||||
|
to <q>true</q>.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputproperty</td>
|
||||||
|
<td>the name of a property in which the output of the command should be stored. Unless the
|
||||||
|
error stream is redirected to a separate file or stream, this property will include the error
|
||||||
|
output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorproperty</td>
|
||||||
|
<td>The name of a property in which the standard error of the command should be
|
||||||
|
stored. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>input</td>
|
||||||
|
<td>A file from which the executed command's standard input is taken. This attribute is mutually
|
||||||
|
exclusive with the <var>inputstring</var> attribute. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inputstring</td>
|
||||||
|
<td>A string which serves as the input stream for the executed command. This attribute is
|
||||||
|
mutually exclusive with the <var>input</var> attribute. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resultproperty</td>
|
||||||
|
<td>the name of a property in which the return code of the command should be stored. Only of
|
||||||
|
interest if <var>failonerror</var> is <q>false</q>. If you set <var>parallel</var>
|
||||||
|
to <q>false</q>, only the result of the first execution will be stored.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timeout</td>
|
||||||
|
<td>Stop the command if it doesn't finish within the specified time (given in
|
||||||
|
milliseconds).</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failifexecutionfails</td>
|
||||||
|
<td>Stop the build if we can't start the program.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>skipemptyfilesets</td>
|
||||||
|
<td>Don't run the command, if no source files have been found or are newer than their
|
||||||
|
corresponding target files. Despite its name, this attribute applies to filelists as
|
||||||
|
well.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>parallel</td>
|
||||||
|
<td>Run the command only once, appending all files as arguments. If <q>false</q>, command will
|
||||||
|
be executed once for every file.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>file</q>, <q>dir</q> or <q>both</q>. If set to <q>file</q>, only the names of
|
||||||
|
plain files will be sent to the command. If set to <q>dir</q>, only the names of directories
|
||||||
|
are considered.<br/>
|
||||||
|
<strong>Note</strong>: The <var>type</var> attribute does not apply to
|
||||||
|
nested <code>dirset</code>s—<code>dirset</code>s always implicitly assume type to
|
||||||
|
be <q>dir</q>.</td>
|
||||||
|
<td>No; default is <q>file</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>newenvironment</td>
|
||||||
|
<td>Do not propagate old environment when new environment variables are specified.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>vmlauncher</td>
|
||||||
|
<td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the
|
||||||
|
underlying OS's shell, either directly or through the <kbd>antRun</kbd> scripts, will be
|
||||||
|
used. Under some operating systems, this gives access to facilities not normally available
|
||||||
|
through JVM including, under Windows, being able to execute scripts, rather than their
|
||||||
|
associated interpreter. If you want to specify the name of the executable as a relative path
|
||||||
|
to the directory given by the <var>dir</var> attribute, it may become necessary to
|
||||||
|
set <var>vmlauncher</var> to <q>false</q> as well.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resolveExecutable</td>
|
||||||
|
<td>When this attribute is <q>true</q>, the name of the executable if resolved firstly against
|
||||||
|
the project <var>basedir</var> and if that does not exist, against the execution directory if
|
||||||
|
specified. On Unix systems, if you only want to allow execution of commands in the user's
|
||||||
|
path, set this to <q>false</q>.
|
||||||
|
<em>since Ant 1.6</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxparallel</td>
|
||||||
|
<td>Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to
|
||||||
|
negative integer for unlimited. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No, unlimited by default</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>addsourcefile</td>
|
||||||
|
<td>Whether source file names should be added to the command automatically. <em>Since Ant
|
||||||
|
1.6</em>.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to print a summary after execution or not. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoremissing</td>
|
||||||
|
<td>Whether to ignore nonexistent files specified via filelists. <em>Since Ant 1.6.2</em>.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>force</td>
|
||||||
|
<td>Whether to bypass timestamp comparisons for target files. <em>Since Ant 1.6.3</em>.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardOutput</td>
|
||||||
|
<td>Whether output should completely be discarded. This setting is
|
||||||
|
incompatible with any setting that redirects output to files or
|
||||||
|
properties.<br/>
|
||||||
|
If you set this to <q>true</q> error output will be discared as
|
||||||
|
well unless you redirect error output to files, properties or
|
||||||
|
enable <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardError</td>
|
||||||
|
<td>Whether error output should completely be discarded. This
|
||||||
|
setting is incompatible with any setting that redirects error
|
||||||
|
output to files or properties as well as <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>fileset</h4>
|
||||||
|
<p>You can use any number of nested <code><fileset></code> elements to define the files for
|
||||||
|
this task and refer to <code><fileset></code>s defined elsewhere.</p>
|
||||||
|
|
||||||
|
<h4>filelist</h4>
|
||||||
|
<p><em>Since Ant 1.6</em></p>
|
||||||
|
<p>You can use any number of nested <code><filelist></code> elements to define the files for
|
||||||
|
this task and refer to <code><filelist></code>s defined elsewhere.</p>
|
||||||
|
|
||||||
|
<h4>dirset</h4>
|
||||||
|
<p><em>Since Ant 1.6</em></p>
|
||||||
|
<p>You can use any number of nested <code><dirset></code> elements to define the directories
|
||||||
|
for this task and refer to <code><dirset></code>s defined elsewhere.</p>
|
||||||
|
|
||||||
|
<h4>Any other <a href="../Types/resources.html#collection">resource collection</a></h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>You can use any number of nested resource collections.</p>
|
||||||
|
|
||||||
|
<h4>mapper</h4>
|
||||||
|
<p>A single <code><mapper></code> specifies the target files relative to the <var>dest</var>
|
||||||
|
attribute for dependency checking. If the <var>dest</var> attribute is specified it will be used as
|
||||||
|
a base directory for resolving relative pathnames returned by the mapper. At least one
|
||||||
|
<code><fileset></code> or <code><filelist></code> is required.</p>
|
||||||
|
|
||||||
|
<h4>arg</h4>
|
||||||
|
<p>Command line arguments should be specified as nested <code><arg></code>
|
||||||
|
elements. See <a href="../using.html#arg">Command line arguments</a>.</p>
|
||||||
|
|
||||||
|
<h4>srcfile</h4>
|
||||||
|
<p>By default the file names of the source files will be added to the end of the command line
|
||||||
|
(unless you set <var>addsourcefile</var> to <q>false</q>). If you need to place it somewhere
|
||||||
|
different, use a nested <code><srcfile></code> element between your <code><arg></code>
|
||||||
|
elements to mark the insertion point.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td>a prefix to place in front of the file name when building the command line
|
||||||
|
argument. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>a suffix to append to the file name when building the command line argument. <em>Since Ant
|
||||||
|
1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h4>targetfile</h4>
|
||||||
|
<p><code><targetfile></code> is similar to <code><srcfile></code> and marks the position
|
||||||
|
of the target filename on the command line. If omitted, the target filenames will not be added to
|
||||||
|
the command line at all. This element can only be specified if you also define a nested mapper.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td>a prefix to place in front of the file name when building the command line
|
||||||
|
argument. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>a suffix to append to the file name when building the command line argument. <em>Since Ant
|
||||||
|
1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h4>env</h4>
|
||||||
|
<p>It is possible to specify environment variables to pass to the system command via
|
||||||
|
nested <code><env></code> elements. See the description in the section
|
||||||
|
about <a href="exec.html#env">exec</a></p>
|
||||||
|
<h4>redirector</h4>
|
||||||
|
<em>Since Ant 1.6.2</em>
|
||||||
|
<p>A nested <a href="../Types/redirector.html">I/O Redirector</a> can be specified. <apply>'s
|
||||||
|
behavior is like that of <a href="exec.html#redirector">exec</a> with regard to redirectors, with
|
||||||
|
the exception that, in non-<var>parallel</var> mode, file mapping will take place with each
|
||||||
|
iteration. This grants the user the capacity to receive input from, and send output to, different
|
||||||
|
files for each sourcefile.</p>
|
||||||
|
<p>In <var>parallel</var> mode the redirector will be reset for each batch of executions
|
||||||
|
(with <var>maxparallel</var> > 0) and null will be used a source file just like it is in the case
|
||||||
|
of <code>exec</code>.</p>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Invoke <kbd>ls -l</kbd>, adding the absolute filenames of all files below <samp>/tmp</samp> not
|
||||||
|
ending in <samp>.txt</samp> and all files of the FileSet with <var>id</var> <samp>other.files</samp>
|
||||||
|
to the command line.</p>
|
||||||
|
<pre>
|
||||||
|
<apply executable="ls">
|
||||||
|
<arg value="-l"/>
|
||||||
|
<fileset dir="/tmp">
|
||||||
|
<patternset>
|
||||||
|
<exclude name="**/*.txt"/>
|
||||||
|
</patternset>
|
||||||
|
</fileset>
|
||||||
|
<fileset refid="other.files"/>
|
||||||
|
</apply></pre>
|
||||||
|
|
||||||
|
<p>Invoke <kbd>somecommand arg1 SOURCEFILENAME arg2</kbd> for each file in <samp>/tmp</samp>
|
||||||
|
replacing <code>SOURCEFILENAME</code> with the absolute filename of each file in
|
||||||
|
turn. If <var>parallel</var> had been set to <q>true</q>, <code>SOURCEFILENAME</code> would be
|
||||||
|
replaced with the absolute filenames of all files separated by spaces.</p>
|
||||||
|
<pre>
|
||||||
|
<apply executable="somecommand" parallel="false">
|
||||||
|
<arg value="arg1"/>
|
||||||
|
<srcfile/>
|
||||||
|
<arg value="arg2"/>
|
||||||
|
<fileset dir="/tmp"/>
|
||||||
|
</apply>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Invoke <kbd>cc -c -o TARGETFILE SOURCEFILE</kbd> for each <samp>.c</samp> file that is newer than
|
||||||
|
the corresponding <samp>.o</samp>, replacing <code>TARGETFILE</code> with the absolute filename of
|
||||||
|
the <samp>.o</samp> and <code>SOURCEFILE</code> with the absolute name of the <samp>.c</samp>
|
||||||
|
file.</p>
|
||||||
|
<pre>
|
||||||
|
<apply executable="cc" dest="src/C" parallel="false">
|
||||||
|
<arg value="-c"/>
|
||||||
|
<arg value="-o"/>
|
||||||
|
<targetfile/>
|
||||||
|
<srcfile/>
|
||||||
|
<fileset dir="src/C" includes="*.c"/>
|
||||||
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
|
</apply></pre>
|
||||||
|
|
||||||
|
<p>Apply the fictitious <kbd>processfile</kbd> executable to all files matching <samp>*.file</samp>
|
||||||
|
in the <samp>src</samp> directory. The <samp>out</samp> <code><mapper></code> has been set up
|
||||||
|
to map <samp>*.file</samp> to <samp>*.out</samp>, then this <code><mapper></code> is used to
|
||||||
|
specify <code>targetfile</code>s for this <code><apply></code> task. A reference
|
||||||
|
to <samp>out</samp> is then used as an <code><outputmapper></code> nested in
|
||||||
|
a <code><redirector></code>, which in turn is nested beneath this <code><apply></code>
|
||||||
|
instance. This allows us to perform dependency checking against output files—the target files
|
||||||
|
in this case.</p>
|
||||||
|
<pre>
|
||||||
|
<mapper id="out" type="glob"
|
||||||
|
from="src${file.separator}*.file"
|
||||||
|
to="dest${file.separator}*.out"/>
|
||||||
|
|
||||||
|
<apply executable="processfile" dest="dest">
|
||||||
|
<fileset dir="src" includes="*.file"/>
|
||||||
|
<mapper refid="out"/>
|
||||||
|
<redirector>
|
||||||
|
<outputmapper refid="out"/>
|
||||||
|
</redirector>
|
||||||
|
</apply></pre>
|
||||||
|
|
||||||
|
<p>Apply the <kbd>ls</kbd> executable to all directories in the <code>PATH</code>, effectively
|
||||||
|
listing all executables that are available on the <code>PATH</code>.</p>
|
||||||
|
<pre>
|
||||||
|
<apply executable="ls" parallel="true"
|
||||||
|
force="true" dest="${basedir}" append="true" type="both">
|
||||||
|
<path>
|
||||||
|
<pathelement path="${env.PATH}"/>
|
||||||
|
</path>
|
||||||
|
<identitymapper/>
|
||||||
|
</apply></pre>
|
||||||
|
|
||||||
|
<p>Convert all JavaScript files in the <samp>src</samp> directory using the command <kbd>jsmin <
|
||||||
|
src/a.js > dest/a.js</kbd>. Because the filename itself should not be passed to
|
||||||
|
the <code>jsmin</code> program, the <var>addsourcefile</var> is set to <q>false</q>.</p>
|
||||||
|
<pre>
|
||||||
|
<apply executable="jsmin" addsourcefile="false">
|
||||||
|
<!-- Collect the JS-files -->
|
||||||
|
<fileset dir="src" includes="*.js"/>
|
||||||
|
<redirector>
|
||||||
|
<!-- redirect STDIN; fileset collects relative to its dir, but we need -->
|
||||||
|
<!-- relative to basedir -->
|
||||||
|
<inputmapper type="glob" from="*" to="src/*"/>
|
||||||
|
<!-- redirect STDOUT to file in dest-dir -->
|
||||||
|
<outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/>
|
||||||
|
</redirector>
|
||||||
|
</apply></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,152 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Apache Ant User Manual</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="attrib">Attrib</h2>
|
||||||
|
<p><em>Since Apache Ant 1.6</em>.</p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Changes the attributes of a file or all files inside specified directories. Right now it has
|
||||||
|
effect only under Windows. Each of the 4 possible permissions has its own attribute, matching the
|
||||||
|
arguments for the attrib command.</p>
|
||||||
|
|
||||||
|
<p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s
|
||||||
|
or <a href="../Types/filelist.html">FileList</a>s can be specified using
|
||||||
|
nested <code><fileset></code>, <code><dirset></code> and <code><filelist></code>
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em>, this task supports
|
||||||
|
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<!--p>By default this task will use a single invocation of the underlying
|
||||||
|
attrib command. If you are working on a large number of files this
|
||||||
|
may result in a command line that is too long for your operating
|
||||||
|
system. If you encounter such problems, you should set the
|
||||||
|
maxparallel attribute of this task to a non-zero value. The number to
|
||||||
|
use highly depends on the length of your file names (the depth of your
|
||||||
|
directory tree), so you'll have to experiment a little.</p-->
|
||||||
|
|
||||||
|
<p>By default this task won't do anything unless it detects it is running on a Windows system. If
|
||||||
|
you know for sure that you have a <code>attrib</code> executable on your <code>PATH</code> that is
|
||||||
|
command line compatible with the Windows command, you can use the task's <var>os</var> attribute and
|
||||||
|
set its value to your current OS.</p>
|
||||||
|
|
||||||
|
<p>See the <a href="setpermissions.html">setpermissions</a> task for a platform independent
|
||||||
|
alternative.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>the file or directory of which the permissions must be changed.</td>
|
||||||
|
<td>Yes, or nested <code><fileset/list></code> elements</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>readonly</td>
|
||||||
|
<td>the readonly permission.</td>
|
||||||
|
<td rowspan="4">At least one of the four</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>archive</td>
|
||||||
|
<td class="left">the archive permission.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>system</td>
|
||||||
|
<td class="left">the system permission.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>hidden</td>
|
||||||
|
<td class="left">the hidden permission.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>file</q>, <q>dir</q> or <q>both</q>. If set to <q>file</q>, only the permissions
|
||||||
|
of plain files are going to be changed. If set to <q>dir</q>, only the directories are
|
||||||
|
considered.<br/>
|
||||||
|
<strong>Note</strong>: The type attribute does not apply to
|
||||||
|
nested <code>dirset</code>s—<code>dirset</code>s always implicitly assume type to
|
||||||
|
be <q>dir</q>.</td>
|
||||||
|
<td>No; default is <q>file</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to print a summary after execution or not.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<!--tr>
|
||||||
|
<td>parallel</td>
|
||||||
|
<td>process all specified files using a single
|
||||||
|
<kbd>chmod</kbd> command.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxparallel</td>
|
||||||
|
<td>Limit the amount of parallelism by passing at
|
||||||
|
most this many sourcefiles at once. Set it to negative integer for
|
||||||
|
unlimited. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No, defaults to unlimited</td>
|
||||||
|
</tr-->
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <a href="../Tasks/conditions.html#os"><os></a>
|
||||||
|
condition.</td>
|
||||||
|
<td>No; defaults to <q>windows</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Make the <code>run.bat</code> file read-only and hidden.</p>
|
||||||
|
<pre><attrib file="${dist}/run.bat" readonly="true" hidden="true"/></pre>
|
||||||
|
|
||||||
|
<p>Make all <samp>.xml</samp> files below <samp>${meta.inf}</samp> readable.</p>
|
||||||
|
<pre><attrib readonly="false">
|
||||||
|
<fileset dir="${meta.inf}" includes="**/*.xml"/>
|
||||||
|
</attrib></pre>
|
||||||
|
|
||||||
|
<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
|
||||||
|
named <samp>trial</samp>) read-only and archived. In addition all files belonging to a FileSet
|
||||||
|
with <var>id</var> <samp>other.shared.sources</samp> get the same attributes.</p>
|
||||||
|
<pre>
|
||||||
|
<attrib readonly="true" archive="true">
|
||||||
|
<fileset dir="shared/sources1">
|
||||||
|
<exclude name="**/trial/**"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset refid="other.shared.sources"/>
|
||||||
|
</attrib></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Augment Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>Augment</h2>
|
||||||
|
<p><em>Since Apache Ant 1.8.1</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Modify an existing reference by adding nested elements or (re-)assigning properties mapped as XML
|
||||||
|
attributes. This is an unusual task that makes use of Ant's internal processing mechanisms to reload
|
||||||
|
a previously declared reference by means of the <var>id</var> attribute, then treats the
|
||||||
|
declared <code>augment</code> element as though it were the original element.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>id</td>
|
||||||
|
<td>The <var>id</var> of the reference to augment. If no such reference has been declared
|
||||||
|
a <code>BuildException</code> is thrown.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>Additional permissible attributes are dependent on the reference to be modified.</p>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<p>Permissible nested elements are dependent on the reference to be modified.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Given</p>
|
||||||
|
|
||||||
|
<pre><fileset id="input-fs" dir="${basedir}"/></pre>
|
||||||
|
|
||||||
|
<p>invocation</p>
|
||||||
|
|
||||||
|
<pre><augment id="input-fs" excludes="foo"/></pre>
|
||||||
|
|
||||||
|
<p>modifies the <var>excludes</var> attribute of <samp>input-fs</samp>, whereas</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<augment id="input-fs">
|
||||||
|
<filename name="bar"/>
|
||||||
|
</augment></pre>
|
||||||
|
|
||||||
|
<p>adds a <code>filename</code> selector to <samp>input-fs</samp>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,154 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Available Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="available">Available</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Sets a property if a resource is available at run time. This resource can be a file, a directory,
|
||||||
|
a class in the classpath, or a JVM system resource.</p>
|
||||||
|
<p><strong>Note</strong>: a class is available in the classpath when it can be loaded; i.e., all
|
||||||
|
classes it depends on must be in the classpath, too.</p>
|
||||||
|
<p>If the resource is present, the property value is set to <q>true</q> by default; otherwise, the
|
||||||
|
property is not set. You can set the value to something other than the default by specifying
|
||||||
|
the <var>value</var> attribute.</p>
|
||||||
|
<p>Normally, this task is used to set properties that are useful to avoid target execution depending
|
||||||
|
on system parameters.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to set.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>The value to set the property to.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classname</td>
|
||||||
|
<td>The class to look for in the classpath.</td>
|
||||||
|
<td rowspan="3">Exactly one of the three</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td class="left">The file to look for.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resource</td>
|
||||||
|
<td class="left">The resource to look for in the JVM.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>The classpath to use when looking up <var>classname</var> or <var>resource</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filepath</td>
|
||||||
|
<td>The path to use when looking up <var>file</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>The classpath to use, given as a <a href="../using.html#references">reference</a> to a path
|
||||||
|
defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>The type of <var>file</var> to look for, either a directory (<var>type</var>=<q>dir</q>) or
|
||||||
|
a file (<var>type</var>=<q>file</q>). If not set, the property will be set if the name specified
|
||||||
|
in the <var>file</var> attribute exists as either a file or a directory.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoresystemclasses</td>
|
||||||
|
<td>Ignore Ant's runtime classes, using only the specified classpath. Only affects
|
||||||
|
the <var>classname</var> attribute.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>searchparents</td>
|
||||||
|
<td>This contains the behaviour of the <q>file</q> <var>type</var>. If <q>true</q>, the task
|
||||||
|
will, when searching for a file, search not only the directories specified but will also search
|
||||||
|
the parent directories of those specified. If <q>false</q>, only the directories specified will
|
||||||
|
be searched. <em>Since Ant 1.7</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>classpath</h4>
|
||||||
|
<p><code>Available</code>'s <var>classpath</var> attribute is
|
||||||
|
a <a href="../using.html#path">path-like structure</a> and can also be set via a nested
|
||||||
|
<code><classpath></code> element.</p>
|
||||||
|
<h4>filepath</h4>
|
||||||
|
<p><code>Available</code>'s <var>filepath</var> attribute is
|
||||||
|
a <a href="../using.html#path">path-like structure</a> and can also be set via a
|
||||||
|
nested <code><filepath></code> element.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Set the <code>Myclass.present</code> property to the value <q>true</q> if the
|
||||||
|
class <code>org.whatever.Myclass</code> is found in Ant's classpath.</p>
|
||||||
|
<pre><available classname="org.whatever.Myclass" property="Myclass.present"/></pre>
|
||||||
|
|
||||||
|
<p>Set the <code>jaxp.jar.present</code> property to the value <q>true</q> if the
|
||||||
|
file <samp>./lib/jaxp11/jaxp.jar</samp> is found.</p>
|
||||||
|
<pre>
|
||||||
|
<property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
|
||||||
|
<available file="${jaxp.jar}" property="jaxp.jar.present"/></pre>
|
||||||
|
|
||||||
|
<p>Set the <code>local.lib.present</code> property to the value <q>true</q> if the
|
||||||
|
directory <samp>/usr/local/lib</samp> is found.</p>
|
||||||
|
<pre>
|
||||||
|
<available file="/usr/local/lib" type="dir"
|
||||||
|
property="local.lib.present"/></pre>
|
||||||
|
|
||||||
|
<p>Set the <code>jaxp11.present</code> property to the value <q>true</q> if the
|
||||||
|
class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced
|
||||||
|
by <samp>jaxp</samp> (in this case, <samp>./lib/jaxp11/jaxp.jar</samp>).</p>
|
||||||
|
<pre>
|
||||||
|
...in project ...
|
||||||
|
<property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/>
|
||||||
|
<path id="jaxp" location="${jaxp.jar}"/>
|
||||||
|
...in target ...
|
||||||
|
<available classname="javax.xml.transform.Transformer"
|
||||||
|
classpathref="jaxp" property="jaxp11.present"/></pre>
|
||||||
|
|
||||||
|
<p>Set the <code>have.extras</code> property to the value <q>true</q> if the resource
|
||||||
|
file <samp>extratasks.properties</samp> is found.</p>
|
||||||
|
<pre>
|
||||||
|
<available property="have.extras" resource="extratasks.properties">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="/usr/local/ant/extra.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</available></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,80 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Basename Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="echo">Basename</h2>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to determine the basename of a specified file, optionally minus a specified suffix.</p>
|
||||||
|
<p>When this task executes, it will set the specified property to the value of the last path element
|
||||||
|
of the specified file. If <var>file</var> is a directory, the basename will be the last directory
|
||||||
|
element. If <var>file</var> is a full-path, relative-path, or simple filename, the basename will be
|
||||||
|
the simple file name, without any directory elements.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The path to take the basename of.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to set.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>The suffix to remove from the resulting basename (specified either with or without
|
||||||
|
the <q>.</q>).</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Set <code>jar.filename</code> to <samp>myjar.jar</samp>, if <code>lib.jarfile</code> is defined
|
||||||
|
as either a full-path filename (eg., <samp>/usr/local/lib/myjar.jar</samp>), a relative-path
|
||||||
|
filename (eg., <samp>lib/myjar.jar</samp>), or a simple filename (eg., <samp>myjar.jar</samp>).</p>
|
||||||
|
<pre><basename property="jar.filename" file="${lib.jarfile}"/></pre>
|
||||||
|
|
||||||
|
<p>Set <code>cmdname</code> to <samp>foo</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<basename property="cmdname" file="D:/usr/local/foo.exe"
|
||||||
|
suffix=".exe"/></pre>
|
||||||
|
|
||||||
|
<p>Set <code>temp.dirname</code> to the last directory element of the path defined for
|
||||||
|
the <code>TEMP</code> environment variable.</p>
|
||||||
|
<pre>
|
||||||
|
<property environment="env"/>
|
||||||
|
<basename property="temp.dirname" file="${env.TEMP}"/>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,82 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Bindtargets Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="ant">Bindtargets</h2>
|
||||||
|
<p><em>Since Apache Ant 1.8.2</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Make some target the extension of some
|
||||||
|
defined <a href="../targets.html#extension-points">extension point</a>. It will make the list of
|
||||||
|
targets dependencies of the extension point.</p>
|
||||||
|
|
||||||
|
<p>This target is useful when you want to have a target to participate in another build workflow
|
||||||
|
which explicitly exposes an extension point for that kind of insertion. Thus the target to bind and
|
||||||
|
the extension point to bind to are both declared in some imported build files. But directly
|
||||||
|
modifying the target dependency graph of these external build files may have a side effect on some
|
||||||
|
other project which imports them. This task helps to modify the target dependencies but only in your
|
||||||
|
context.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: this task is quite equivalent to the definition of an intermediate target
|
||||||
|
which will be the bridge between the target to bind and the extension point. For instance:</p>
|
||||||
|
<pre><bindtargets targets="jar,javadoc" extensionPoint="dist"/></pre>
|
||||||
|
<p>is quite equivalent to:</p>
|
||||||
|
<pre><target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist"/></pre>
|
||||||
|
<p>This task basically avoids the creation of a target.</p>
|
||||||
|
|
||||||
|
<p>The <code>bindtargets</code> task may only be used as a top-level task. This means that it may
|
||||||
|
not be used in a target. This is making the target dependency graph static and predictable as soon
|
||||||
|
as every build file is loaded.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>targets</td>
|
||||||
|
<td>a comma separated list of target names to bind.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>extensionPoint</td>
|
||||||
|
<td>the name of the extension point to bind the targets to.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>onMissingExtensionPoint</td>
|
||||||
|
<td>What to do if this target tries to extend a
|
||||||
|
missing <a href="../targets.html#extension-points">extension-point</a>: <q>fail</q>, <q>warn</q>, <q>ignore</q>.</td>
|
||||||
|
<td>No; defaults to <q>fail</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre><bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>BuildNumber Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="buildnumber">BuildNumber</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>This is a basic task that can be used to track build numbers.</p>
|
||||||
|
<p>It will first attempt to read a build number from a file (by default, <samp>build.number</samp>
|
||||||
|
in the current directory), then set the property <code>build.number</code> to the value that was
|
||||||
|
read in (or to <q>0</q>, if no such value). It will then increment the number by one and write it
|
||||||
|
back out to the file. (See the <a href="../Tasks/propertyfile.html">PropertyFile</a> task if you
|
||||||
|
need finer control over things such as the property name or the number format.)</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to read and write the build number from/to.</td>
|
||||||
|
<td>No; defaults to <q>build.number</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Read, increment, and write a build number to the default file, <samp>build.number</samp>.</p>
|
||||||
|
<pre><buildnumber/></pre>
|
||||||
|
|
||||||
|
<p>Read, increment, and write a build number to the file <samp>mybuild.number</samp>.</p>
|
||||||
|
<pre><buildnumber file="mybuild.number"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,149 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Cab Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="cab">Cab</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>The cab task creates Microsoft cabinet archive files. It is invoked similar to
|
||||||
|
the <a href="../Tasks/jar.html">jar</a> or <a href="../Tasks/zip.html">zip</a> tasks. This task
|
||||||
|
will work on Windows using the external <kbd>cabarc</kbd> tool (provided by Microsoft) which must
|
||||||
|
be located in your executable path.</p>
|
||||||
|
<p>To use this task on other platforms you need to download and compile <code>libcabinet</code>
|
||||||
|
from <a href="https://www.freshports.org/archivers/libcabinet/"
|
||||||
|
target="_top">https://www.freshports.org/archivers/libcabinet/</a>.</p>
|
||||||
|
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on
|
||||||
|
how the inclusion/exclusion of files works, and how to write patterns.</p>
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>basedir</var>) as well as
|
||||||
|
the nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
|
||||||
|
<p>On non-Unix platforms this task writes the list of files to archive
|
||||||
|
to the <a href="../running.html#tmpdir">temporary directory</a>.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cabfile</td>
|
||||||
|
<td>the name of the cab file to create.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>basedir</td>
|
||||||
|
<td>the directory to start archiving files from.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>set to <q>yes</q> if you want to see the output from the <code>cabarc</code> tool.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compress</td>
|
||||||
|
<td>set to <q>no</q> to store files without compressing.</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>options</td>
|
||||||
|
<td>set additional command-line options for the <code>cabarc</code> tool. Should not
|
||||||
|
normally be necessary.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>fileset</h4>
|
||||||
|
|
||||||
|
<p>The cab task supports one nested <a href="../Types/fileset.html"><code><fileset></code></a>
|
||||||
|
element to specify the files to be included in the archive. If this is specified,
|
||||||
|
the <var>basedir</var> attribute cannot be used.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
|
||||||
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory.</p>
|
||||||
|
<pre>
|
||||||
|
<cab cabfile="${dist}/manual.cab"
|
||||||
|
basedir="htdocs/manual"/></pre>
|
||||||
|
|
||||||
|
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
|
||||||
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Files in the
|
||||||
|
directory <samp>mydocs</samp>, or files with the name <samp>todo.html</samp> are excluded.</p>
|
||||||
|
<pre>
|
||||||
|
<cab cabfile="${dist}/manual.cab"
|
||||||
|
basedir="htdocs/manual"
|
||||||
|
excludes="mydocs/**, **/todo.html"/></pre>
|
||||||
|
|
||||||
|
<p>Cab all files in the <samp>htdocs/manual</samp> directory into a file
|
||||||
|
called <samp>manual.cab</samp> in the <samp>${dist}</samp> directory. Only <samp>.html</samp> files
|
||||||
|
under the directory <samp>api</samp> are archived, and files with the name <samp>todo.html</samp>
|
||||||
|
are excluded. Output from the <kbd>cabarc</kbd> tool is displayed in the build output.</p>
|
||||||
|
<pre>
|
||||||
|
<cab cabfile="${dist}/manual.cab"
|
||||||
|
basedir="htdocs/manual"
|
||||||
|
includes="api/**/*.html"
|
||||||
|
excludes="**/todo.html"
|
||||||
|
verbose="yes"/></pre>
|
||||||
|
|
||||||
|
<p>The following is equivalent to the example above.</p>
|
||||||
|
<pre>
|
||||||
|
<cab cabfile="${dist}/manual.cab"
|
||||||
|
verbose="yes">
|
||||||
|
<fileset
|
||||||
|
dir="htdocs/manual"
|
||||||
|
includes="api/**/*.html"
|
||||||
|
excludes="**/todo.html"/>
|
||||||
|
</cab></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,273 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Continuus Tasks</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Continuus Support</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#ccmcheckin">CCMCheckin</a></li>
|
||||||
|
<li><a href="#ccmcheckout">CCMCheckout</a></li>
|
||||||
|
<li><a href="#ccmcheckintask">CCMCheckinTask</a></li>
|
||||||
|
<li><a href="#ccmreconfigure">CCMReconfigure</a></li>
|
||||||
|
<li><a href="#ccmcreatetask">CCMCreateTask</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>These Apache Ant tasks are wrappers
|
||||||
|
around <a href="https://en.wikipedia.org/wiki/Rational_Synergy" target="_top">Continuus Source
|
||||||
|
Manager</a>. They have been tested against versions 5.1/6.2 on Windows 2000, but should work on
|
||||||
|
other platforms with <kbd>ccm</kbd> installed.</p>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmcheckin">CCMCheckin</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Check in a file to Continuus</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>Path to the file that the command will operate on</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment.</td>
|
||||||
|
<td>No; default is <q>Checkin</q> plus the date</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>task</td>
|
||||||
|
<td>Specify the task number used to check in the file (may use <q>default</q>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmdir</td>
|
||||||
|
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on
|
||||||
|
the <code>PATH</code></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Check in the file <samp>c:/wa/com/foo/MyFile.java</samp>. Text <samp>mycomment</samp> is added
|
||||||
|
as a comment. The task used is the one set as the default.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmcheckin file="c:/wa/com/foo/MyFile.java"
|
||||||
|
comment="mycomment"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmcheckout">CCMCheckout</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Run a Continuus checkout command</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>Path to the file that the command will operate on</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fileset</td>
|
||||||
|
<td class="left">fileset containing the file to be checked out</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>task</td>
|
||||||
|
<td>Specify the task number used to checkin the file (may use <q>default</q>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmdir</td>
|
||||||
|
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on
|
||||||
|
the <code>PATH</code></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Check out the file <samp>c:/wa/com/foo/MyFile.java</samp>. Comment
|
||||||
|
attribute <samp>mycomment</samp> is added as a task comment. The task used is the one set as the
|
||||||
|
default.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmcheckout file="c:/wa/com/foo/MyFile.java"
|
||||||
|
comment="mycomment"/></pre>
|
||||||
|
|
||||||
|
<p>Check out all the files in the <samp>lib</samp> directory having the <samp>.jar</samp>
|
||||||
|
extension. Comment attribute <samp>mycomment</samp> is added as a task comment The used task is the
|
||||||
|
one set as the default.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmcheckout comment="mycomment">
|
||||||
|
<fileset dir="lib" >
|
||||||
|
<include name="**/*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</ccmcheckout ></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmcheckintask">CCMCheckinTask</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Run a Continuus command to checkin default task</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>task</td>
|
||||||
|
<td>Specify the task number used to check in the file (may use <q>default</q>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmdir</td>
|
||||||
|
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on
|
||||||
|
the <code>PATH</code></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a Checkin default task on all the checked out files in the current task.</p>
|
||||||
|
<pre><ccmcheckintask comment="blahblah/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmreconfigure">CCMReconfigure</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Run a Continuus reconfigure/update command</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>recurse</td>
|
||||||
|
<td>recurse on subproject</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>do a verbose reconfigure operation</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmproject</td>
|
||||||
|
<td>Specifies the ccm project on which the operation is applied.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmdir</td>
|
||||||
|
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on
|
||||||
|
the <code>PATH</code></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a Continuus <code>reconfigure</code> on the project <samp>ANTCCM_TEST#BMO_1</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmreconfigure ccmproject="ANTCCM_TEST#BMO_1"
|
||||||
|
verbose="true"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmcreatetask">CCMCreateTask</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Create a Continuus task.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>platform</td>
|
||||||
|
<td>Specify the target platform</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ccmdir</td>
|
||||||
|
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on
|
||||||
|
the <code>PATH</code></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resolver</td>
|
||||||
|
<td>Specify the resolver</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>release</td>
|
||||||
|
<td>Specify the CCM release</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>subsystem</td>
|
||||||
|
<td>Specify the subsystem</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>task</td>
|
||||||
|
<td>Specify the task number used to checkin the file (may use <q>default</q>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Create a task for the release <samp>ANTCCM_TEST</samp> with the current user as the resolver for
|
||||||
|
this task.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmcreatetask resolver="${user.name}"
|
||||||
|
release="ANTCCM_TEST" comment="blahblah"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,264 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>ChangeLog Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="changelog">CvsChangeLog</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates an XML-formatted report file of the change logs recorded in
|
||||||
|
a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p>
|
||||||
|
<p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get
|
||||||
|
an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to
|
||||||
|
execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working.
|
||||||
|
Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix
|
||||||
|
version, this is not completely true for certain other CVS clients—like CVSNT for
|
||||||
|
example—and some operation may fail when using such an incompatible client.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="left">Attributes from parent <code><cvs></code> task which are
|
||||||
|
meaningful here<br/><em>Since Apache Ant 1.6.1</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRoot</td>
|
||||||
|
<td>the <code>CVSROOT</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRsh</td>
|
||||||
|
<td>the <code>CVS_RSH</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>package</td>
|
||||||
|
<td>the package/module to check out. <strong>Note</strong>: multiple attributes can be split
|
||||||
|
using spaces. Use a nested <code><module></code> element if you want to specify a
|
||||||
|
module with spaces in its name.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>Port used by CVS to communicate with the server.</td>
|
||||||
|
<td>No; defaults to <q>2401</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passfile</td>
|
||||||
|
<td>Password file to read passwords from.</td>
|
||||||
|
<td>No; defaults to <q>~/.cvspass</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tag</td>
|
||||||
|
<td>query the changelog for a specific branch.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="left">Specific attributes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>The directory from which to run the <kbd>cvs log</kbd> command.</td>
|
||||||
|
<td>No; defaults to <q>${basedir}</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The file in which to write the change log report.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>usersfile</td>
|
||||||
|
<td>Property file that contains name-value pairs mapping user IDs and names that should be used
|
||||||
|
in the report in place of the user ID.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>daysinpast</td>
|
||||||
|
<td>Sets the number of days into the past for which the change log information should be
|
||||||
|
retrieved.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>start</td>
|
||||||
|
<td>The earliest date from which change logs are to be included in the report.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>end</td>
|
||||||
|
<td>The latest date to which change logs are to be included in the report.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>remote</td>
|
||||||
|
<td>If set to true, works against the repository (using <kbd>cvs rlog</kbd>) without a working
|
||||||
|
copy. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>startTag</td>
|
||||||
|
<td>The start of a tag range. If <var>endTag</var> is also specified, they must both be on the
|
||||||
|
same branch. If <var>endTag</var> is not specified, the end of the range will be the latest on
|
||||||
|
the same branch on which <var>startTag</var> lives. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>endTag</td>
|
||||||
|
<td>The end of a tag range. If <var>startTag</var> is also specified, they must both be on the
|
||||||
|
same branch. If <var>startTag</var> is not specified, the start of the range will be the top
|
||||||
|
of the branch on which <var>endTag</var> lives. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4 id="user">user</h4>
|
||||||
|
<p>The nested <code><user></code> element allows you to specify a mapping between a user ID as
|
||||||
|
it appears on the CVS server and a name to include in the formatted report. Anytime the specified
|
||||||
|
user ID has made a change in the repository, the <code><author></code> tag in the report file
|
||||||
|
will include the name specified in <var>displayname</var> rather than the user ID.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>displayname</td>
|
||||||
|
<td>The name to be used in the CVS change log report.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>userid</td>
|
||||||
|
<td>The user ID of the person as it exists on the CVS server.
|
||||||
|
</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>module</h4>
|
||||||
|
|
||||||
|
<p>Specifies a package/module to work on, unlike the package attribute modules specified using this
|
||||||
|
attribute can contain spaces in their name.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The module's/package's name.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Generate a change log report for all the changes that have been made under
|
||||||
|
the <samp>dve/network</samp> directory. Write these changes into the
|
||||||
|
file <samp>changelog.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="dve/network"
|
||||||
|
destfile="changelog.xml"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a change log report for any changes that were made under the <samp>dve/network</samp>
|
||||||
|
directory in the past 10 days. Write these changes into the file <samp>changelog.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="dve/network"
|
||||||
|
destfile="changelog.xml"
|
||||||
|
daysinpast="10"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a change log report for any changes that were made between February 20, 2002 and March
|
||||||
|
20, 2002 under the <samp>dve/network</samp> directory. Write these changes into the
|
||||||
|
file <samp>changelog.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="dve/network"
|
||||||
|
destfile="changelog.xml"
|
||||||
|
start="20 Feb 2002"
|
||||||
|
end="20 Mar 2002"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a change log report for any changes that were made after February 20, 2002 under
|
||||||
|
the <samp>dve/network</samp> directory. Write these changes into the
|
||||||
|
file <samp>changelog.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="dve/network"
|
||||||
|
destfile="changelog.xml"
|
||||||
|
start="20 Feb 2002"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a change log report for all the changes that were made under
|
||||||
|
the <code>dve/network</code> directory, substituting the name <samp>Peter Donald</samp> in
|
||||||
|
the <code><author></code> tags anytime a change made by the user ID <samp>donaldp</samp> is
|
||||||
|
encountered. Write these changes into the file <samp>changelog.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="dve/network"
|
||||||
|
destfile="changelog.xml">
|
||||||
|
<user displayname="Peter Donald" userid="donaldp"/>
|
||||||
|
</cvschangelog></pre>
|
||||||
|
|
||||||
|
<p>Generate a change log report on the <code>ANT_16_BRANCH</code>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvschangelog dir="c:/dev/asf/ant.head" passfile="c:/home/myself/.cvspass"
|
||||||
|
destfile="changelogant.xml" tag="ANT_16_BRANCH"/></pre>
|
||||||
|
<h4>Generate Report</h4>
|
||||||
|
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the XML
|
||||||
|
output. The following example illustrates how to generate a HTML report from the XML report.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<style in="changelog.xml"
|
||||||
|
out="changelog.html"
|
||||||
|
style="${ant.home}/etc/changelog.xsl">
|
||||||
|
<param name="title" expression="Ant ChangeLog"/>
|
||||||
|
<param name="module" expression="ant"/>
|
||||||
|
<param name="cvsweb" expression="https://cvs.apache.org/viewcvs/"/>
|
||||||
|
</style></pre>
|
||||||
|
|
||||||
|
<h4>Sample Output</h4>
|
||||||
|
<pre>
|
||||||
|
<changelog>
|
||||||
|
<entry>
|
||||||
|
<date>2002-03-06</date>
|
||||||
|
<time>12:00</time>
|
||||||
|
<author>Peter Donald</author>
|
||||||
|
<file>
|
||||||
|
<name>org/apache/myrmidon/build/AntlibDescriptorTask.java</name>
|
||||||
|
<revision>1.3</revision>
|
||||||
|
<prevrevision>1.2</prevrevision>
|
||||||
|
</file>
|
||||||
|
<msg><![CDATA[Use URLs directly rather than go via a File.
|
||||||
|
|
||||||
|
This allows templates to be stored inside jar]]></msg>
|
||||||
|
</entry>
|
||||||
|
</changelog></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,238 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Checksum Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="checksum">Checksum</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates checksum for files. This task can also be used to perform checksum verifications.</p>
|
||||||
|
|
||||||
|
<p>Note that many popular message digest functions—including MD5 and SHA-1—have been
|
||||||
|
broken recently. If you are going to use the task to create checksums used in an environment where
|
||||||
|
security is important, please take some time to investigate the algorithms offered by your JCE
|
||||||
|
provider. Note also that some JCE providers like the one by <a href="https://www.bouncycastle.org/"
|
||||||
|
target="_top">The Legion of the Bouncy Castle</a>,
|
||||||
|
the <a href="https://www.gnu.org/software/gnu-crypto/" target="_top">GNU Crypto project</a>
|
||||||
|
or <a href="https://jce.iaik.tugraz.at/sic/Products" target="_top">the Technical University Graz</a>
|
||||||
|
offer more digest algorithms than those built-in into your JDK.</p>
|
||||||
|
|
||||||
|
<p>Warning: the case of the extension is that of the algorithm used. If you ask
|
||||||
|
for <samp>SHA1</samp>, you get a <samp>.SHA1</samp> extension; if you ask for <samp>sha1</samp>, you
|
||||||
|
get a file ending in <samp>.sha1</samp>. The Java Crypto Engines are case-insensitive in matching
|
||||||
|
algorithms, so choose a name to match your desired output extension, or set the <var>fileext</var>
|
||||||
|
attribute. The names of common hashing algorithms can be located on
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest"
|
||||||
|
target="_top">Cryptography Architecture Standard Algorithm Name Documentation</a></p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to generate checksum for.</td>
|
||||||
|
<td>Yes, unless at least one nested (filesystem-only) resource collection is specified.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>todir</td>
|
||||||
|
<td>The root directory where checksums should be written.</td>
|
||||||
|
<td>No; by default, checksum files will be written to the same directory as the original
|
||||||
|
files. <em>since Apache Ant 1.6</em>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>algorithm</td>
|
||||||
|
<td>Specifies the algorithm to be used to compute the checksum. Please check
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest"
|
||||||
|
target="_top">documentation</a> for available algorithm names, like <q>SHA-1</q>
|
||||||
|
or <q>SHA-512</q>.
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>MD5</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>provider</td>
|
||||||
|
<td>Specifies the provider of the algorithm.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fileext</td>
|
||||||
|
<td>The generated checksum file's name will be the original filename with the <var>fileext</var>
|
||||||
|
added to it.
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to a <q>.</q> and the algorithm name being used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>This attribute can mean two different things, it depends on the presence of
|
||||||
|
the <var>verifyproperty</var> attribute.<br/><strong>If you don't set</strong>
|
||||||
|
the <var>verifyproperty</var> attribute, property specifies the name of the property to be set
|
||||||
|
with the generated checksum value.<br/><strong>If you set</strong>
|
||||||
|
the <var>verifyproperty</var> attribute, property specifies the checksum you expect to be
|
||||||
|
generated (the checksum itself, not a name of a property containing the checksum).<br/> This
|
||||||
|
cannot be specified when <var>fileext</var> is being used or when the number of files for
|
||||||
|
which checksums are to be generated is greater than 1.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pattern</td>
|
||||||
|
<td>Specifies the pattern to use as a pattern suitable
|
||||||
|
for <a href="https://docs.oracle.com/javase/8/docs/api/java/text/MessageFormat.html"
|
||||||
|
target="_top">MessageFormat</a> where <code>{0}</code> is replaced with the checksum
|
||||||
|
and <code>{1}</code> with the file name. <em>Since Ant 1.7.0</em><br/><em>Since Ant
|
||||||
|
1.8.2</em> <code>{2}</code> is replaced by the path of the file relative to the checksum file
|
||||||
|
being written, <code>{3}</code> with the path of the file relative to the
|
||||||
|
project's <var>basedir</var> and <code>{4}</code> with the absolute path of the file.</td>
|
||||||
|
<td>No; default is <q>{0}</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>format</td>
|
||||||
|
<td>Specifies the pattern to use as one of a well-known format. Supported values are
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">name</th>
|
||||||
|
<th scope="col">pattern</th>
|
||||||
|
<th scope="col">description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>CHECKSUM</td>
|
||||||
|
<td><code>{0}</code></td>
|
||||||
|
<td>only the checksum itself</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>MD5SUM</td>
|
||||||
|
<td><code>{0} *{1}</code></td>
|
||||||
|
<td>the format of GNU textutils <code>md5sum</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>SVF</td>
|
||||||
|
<td><code>MD5 ({1}) = {0}</code></td>
|
||||||
|
<td>the format of BSD <code>md5</code> command</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<em>Since Ant 1.7.0</em></td>
|
||||||
|
<td>No; default is <q>CHECKSUM</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>totalproperty</td>
|
||||||
|
<td>If specified, this attribute specifies the name of the property that will hold a checksum of
|
||||||
|
all the checksums and file paths. The individual checksums and the relative paths to the files
|
||||||
|
within the resource collections in which they are defined will be used to compute this
|
||||||
|
checksum. (The file separators in the paths will be converted to <q>/</q> before computation
|
||||||
|
to ensure platform portability). <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forceoverwrite</td>
|
||||||
|
<td>Overwrite existing files even if the destination files are newer.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verifyproperty</td>
|
||||||
|
<td>Specifies the name of the property to be set with <q>true</q> or <q>false</q> depending upon
|
||||||
|
whether the generated checksum matches the existing checksum. When this is set, the generated
|
||||||
|
checksum is not written to a file or property, but rather, the content of the file or property
|
||||||
|
is used to check against the generated checksum.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>readbuffersize</td>
|
||||||
|
<td>The size of the buffer (in bytes) to use when reading a file.</td>
|
||||||
|
<td>No; defaults to <q>8192</q>—you may get a better performance on big files if you
|
||||||
|
increase this value</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>resource collections</h4>
|
||||||
|
<p><a href="../Types/resources.html#collection">Resource collections</a> are used to select files
|
||||||
|
for which checksums should be generated.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p><strong>Example 1</strong></p>
|
||||||
|
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store the checksum in the destination
|
||||||
|
file <samp>foo.bar.MD5</samp>. <samp>foo.bar.MD5</samp> is overwritten only if <samp>foo.bar</samp>
|
||||||
|
is newer than itself.</p>
|
||||||
|
<pre><checksum file="foo.bar"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 2</strong></p>
|
||||||
|
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store the checksum
|
||||||
|
in <samp>foo.bar.MD5</samp>. If <samp>foo.bar.MD5</samp> already exists, it is overwritten.</p>
|
||||||
|
<pre><checksum file="foo.bar" forceOverwrite="yes"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 3</strong></p>
|
||||||
|
<p>Generate a MD5 checksum for <samp>foo.bar</samp> and store it in the project
|
||||||
|
property <code>foobarMD5</code>.</p>
|
||||||
|
<pre><checksum file="foo.bar" property="foobarMD5"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 4</strong></p>
|
||||||
|
<p>Generate a MD5 checksum for <samp>foo.bar</samp>, compare it against <samp>foo.bar.MD5</samp> and
|
||||||
|
set <code>isMD5ok</code> to either <q>true</q> or <q>false</q>, depending upon the result.</p>
|
||||||
|
<pre><checksum file="foo.bar" verifyProperty="isMD5ok"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 5</strong></p>
|
||||||
|
<p>Generate a SHA-512 checksum for <samp>foo.bar</samp> and store the checksum in the destination
|
||||||
|
file <samp>foo.bar.asc</samp>. <samp>foo.bar.asc</samp> is overwritten only if <samp>foo.bar</samp>
|
||||||
|
is newer than itself.</p>
|
||||||
|
<pre><checksum file="foo.bar" algorithm="SHA-512" fileext="asc"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 6</strong></p>
|
||||||
|
<p>Generate a MD5 checksum for <samp>foo.bar</samp>, compare it against the value of the
|
||||||
|
property <code>md5</code>, and set <code>isEqual</code> to either <q>true</q> or <q>false</q>,
|
||||||
|
depending upon the result.</p>
|
||||||
|
<pre><checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 7</strong></p>
|
||||||
|
<p>Just like Example 1, but generates a <samp>.MD5</samp> file for every file that begins with the
|
||||||
|
name <samp>foo</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<checksum>
|
||||||
|
<fileset dir=".">
|
||||||
|
<include name="foo*"/>
|
||||||
|
</fileset>
|
||||||
|
</checksum></pre>
|
||||||
|
|
||||||
|
<p><strong>Example 8</strong></p>
|
||||||
|
<p>Just like Example 4, but only sets <code>isChecksumEqual</code> to <q>true</q>, if the checksum
|
||||||
|
matches—it will never be set to <q>false</q>. This example demonstrates use with
|
||||||
|
the <code>condition</code> task.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="isChecksumEqual">
|
||||||
|
<checksum>
|
||||||
|
<fileset dir=".">
|
||||||
|
<include name="foo.bar"/>
|
||||||
|
</fileset>
|
||||||
|
</checksum>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
<h3>Note</h3>
|
||||||
|
<p>When working with more than one file, if condition and/or <var>verifyproperty</var> is used, the
|
||||||
|
result will be true only if the checksums matched correctly for all files being considered.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,153 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Chgrp Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="chgrp">Chgrp</h2>
|
||||||
|
<p><em>Since Apache Ant 1.6</em>.</p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Changes the group of a file or all files inside specified directories. Right now it has effect
|
||||||
|
only under Unix. The group attribute is equivalent to the corresponding argument for
|
||||||
|
the <kbd>chgrp</kbd> command.</p>
|
||||||
|
|
||||||
|
<p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s
|
||||||
|
or <a href="../Types/filelist.html">FileList</a>s can be specified using
|
||||||
|
nested <code><fileset></code>, <code><dirset></code> and <code><filelist></code>
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em>, this task supports
|
||||||
|
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p>By default this task will use a single invocation of the underlying <kbd>chgrp</kbd> command.
|
||||||
|
If you are working on a large number of files this may result in a command line that is too long for
|
||||||
|
your operating system. If you encounter such problems, you should set the <var>maxparallel</var>
|
||||||
|
attribute of this task to a non-zero value. The number to use highly depends on the length of your
|
||||||
|
file names (the depth of your directory tree) and your operating system, so you'll have to
|
||||||
|
experiment a little. POSIX recommends command line length limits of at least 4096 characters, this
|
||||||
|
may give you an approximation for the number you could use as initial value for these
|
||||||
|
experiments.</p>
|
||||||
|
|
||||||
|
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you
|
||||||
|
know for sure that you have a <kbd>chgrp</kbd> executable on your <code>PATH</code> that is
|
||||||
|
command line compatible with the Unix command, you can use the task's <var>os</var> attribute and
|
||||||
|
set its value to your current OS.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>the file or directory of which the group must be changed.</td>
|
||||||
|
<td>Yes, unless nested <code><fileset|filelist|dirset></code> elements are specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>group</td>
|
||||||
|
<td>the new group.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>parallel</td>
|
||||||
|
<td>process all specified files using a single <kbd>chgrp</kbd> command.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>file</q>, <q>dir</q> or <q>both</q>. If set to <q>file</q>, only the group of
|
||||||
|
plain files are going to be changed. If set to <q>dir</q>, only the directories are
|
||||||
|
considered.<br/><strong>Note</strong>: The type attribute does not apply to
|
||||||
|
nested <code>dirset</code>s—<code>dirset</code>s always implicitly assume type to
|
||||||
|
be <q>dir</q>.</td>
|
||||||
|
<td>No; default is <q>file</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxparallel</td>
|
||||||
|
<td>Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to
|
||||||
|
negative integer for unlimited.</td>
|
||||||
|
<td>No; defaults to unlimited</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to print a summary after execution or not.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <a href="../Tasks/conditions.html#os"><os></a>
|
||||||
|
condition.</td>
|
||||||
|
<td>No; defaults to <q>unix</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Make the <samp>start.sh</samp> file belong to the <samp>coders</samp> group on a UNIX system.</p>
|
||||||
|
<pre><chgrp file="${dist}/start.sh" group="coders"/></pre>
|
||||||
|
|
||||||
|
<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to the <samp>coders</samp>
|
||||||
|
group on a UNIX system.</p>
|
||||||
|
<pre>
|
||||||
|
<chgrp group="coders">
|
||||||
|
<fileset dir="${dist}/bin" includes="**/*.sh"/>
|
||||||
|
</chgrp></pre>
|
||||||
|
|
||||||
|
<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
|
||||||
|
named <samp>trial</samp>) belong to the <samp>coders</samp> group on a UNIX system. In addition, all
|
||||||
|
files belonging to a FileSet with <var>id</var>=<samp>other.shared.sources</samp> get the same
|
||||||
|
group.</p>
|
||||||
|
<pre>
|
||||||
|
<chgrp group="coders">
|
||||||
|
<fileset dir="shared/sources1">
|
||||||
|
<exclude name="**/trial/**"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset refid="other.shared.sources"/>
|
||||||
|
</chgrp>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Make all <samp>.test.jsp</samp>, and <samp>.new</samp> files belong to
|
||||||
|
group <samp>webdev</samp>. Directories with names beginning with <samp>test_</samp> also will belong
|
||||||
|
to <samp>webdev</samp>, but if there is a directory name that ends in <samp>.new</samp> or a file
|
||||||
|
name that begins with <samp>test_</samp> it will be unaffected.</p>
|
||||||
|
<pre>
|
||||||
|
<chgrp group="webdev" type="file">
|
||||||
|
<fileset dir="/web">
|
||||||
|
<include name="**/*.test.jsp"/>
|
||||||
|
<include name="**/*.new"/>
|
||||||
|
</fileset>
|
||||||
|
<dirset dir="/web">
|
||||||
|
<include name="**/test_*"/>
|
||||||
|
</dirset>
|
||||||
|
</chmod></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,189 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Chmod Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="chmod">Chmod</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Changes the permissions of a file or all files inside specified directories. Right now it has
|
||||||
|
effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the
|
||||||
|
argument for the <kbd>chmod</kbd> command.</p>
|
||||||
|
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on
|
||||||
|
how the inclusion/exclusion of files works, and how to write patterns.</p>
|
||||||
|
|
||||||
|
<p>This task holds an implicit <a href="../Types/fileset.html">FileSet</a> and supports all of
|
||||||
|
FileSet's attributes and nested elements directly. More sets can be specified using
|
||||||
|
nested <code><fileset></code> or <code><dirset></code> (<em>since Apache Ant 1.6</em>)
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>, this task also supports
|
||||||
|
nested <a href="../Types/filelist.html">filelist</a>s.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em>, this task supports
|
||||||
|
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p>By default this task will use a single invocation of the underlying <kbd>chmod</kbd> command.
|
||||||
|
If you are working on a large number of files this may result in a command line that is too long for
|
||||||
|
your operating system. If you encounter such problems, you should set the <var>maxparallel</var>
|
||||||
|
attribute of this task to a non-zero value. The number to use highly depends on the length of your
|
||||||
|
file names (the depth of your directory tree) and your operating system, so you'll have to
|
||||||
|
experiment a little. POSIX recommends command line length limits of at least 4096 characters, this
|
||||||
|
may give you an approximation for the number you could use as initial value for these
|
||||||
|
experiments.</p>
|
||||||
|
|
||||||
|
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you
|
||||||
|
know for sure that you have a <kbd>chmod</kbd> executable on your <code>PATH</code> that is
|
||||||
|
command line compatible with the Unix command, you can use the task's <var>os</var> attribute and
|
||||||
|
set its value to your current OS.</p>
|
||||||
|
|
||||||
|
<p>See the <a href="setpermissions.html">setpermissions</a> task for a platform independent
|
||||||
|
alternative.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>the file or single directory of which the permissions must be changed.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two, unless
|
||||||
|
nested <code><fileset|filelist|dirset></code> elements are specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td class="left">the directory which holds the files whose permissions must be
|
||||||
|
changed.<br/><strong>Note</strong>: for backwards compatibility reasons <code><chmod
|
||||||
|
dir="some-dir"/></code> will only change the permissions on <samp>some-dir</samp> but not
|
||||||
|
recurse into it, unless you also specify any patterns.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>perm</td>
|
||||||
|
<td>the new permissions.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>parallel</td>
|
||||||
|
<td>process all specified files using a single <kbd>chmod</kbd> command.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>file</q>, <q>dir</q> or <q>both</q>. If set to <q>file</q>, only the permissions
|
||||||
|
of plain files are going to be changed. If set to <q>dir</q>, only the directories are
|
||||||
|
considered.<br/><strong>Note</strong>: The type attribute does not apply to
|
||||||
|
nested <code>dirset</code>s—<code>dirset</code>s always implicitly assume type to
|
||||||
|
be <q>dir</q>.</td>
|
||||||
|
<td>No; default is <q>file</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxparallel</td>
|
||||||
|
<td>Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to
|
||||||
|
negative integer for unlimited. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to unlimited</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to print a summary after execution or not. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <a href="conditions.html#os"><os></a> condition.</td>
|
||||||
|
<td>No; defaults to <q>unix</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Make the <samp>start.sh</samp> file readable and executable for anyone on a UNIX system.</p>
|
||||||
|
<pre><chmod file="${dist}/start.sh" perm="ugo+rx"/></pre>
|
||||||
|
|
||||||
|
<p>Make the <samp>start.sh</samp> file readable, writable and executable only for the owner on a
|
||||||
|
UNIX system.</p>
|
||||||
|
<pre><chmod file="${dist}/start.sh" perm="700"/></pre>
|
||||||
|
|
||||||
|
<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> readable and executable for anyone
|
||||||
|
on a UNIX system.</p>
|
||||||
|
<pre>
|
||||||
|
<chmod dir="${dist}/bin" perm="ugo+rx"
|
||||||
|
includes="**/*.sh"/></pre>
|
||||||
|
|
||||||
|
<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
|
||||||
|
named <samp>trial</samp>) writable for members of the same group on a UNIX system. In addition, all
|
||||||
|
files belonging to a FileSet with <var>id</var> <samp>other.shared.sources</samp> get the same
|
||||||
|
permissions.</p>
|
||||||
|
<pre>
|
||||||
|
<chmod perm="g+w">
|
||||||
|
<fileset dir="shared/sources1">
|
||||||
|
<exclude name="**/trial/**"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset refid="other.shared.sources"/>
|
||||||
|
</chmod></pre>
|
||||||
|
|
||||||
|
<p>Keep non-owners from touching <code>cgi</code> scripts, files with a <samp>.old</samp> extension
|
||||||
|
or directories beginning with <samp>private_</samp>. A directory ending in <samp>.old</samp> or a
|
||||||
|
file beginning with <samp>private_</samp> would remain unaffected.</p>
|
||||||
|
<pre>
|
||||||
|
<chmod perm="go-rwx" type="file">
|
||||||
|
<fileset dir="/web">
|
||||||
|
<include name="**/*.cgi"/>
|
||||||
|
<include name="**/*.old"/>
|
||||||
|
</fileset>
|
||||||
|
<dirset dir="/web">
|
||||||
|
<include name="**/private_*"/>
|
||||||
|
</dirset>
|
||||||
|
</chmod></pre>
|
||||||
|
|
||||||
|
<h3>Note on <var>maxparallel</var> attribute</h3>
|
||||||
|
<p>Some shells have a limit of the number of characters that a command line may contain. This
|
||||||
|
maximum limit varies from shell to shell and from operating system to operating system. If one has
|
||||||
|
a large number of files to change mode on, consider using the <var>maxparallel</var> attribute. For
|
||||||
|
example when using AIX and the limit is reached, the system responds with a warning: <code>"Warning:
|
||||||
|
UNIXProcess.forkAndExec native error: The parameter or environment lists are too long"</code>. A
|
||||||
|
value of about 300 seems to result in a command line that is acceptable.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,151 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Chown Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="chown">Chown</h2>
|
||||||
|
<p><em>Since Apache Ant 1.6</em>.</p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Changes the owner of a file or all files inside specified directories. Right now it has effect
|
||||||
|
only under Unix. The owner attribute is equivalent to the corresponding argument for
|
||||||
|
the <kbd>chown</kbd> command.</p>
|
||||||
|
|
||||||
|
<p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s
|
||||||
|
or <a href="../Types/filelist.html">FileList</a>s can be specified using
|
||||||
|
nested <code><fileset></code>, <code><dirset></code> and <code><filelist></code>
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em>, this task supports
|
||||||
|
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<p>By default this task will use a single invocation of the underlying <kbd>chown</kbd> command.
|
||||||
|
If you are working on a large number of files this may result in a command line that is too long for
|
||||||
|
your operating system. If you encounter such problems, you should set the <var>maxparallel</var>
|
||||||
|
attribute of this task to a non-zero value. The number to use highly depends on the length of your
|
||||||
|
file names (the depth of your directory tree) and your operating system, so you'll have to
|
||||||
|
experiment a little. POSIX recommends command line length limits of at least 4096 characters, this
|
||||||
|
may give you an approximation for the number you could use as initial value for these
|
||||||
|
experiments.</p>
|
||||||
|
|
||||||
|
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you
|
||||||
|
know for sure that you have a <kbd>chown</kbd> executable on your <code>PATH</code> that is command
|
||||||
|
line compatible with the Unix command, you can use the task's <var>os</var> attribute and set its
|
||||||
|
value to your current OS.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>the file or directory of which the owner must be
|
||||||
|
changed.</td>
|
||||||
|
<td>Yes, unless nested <code><fileset|filelist|dirset></code> elements are specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>owner</td>
|
||||||
|
<td>the new owner.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>parallel</td>
|
||||||
|
<td>process all specified files using a single <kbd>chown</kbd> command.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>file</q>, <q>dir</q> or <q>both</q>. If set to <q>file</q>, only the owner of
|
||||||
|
plain files are going to be changed. If set to <q>dir</q>, only the directories are
|
||||||
|
considered.<br/><strong>Note</strong>: The <var>type</var> attribute does not apply to
|
||||||
|
nested <code>dirset</code>s—<code>dirset</code>s always implicitly assume type to
|
||||||
|
be <q>dir</q>.</td>
|
||||||
|
<td>No; default is <q>file</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxparallel</td>
|
||||||
|
<td>Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to
|
||||||
|
negative integer for unlimited.</td>
|
||||||
|
<td>No; defaults to unlimited</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to print a summary after execution or not.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <a href="../Tasks/conditions.html#os"><os></a>
|
||||||
|
condition.</td>
|
||||||
|
<td>No; defaults to <q>unix</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Make the <samp>start.sh</samp> file belong to <samp>coderjoe</samp> on a UNIX system.</p>
|
||||||
|
<pre><chown file="${dist}/start.sh" owner="coderjoe"/></pre>
|
||||||
|
|
||||||
|
<p>Make all <samp>.sh</samp> files below <samp>${dist}/bin</samp> belong to <samp>coderjoe</samp> on
|
||||||
|
a UNIX system.</p>
|
||||||
|
<pre>
|
||||||
|
<chown owner="coderjoe">
|
||||||
|
<fileset dir="${dist}/bin" includes="**/*.sh"/>
|
||||||
|
</chown></pre>
|
||||||
|
|
||||||
|
<p>Make all files below <samp>shared/sources1</samp> (except those below any directory
|
||||||
|
named <samp>trial</samp>) belong to <samp>coderjoe</samp> on a UNIX system. In addition, all files
|
||||||
|
belonging to a FileSet with <var>id</var>=<code>other.shared.sources</code> get the same owner.</p>
|
||||||
|
<pre>
|
||||||
|
<chown owner="coderjoe">
|
||||||
|
<fileset dir="shared/sources1">
|
||||||
|
<exclude name="**/trial/**"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset refid="other.shared.sources"/>
|
||||||
|
</chown></pre>
|
||||||
|
|
||||||
|
<p>Make <samp>cgi</samp> scripts, files with a <samp>.old</samp> extension or directories beginning
|
||||||
|
with <samp>private_</samp> belong to the user named <samp>webadmin</samp>. A directory ending
|
||||||
|
in <samp>.old</samp> or a file beginning with <samp>private_</samp> would remain unaffected.</p>
|
||||||
|
<pre>
|
||||||
|
<chown owner="webadmin" type="file">
|
||||||
|
<fileset dir="/web">
|
||||||
|
<include name="**/*.cgi"/>
|
||||||
|
<include name="**/*.old"/>
|
||||||
|
</fileset>
|
||||||
|
<dirset dir="/web">
|
||||||
|
<include name="**/private_*"/>
|
||||||
|
</dirset>
|
||||||
|
</chmod></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,905 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>ClearCase Tasks</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Apache Ant ClearCase Tasks</h1>
|
||||||
|
<p>by:<br/>
|
||||||
|
Curtis White (cwhite at aracnet dot com),<br/>
|
||||||
|
Sean P. Kane (spkane at genomatica dot com),<br/>
|
||||||
|
Rob Anderson (Anderson.Rob at vectorscm dot com), and<br/>
|
||||||
|
Sean Egan (sean at cm-logic dot com)</p>
|
||||||
|
|
||||||
|
<p>Version 1.6—02/25/2003</p>
|
||||||
|
|
||||||
|
<h1>ClearCase Support</h1>
|
||||||
|
<h2>Table of Contents</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#introduction">Introduction</a>
|
||||||
|
<li><a href="#cccheckin">CCCheckin</a>
|
||||||
|
<li><a href="#cccheckout">CCCheckout</a>
|
||||||
|
<li><a href="#ccuncheckout">CCUnCheckout</a>
|
||||||
|
<li><a href="#ccupdate">CCUpdate</a>
|
||||||
|
<li><a href="#ccmklbtype">CCMklbtype</a>
|
||||||
|
<li><a href="#ccmklabel">CCMklabel</a>
|
||||||
|
<li><a href="#ccrmtype">CCRmtype</a>
|
||||||
|
<li><a href="#cclock">CCLock</a>
|
||||||
|
<li><a href="#ccunlock">CCUnlock</a>
|
||||||
|
<li><a href="#ccmkbl">CCMkbl</a>
|
||||||
|
<li><a href="#ccmkattr">CCMkattr</a>
|
||||||
|
<li><a href="#ccmkdir">CCMkdir</a>
|
||||||
|
<li><a href="#ccmkelem">CCMkelem</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<h2 id="introduction">Introduction</h2>
|
||||||
|
<p>Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to
|
||||||
|
various ClearCase commands using the <kbd>cleartool</kbd> program. The current tasks available for
|
||||||
|
Ant correspond to only a few of the significant ClearCase commands.</p>
|
||||||
|
|
||||||
|
<p>More tasks can be easily added by deriving from the ClearCase class and then adding functionality
|
||||||
|
that is specific to that ClearCase command.</p>
|
||||||
|
<p>Important: these tasks all require <kbd>cleartool</kbd> on the command line. If a task fails
|
||||||
|
with an <code>IOException</code>, especially <code>error=2</code> on Windows, this is your
|
||||||
|
problem.</p>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="cccheckin">CCCheckin</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool checkin</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nowarn</td>
|
||||||
|
<td>Suppress warning messages</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservetime</td>
|
||||||
|
<td>Preserve the modification time</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keepcopy</td>
|
||||||
|
<td>Keeps a copy of the file with a <samp>.keep</samp> extension</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>identical</td>
|
||||||
|
<td>Allows the file to be checked in even if it is identical to the original</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>checkin</code> on the file <samp>c:/views/viewdir/afile</samp>. Comment
|
||||||
|
text from the file <samp>acomment.txt</samp> is added to ClearCase as a comment. All warning
|
||||||
|
messages are suppressed. The file is checked in even if it is <em>identical</em> to the
|
||||||
|
original.</p>
|
||||||
|
<pre>
|
||||||
|
<cccheckin viewpath="c:/views/viewdir/afile"
|
||||||
|
commentfile="acomment.txt"
|
||||||
|
nowarn="true"
|
||||||
|
identical="true"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="cccheckout">CCCheckout</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool checkout</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>reserved</td>
|
||||||
|
<td>Specifies whether to check out the file as reserved or not</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>out</td>
|
||||||
|
<td>Creates a writable file under a different filename</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nodata</td>
|
||||||
|
<td>Checks out the file but does not create an editable file containing its data</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>branch</td>
|
||||||
|
<td>Specify a branch to check out the file to</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>Allows checkout of a version other than <code>/main/LATEST</code> (or whatever is selected
|
||||||
|
by a config spec)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nowarn</td>
|
||||||
|
<td>Suppress warning messages</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>notco</td>
|
||||||
|
<td>Fail if it's already checked out to the current view. Set to <q>false</q> to ignore
|
||||||
|
it.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>checkout</code> on the file <samp>c:/views/viewdir/afile</samp>. It is
|
||||||
|
checked out as <em>reserved</em> on branch called <samp>abranch</samp>. All warning messages are
|
||||||
|
suppressed. A "<samp>Some comment text</samp>" is added to ClearCase as a comment.</p>
|
||||||
|
<pre>
|
||||||
|
<cccheckout viewpath="c:/views/viewdir/afile"
|
||||||
|
reserved="true"
|
||||||
|
branch="abranch"
|
||||||
|
nowarn="true"
|
||||||
|
comment="Some comment text"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccuncheckout">CCUnCheckout</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool uncheckout</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keepcopy</td>
|
||||||
|
<td>Specifies whether to keep a copy of the file with a <samp>.keep</samp> extension or not</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>uncheckout</code> on the file <samp>c:/views/viewdir/afile</samp>. A
|
||||||
|
copy of the file named <samp>c:/views/viewdir/afile.keep</samp> is kept.</p>
|
||||||
|
<pre><ccuncheckout viewpath="c:/views/viewdir/afile" keepcopy="true"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccupdate">CCUpdate</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform an <kbd>cleartool update</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase snapshot view file or directory that the command will operate on</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>graphical</td>
|
||||||
|
<td>Displays a graphical dialog during the update</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>log</td>
|
||||||
|
<td>Specifies a log file for ClearCase to write to</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>overwrite</td>
|
||||||
|
<td>Specifies whether to overwrite hijacked files or not</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rename</td>
|
||||||
|
<td>Specifies that hijacked files should be renamed with a <samp>.keep</samp> extension</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>currenttime</td>
|
||||||
|
<td>Specifies that modification time should be written as the current time. Mutually exclusive
|
||||||
|
with <var>preservetime</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservetime</td>
|
||||||
|
<td>Specifies that modification time should preserved from the VOB time. Mutually exclusive
|
||||||
|
with <var>currenttime</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/> <em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>update</code> on the snapshot view
|
||||||
|
directory <samp>c:/views/viewdir</samp>. A graphical dialog will be displayed. The output will be
|
||||||
|
logged to <samp>log.log</samp> and it will overwrite any hijacked files. The modified time will be
|
||||||
|
set to the current time.</p>
|
||||||
|
<pre>
|
||||||
|
<ccupdate viewpath="c:/views/viewdir"
|
||||||
|
graphical="false"
|
||||||
|
log="log.log"
|
||||||
|
overwrite="true"
|
||||||
|
currenttime="true"
|
||||||
|
rename="false"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmklbtype">CCMklbtype</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mklbtype</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typename</td>
|
||||||
|
<td>Name of the label type to create</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>vob</td>
|
||||||
|
<td>Name of the VOB</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>replace</td>
|
||||||
|
<td>Replace an existing label definition of the same type</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>global</td>
|
||||||
|
<td>Creates a label type that is global to the VOB or to VOBs that use this VOB.</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used,
|
||||||
|
default <var>ordinary</var>=<q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ordinary</td>
|
||||||
|
<td class="left">Creates a label type that can be used only in the current VOB.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pbranch</td>
|
||||||
|
<td>Allows the label type to be used once per branch in a given element's version tree</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>shared</td>
|
||||||
|
<td>Sets the way mastership is checked by ClearCase. See ClearCase documentation for
|
||||||
|
details</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>mklbtype</code> to create a label type named <samp>VERSION_1</samp>. It
|
||||||
|
is created as <em>ordinary</em> so it is available only to the current VOB. The text <q>Development
|
||||||
|
version 1</q> is added as a comment.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmklbtype typename="VERSION_1"
|
||||||
|
ordinary="true"
|
||||||
|
comment="Development version 1"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmklabel">CCMklabel</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mklabel</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typename</td>
|
||||||
|
<td>Name of the label type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>replace</td>
|
||||||
|
<td>Replace a label of the same type on the same branch</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>recurse</td>
|
||||||
|
<td>Process each subdirectory under <var>viewpath</var></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>Identify a specific version to attach the label to</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>vob</td>
|
||||||
|
<td>Name of the VOB</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>mklabel</code> on the file <samp>c:/views/viewdir/afile</samp> under
|
||||||
|
the <samp>main</samp> branch for version 2 (<samp>\main\2</samp>). Text "<samp>Some comment
|
||||||
|
text</samp>" is added as a comment. It will <em>recurse</em> all subdirectories.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmklabel viewpath="c:/views/viewdir/afile"
|
||||||
|
comment="Some comment text"
|
||||||
|
recurse="true"
|
||||||
|
version="\main\2"
|
||||||
|
typename="VERSION_1"/>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccrmtype">CCRmtype</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool rmtype</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typekind</td>
|
||||||
|
<td>The kind of type to create. Valid types are:
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Kind</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>attype</q></td>
|
||||||
|
<td>attribute type</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>brtype</q></td>
|
||||||
|
<td>branch type</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>eltype</q></td>
|
||||||
|
<td>element type</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>hltype</q></td>
|
||||||
|
<td>hyperlink type</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>lbtype</q></td>
|
||||||
|
<td>label type</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>trtype</q></td>
|
||||||
|
<td>trigger type</td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typename</td>
|
||||||
|
<td>The name of the type to remove</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignore</td>
|
||||||
|
<td>Used with trigger types only. Forces removal of trigger type even if a pre-operation trigger
|
||||||
|
would prevent its removal</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rmall</td>
|
||||||
|
<td>Removes all instances of a type and the type object itself</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails. <em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>rmtype</code> to remove a label type (<q>lbtype</q>)
|
||||||
|
named <samp>VERSION_1</samp>. Comment text from the file <samp>acomment.txt</samp> is added as a
|
||||||
|
comment. All instances of the type are removed, including the type object itself.</p>
|
||||||
|
<pre>
|
||||||
|
<ccrmtype typekind="lbtype"
|
||||||
|
typename="VERSION_1"
|
||||||
|
commentfile="acomment.txt"
|
||||||
|
rmall="true"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="cclock">CCLock</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool lock</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>replace</td>
|
||||||
|
<td>Specifies replacing an existing lock</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nusers</td>
|
||||||
|
<td>Specifies user(s) who can still modify the object</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>obsolete</td>
|
||||||
|
<td>Specifies that the object should be marked obsolete</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specifies how to populate comments fields</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pname</td>
|
||||||
|
<td>Specifies the object pathname to be locked.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>objselect</td>
|
||||||
|
<td><em>Obsolete</em>. Use <var>objsel</var> instead.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>objsel</td>
|
||||||
|
<td>Specifies the object(s) to be locked.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>lock</code> on the
|
||||||
|
object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
|
||||||
|
<pre><cclock objsel="stream:Application_Integration@\MyProject_PVOB"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccunlock">CCUnlock</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool unlock</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specifies how to populate comments fields</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pname</td>
|
||||||
|
<td>Specifies the object pathname to be unlocked.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>objselect</td>
|
||||||
|
<td><em>Obsolete</em>. Use <var>objsel</var> instead.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>objsel</td>
|
||||||
|
<td>Specifies the object(s) to be unlocked.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>unlock</code> on the
|
||||||
|
object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p>
|
||||||
|
<pre><ccunlock objsel="stream:Application_Integration@\MyProject_PVOB"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmkbl">CCMkbl</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mkbl</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>baselinerootname</td>
|
||||||
|
<td>Specify the name to be associated with the baseline.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nowarn</td>
|
||||||
|
<td>Suppress warning messages</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>identical</td>
|
||||||
|
<td>Allows the baseline to be created even if it is identical to the previous baseline.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>full</td>
|
||||||
|
<td>Creates a full baseline.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nlabel</td>
|
||||||
|
<td>Allows the baseline to be created without a label.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>mkbl</code> on the Integration view at <samp>v:\ApplicationCC</samp>
|
||||||
|
even if it is <em>identical</em> to a previous baseline. The new baseline with be incremental and
|
||||||
|
named <samp>Application_Baseline_AUTO</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmkbl baselinerootname="Application_Baseline_AUTO"
|
||||||
|
identical="yes"
|
||||||
|
full="no"
|
||||||
|
viewpath="v:\ApplicationCC"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmkattr">CCMkattr</h2>
|
||||||
|
<p><em>Since Ant 1.6.1</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mkattr</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>replace</td>
|
||||||
|
<td>Replace the value of the attribute if it already exists</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>recurse</td>
|
||||||
|
<td>Process each subdirectory under <var>viewpath</var></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>Identify a specific version to attach the attribute to</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typename</td>
|
||||||
|
<td>Name of the attribute type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>typevalue</td>
|
||||||
|
<td>Value to attach to the attribute type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>mkattr</code> on the file <samp>c:/views/viewdir/afile</samp> and
|
||||||
|
attach the attribute <samp>BugFix</samp> with a value of <samp>34445</samp> to it.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmkattr viewpath="c:/views/viewdir/afile"
|
||||||
|
typename="BugFix"
|
||||||
|
typevalue="34445"/>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmkdir">CCMkdir</h2>
|
||||||
|
<p><em>Since Ant 1.6.1</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mkdir</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view directory that the command will operate on</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nocheckout</td>
|
||||||
|
<td>Do not checkout after element creation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform a ClearCase <code>mkdir</code> on the dir <samp>c:/views/viewdir/adir</samp> and do not
|
||||||
|
automatically check it out.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmkdir viewpath="c:/views/viewdir/adir"
|
||||||
|
nocheckout="true"
|
||||||
|
comment="Some comment text"/></pre>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2 id="ccmkelem">CCMkelem</h2>
|
||||||
|
<p><em>Since Ant 1.6.1</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to perform a <kbd>cleartool mkelem</kbd> command to ClearCase.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Values</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>viewpath</td>
|
||||||
|
<td>Path to the ClearCase view file or directory that the command will operate on</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>comment</td>
|
||||||
|
<td>Specify a comment</td>
|
||||||
|
<td rowspan="2">No; only one of the two may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commentfile</td>
|
||||||
|
<td class="left">Specify a file containing a comment</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nowarn</td>
|
||||||
|
<td>Suppress warning messages</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nocheckout</td>
|
||||||
|
<td>Do not checkout after element creation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>checkin</td>
|
||||||
|
<td>Checkin element after creation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservetime</td>
|
||||||
|
<td>Preserve the modification time (for checkin)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>master</td>
|
||||||
|
<td>Assign mastership of the main branch to the current site</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>eltype</td>
|
||||||
|
<td>Element type to use during element creation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerr</td>
|
||||||
|
<td>Throw an exception if the command fails.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Perform ClearCase <code>mkelem</code> on the file <samp>c:/views/viewdir/afile</samp> with
|
||||||
|
element type <samp>text_file</samp>, check in the file after creation.</p>
|
||||||
|
<pre>
|
||||||
|
<ccmkelem viewpath="c:/views/viewdir/afile"
|
||||||
|
eltype="text_file"
|
||||||
|
checkin="true"
|
||||||
|
comment="Some comment text"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Common</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="javac">Common Attributes of all Tasks</h2>
|
||||||
|
<p>All tasks share the following attributes:</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>id</td>
|
||||||
|
<td>Unique identifier for this task instance, can be
|
||||||
|
used to reference this task in scripts.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>taskname</td>
|
||||||
|
<td>A different name for this task instance—will
|
||||||
|
show up in the logging output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>description</td>
|
||||||
|
<td>Room for your comments</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Componentdef Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="componentdef">componentdef</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Adds a component definition to the current project. A component definition is the same as
|
||||||
|
a <a href="typedef.html">typedef</a> except:</p>
|
||||||
|
<ol>
|
||||||
|
<li>that it can only be used in other types or tasks that accept components (by having
|
||||||
|
an <code>add()</code> method).</li>
|
||||||
|
<li>multiple components may have the same name, provided they implement different interfaces.</li>
|
||||||
|
</ol>
|
||||||
|
<p>The purpose of this is to allow internal Apache Ant definitions to be made for tags
|
||||||
|
like <samp>and</samp> or <samp>or</samp>.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Define two components with the same name <samp>or</samp>; one is a
|
||||||
|
condition (see <a href="conditions.html">conditions</a>) and one is a
|
||||||
|
selector (see <a href="../Types/selectors.html">selectors</a>).</p>
|
||||||
|
<pre>
|
||||||
|
<componentdef name="or" onerror="ignore"
|
||||||
|
classname="com.apache.tools.ant.taskdefs.conditions.Or"/>
|
||||||
|
<componentdef name="or" onerror="ignore"
|
||||||
|
classname="com.apache.tools.ant.types.resources.selectors.Or"/></pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,260 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Concat</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="concat">Concat</h2>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Concatenates one or more <a href="../Types/resources.html">resource</a>s to a single file or
|
||||||
|
to the console. The destination file will be created if it does not exist unless the resource
|
||||||
|
list is empty and <var>ignoreempty</var> is <q>true</q>.</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.7.1</em>, this task can be used as
|
||||||
|
a <a href="../Types/resources.html#collection">resource collection</a> that will return
|
||||||
|
exactly one <a href="../Types/resources.html">resource</a>.</p>
|
||||||
|
|
||||||
|
<p><a href="../Types/resources.html#collection">Resource collections</a> are used to select
|
||||||
|
which resources are to be concatenated. There is no singular attribute to specify a single
|
||||||
|
resource to <code>concat</code>.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The destination file for the concatenated stream. If not specified the console will be
|
||||||
|
used instead.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>Specifies whether or not the file specified by <var>destfile</var> should be
|
||||||
|
appended.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>force</td>
|
||||||
|
<td>Specifies whether or not the file specified by <var>destfile</var> should be written to
|
||||||
|
even if it is newer than all source files. <em><u>Deprecated</u>, use
|
||||||
|
the <var>overwrite</var> attribute instead.</em></td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>overwrite</td>
|
||||||
|
<td>Specifies whether or not the file specified by <var>destfile</var> should be written to
|
||||||
|
even if it is newer than all source files. <em>Since Ant 1.8.2</em>.</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forceReadOnly</td>
|
||||||
|
<td>Overwrite read-only destination files. <em>Since Ant 1.8.2</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>Specifies the encoding for the input files. Please
|
||||||
|
see <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html"
|
||||||
|
target="_top">Supported Encodings</a> for a list of possible values.</td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputencoding</td>
|
||||||
|
<td>The encoding to use when writing the output file. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to <var>encoding</var> if set or default JVM character encoding
|
||||||
|
otherwise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fixlastline</td>
|
||||||
|
<td>Specifies whether or not to check if each file concatenated is terminated by a new
|
||||||
|
line. If this attribute is <q>yes</q> a new line will be appended to the stream if the
|
||||||
|
file did not end in a new line. <em>Since Ant 1.6</em>. This attribute does not apply to
|
||||||
|
embedded text.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>eol</td>
|
||||||
|
<td>Specifies what the end of line character are for use by the fixlastline
|
||||||
|
attribute. <em>Since Ant 1.6</em> Valid values for this property are:
|
||||||
|
<ul>
|
||||||
|
<li><q>cr</q>: a single CR</li>
|
||||||
|
<li><q>lf</q>: a single LF</li>
|
||||||
|
<li><q>crlf</q>: the pair CRLF</li>
|
||||||
|
<li><q>mac</q>: a single CR</li>
|
||||||
|
<li><q>unix</q>: a single LF</li>
|
||||||
|
<li><q>dos</q>: the pair CRLF</li>
|
||||||
|
</ul></td>
|
||||||
|
<td>No; default is platform dependent: <q>lf</q> for Unix, <q>crlf</q> for DOS family
|
||||||
|
(including Windows), <q>cr</q> for Mac OS 9 or earlier</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>binary</td>
|
||||||
|
<td><em>Since Ant 1.6.2</em> If this attribute is set to <q>true</q>, the task concatenates
|
||||||
|
the files in a byte by byte fashion. If this attribute is <q>false</q>, concat will not
|
||||||
|
normally work for binary files due to character encoding issues. If this option is set
|
||||||
|
to <q>true</q>, the <var>destfile</var> attribute must be set, and the task cannot used
|
||||||
|
nested text. Also the
|
||||||
|
attributes <var>encoding</var>, <var>outputencoding</var>, <var>filelastline</var> cannot
|
||||||
|
be used.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filterbeforeconcat</td>
|
||||||
|
<td>If this attribute is set to <q>true</q>, the task applies the filterchain to each
|
||||||
|
input after applying <code>fixlastline</code>. If this attribute is <q>false</q>, concat
|
||||||
|
will apply the filterchain only once to the already concatenated inputs. Filtering of
|
||||||
|
<code>header</code> and <code>footer</code> is not affected by this setting.
|
||||||
|
<em>Since Ant 1.10.10</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoreempty</td>
|
||||||
|
<td><em>Since Ant 1.8.0</em> Specifies whether or not the file specified
|
||||||
|
by <var>destfile</var> should be created if the source resource list is empty.
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resourcename</td>
|
||||||
|
<td><em>Since Ant 1.8.3</em> Specifies the name reported if this task is exposed as
|
||||||
|
a <a href="../Types/resources.html">resource</a>.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>resource collection</h4>
|
||||||
|
<p><em>Since Ant 1.7</em>.</p>
|
||||||
|
|
||||||
|
<p>Any of the various <a href="../Types/resources.html#collection">resource collection</a> types
|
||||||
|
can specify the resources to be concatenated.</p>
|
||||||
|
|
||||||
|
<h4>filterchain</h4>
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
<p>The task supports nested <a href="../Types/filterchain.html">FilterChain</a>s.</p>
|
||||||
|
|
||||||
|
<h4>header, footer</h4>
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
<p>Used to prepend or postpend text into the concatenated stream.</p>
|
||||||
|
<p>The text may be in-line or be in a file.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filtering</td>
|
||||||
|
<td>Whether to filter the text provided by this sub element.</td>
|
||||||
|
<td>No; default is <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>A file to place at the head or tail of the concatenated text.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>trim</td>
|
||||||
|
<td>Whether to trim the value.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>trimleading</td>
|
||||||
|
<td>Whether to trim leading white space on each line.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Concatenate a string to a file:</p>
|
||||||
|
<pre><concat destfile="README">Hello, World!</concat></pre>
|
||||||
|
|
||||||
|
<p>Concatenate a series of files to the console:</p>
|
||||||
|
<pre>
|
||||||
|
<concat>
|
||||||
|
<fileset dir="messages" includes="*important*"/>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
<p>Concatenate a single file, appending if the destination file exists:</p>
|
||||||
|
<pre>
|
||||||
|
<concat destfile="NOTES" append="true">
|
||||||
|
<filelist dir="notes" files="note.txt"/>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
<p>Concatenate a series of files, update the destination file only if is older that all the
|
||||||
|
source files:</p>
|
||||||
|
<pre>
|
||||||
|
<concat destfile="${docbook.dir}/all-sections.xml"
|
||||||
|
force="no">
|
||||||
|
<filelist dir="${docbook.dir}/sections"
|
||||||
|
files="introduction.xml,overview.xml"/>
|
||||||
|
<fileset dir="${docbook.dir}"
|
||||||
|
includes="sections/*.xml"
|
||||||
|
excludes="introduction.xml,overview.xml"/>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
<p>Concatenate a series of files, expanding Ant properties.</p>
|
||||||
|
<pre>
|
||||||
|
<concat destfile="${build.dir}/subs">
|
||||||
|
<path>
|
||||||
|
<fileset dir="${src.dir}" includes="*.xml"/>
|
||||||
|
<pathelement location="build.xml"/>
|
||||||
|
</path>
|
||||||
|
<filterchain>
|
||||||
|
<expandproperties/>
|
||||||
|
</filterchain>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
<p>Filter the lines containing project from <samp>build.xml</samp> and output them
|
||||||
|
to <samp>report.output</samp>, prepending with a header.</p>
|
||||||
|
<pre>
|
||||||
|
<concat destfile="${build.dir}/report.output">
|
||||||
|
<header filtering="no" trimleading="yes">
|
||||||
|
Lines that contain project
|
||||||
|
==========================
|
||||||
|
</header>
|
||||||
|
<path path="build.xml"/>
|
||||||
|
<filterchain>
|
||||||
|
<linecontains>
|
||||||
|
<contains value="project"/>
|
||||||
|
</linecontains>
|
||||||
|
</filterchain>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
<p>Concatenate a number of binary files.</p>
|
||||||
|
<pre>
|
||||||
|
<concat destfile="${build.dir}/dist.bin" binary="yes">
|
||||||
|
<fileset file="${src.dir}/scripts/dist.sh"/>
|
||||||
|
<fileset file="${build.dir}/dist.tar.bz2"/>
|
||||||
|
</concat></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Condition Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="condition">Condition</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Sets a property if a certain condition holds true—this is a generalization
|
||||||
|
of <a href="available.html">Available</a> and <a href="uptodate.html">Uptodate</a>.</p>
|
||||||
|
<p>If the condition holds true, the property value is set to <q>true</q> by default; otherwise, the
|
||||||
|
property is not set. You can set the value to something other than the default by specifying
|
||||||
|
the <var>value</var> attribute.</p>
|
||||||
|
<p>Conditions are specified as <a href="#nested">nested elements</a>, you must specify exactly one
|
||||||
|
condition.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to set.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>The value to set the property to.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>else</td>
|
||||||
|
<td>The value to set the property to if the condition evaluates to <q>false</q>. <em>Since
|
||||||
|
Apache Ant 1.6.3</em>
|
||||||
|
</td>
|
||||||
|
<td>No; by default the property will remain unset</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3 id="nested">Parameters specified as nested elements</h3>
|
||||||
|
<p>All conditions to test are specified as nested elements, for a complete list
|
||||||
|
see <a href="conditions.html">here</a>.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Set the property <code>javamail.complete</code> if both the JavaBeans Activation Framework and
|
||||||
|
JavaMail are available in the classpath.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="javamail.complete">
|
||||||
|
<and>
|
||||||
|
<available classname="javax.activation.DataHandler"/>
|
||||||
|
<available classname="javax.mail.Transport"/>
|
||||||
|
</and>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
<p>Set the property <code>isMacOsButNotMacOsX</code> if the current operating system is MacOS, but
|
||||||
|
not MacOS X/macOS—which Ant considers to be in the Unix family as well.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="isMacOsButNotMacOsX">
|
||||||
|
<and>
|
||||||
|
<os family="mac"/>
|
||||||
|
<not>
|
||||||
|
<os family="unix"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
<p>Set the property <code>isSunOSonSparc</code> if the current operating system is SunOS and if it
|
||||||
|
is running on a SPARC architecture.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="isSunOSonSparc">
|
||||||
|
<os name="SunOS" arch="sparc"/>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,977 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Conditions Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="conditions">Conditions</h2>
|
||||||
|
<p>Conditions are nested elements of the <a href="condition.html"><code><condition></code></a>
|
||||||
|
and <a href="waitfor.html"><code><waitfor></code></a> tasks. There are core conditions and
|
||||||
|
custom conditions. Custom conditions are described
|
||||||
|
in <a href="../Types/custom-programming.html#customconditions">Custom Conditions</a>. Core
|
||||||
|
Conditions are described below.</p>
|
||||||
|
<h3 id="coreconditions">Core Conditions</h3>
|
||||||
|
|
||||||
|
<p>These are the nested elements that can be used as conditions in
|
||||||
|
the <a href="condition.html"><code><condition></code></a>
|
||||||
|
and <a href="waitfor.html"><code><waitfor></code></a> tasks.</p>
|
||||||
|
|
||||||
|
<h4 id="not">not</h4>
|
||||||
|
<p>The <code><not></code> element expects exactly one other condition to be nested into this
|
||||||
|
element, negating the result of the condition. It doesn't have any attributes and accepts all
|
||||||
|
nested elements of the condition task as nested elements as well.</p>
|
||||||
|
|
||||||
|
<h4 id="and">and</h4>
|
||||||
|
<p>The <code><and></code> element doesn't have any attributes and accepts an arbitrary number
|
||||||
|
of conditions as nested elements—all nested elements of the condition task are supported.
|
||||||
|
This condition is true if all of its contained conditions are, conditions will be evaluated in the
|
||||||
|
order they have been specified in the build file.</p>
|
||||||
|
<p>The <code><and></code> condition has the same shortcut semantics as the
|
||||||
|
Java <code>&&</code> operator, as soon as one of the nested conditions is false, no other
|
||||||
|
condition will be evaluated.</p>
|
||||||
|
|
||||||
|
<h4 id="or">or</h4>
|
||||||
|
<p>The <code><or></code> element doesn't have any attributes and accepts an arbitrary number
|
||||||
|
of conditions as nested elements—all nested elements of the condition task are supported.
|
||||||
|
This condition is true if at least one of its contained conditions is, conditions will be evaluated
|
||||||
|
in the order they have been specified in the build file.</p>
|
||||||
|
<p>The <code><or></code> condition has the same shortcut semantics as the Java <code>||</code>
|
||||||
|
operator, as soon as one of the nested conditions is true, no other condition will be evaluated.</p>
|
||||||
|
|
||||||
|
<h4 id="xor">xor</h4>
|
||||||
|
<p>The <code><xor></code> element performs an exclusive or on all nested elements, similar to
|
||||||
|
the <code>^</code> operator in Java. It only evaluates to true if an odd number of nested conditions
|
||||||
|
are true. There is no shortcutting of evaluation, unlike the <code><and></code>
|
||||||
|
and <code><or></code> tests. It doesn't have any attributes and accepts all nested elements
|
||||||
|
of the condition task as nested elements as well.</p>
|
||||||
|
|
||||||
|
<h4 id="available">available</h4>
|
||||||
|
<p>This condition is identical to the <a href="available.html">Available</a> task, all attributes
|
||||||
|
and nested elements of that task are supported, the property and value attributes are redundant and
|
||||||
|
will be ignored.</p>
|
||||||
|
|
||||||
|
<h4 id="uptodate">uptodate</h4>
|
||||||
|
<p>This condition is identical to the <a href="uptodate.html">Uptodate</a> task, all attributes and
|
||||||
|
nested elements of that task are supported, the property and value attributes are redundant and will
|
||||||
|
be ignored.</p>
|
||||||
|
|
||||||
|
<h4 id="os">os</h4>
|
||||||
|
<p>Test whether the current operating system is of a given type. Each defined attribute is tested
|
||||||
|
and the result is true only if <em>all</em> the tests succeed.
|
||||||
|
</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>family</td>
|
||||||
|
<td>The name of the operating system family to expect.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The name of the operating system to expect.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>arch</td>
|
||||||
|
<td>The architecture of the operating system to expect.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>version</td>
|
||||||
|
<td>The version of the operating system to expect.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>Supported values for the family attribute are:
|
||||||
|
<ul>
|
||||||
|
<li><q>windows</q>—for all versions of Microsoft Windows</li>
|
||||||
|
<li><q>dos</q>—for all Microsoft DOS based operating systems including Microsoft Windows and
|
||||||
|
OS/2</li>
|
||||||
|
<li><q>mac</q>—for all Apple Macintosh systems prior to Mac OS X</li>
|
||||||
|
<li><q>unix</q>—for all Unix(-like) operating systems, including Linux and Mac OS
|
||||||
|
X/macOS</li>
|
||||||
|
<li><q>netware</q>—for Novell NetWare</li>
|
||||||
|
<li><q>os/2</q>—for OS/2</li>
|
||||||
|
<li><q>tandem</q>—for HP's NonStop Kernel, formerly Tandem</li>
|
||||||
|
<li><q>win9x</q>—for Microsoft Windows 95 and 98, ME and CE</li>
|
||||||
|
<li><q>winnt</q>—for Microsoft Windows NT-based systems, including Windows 2000, XP and
|
||||||
|
successors</li>
|
||||||
|
<li><q>z/os</q>—for z/OS and OS/390</li>
|
||||||
|
<li><q>os/400</q>—for OS/400</li>
|
||||||
|
<li><q>openvms</q>—for OpenVMS</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h4 id="equals">equals</h4>
|
||||||
|
<p>Tests whether the two given values are equal.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>arg1</td>
|
||||||
|
<td>First value to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>arg2</td>
|
||||||
|
<td>Second value to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>casesensitive</td>
|
||||||
|
<td>Perform a case sensitive comparison.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>trim</td>
|
||||||
|
<td>Trim whitespace from arguments before comparing them.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forcestring</td>
|
||||||
|
<td>Force string comparison of <var>arg1</var>/<var>arg2</var>. <em>Since Apache Ant 1.8.1</em>
|
||||||
|
</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="isset">isset</h4>
|
||||||
|
<p>Test whether a given property has been set in this project.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="checksum">checksum</h4>
|
||||||
|
<p>This condition is identical to the <a href="checksum.html">Checksum</a> task, all attributes and
|
||||||
|
nested elements of that task are supported, the property and overwrite attributes are redundant and
|
||||||
|
will be ignored.</p>
|
||||||
|
|
||||||
|
<h4 id="http">http</h4>
|
||||||
|
<p>The <code>http</code> condition checks for a valid response from a web server of the specified
|
||||||
|
URL. By default, HTTP responses errors of 400 or greater are viewed as invalid.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>url</td>
|
||||||
|
<td>The full URL of the page to request. The web server must return a status code below the
|
||||||
|
value of <var>errorsBeginAt</var></td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorsBeginAt</td>
|
||||||
|
<td>The lowest HTTP response code that signals an error; server errors, not-authorized,
|
||||||
|
not-found and the like are detected</td>
|
||||||
|
<td>No; default is <q>400</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>requestMethod</td>
|
||||||
|
<td>The HTTP method to be used when issuing the request. Any
|
||||||
|
of <q>GET</q>, <q>POST</q>, <q>HEAD</q>, <q>OPTIONS</q>, <q>PUT</q>, <q>DELETE</q>
|
||||||
|
and <q>TRACE</q> are valid, subject to protocol restrictions.<br/><em>since Ant
|
||||||
|
1.8.0</em></td>
|
||||||
|
<td>No; default is <q>GET</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>followRedirects</td>
|
||||||
|
<td>Whether redirects should be followed.<br/><em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>readTimeout</td>
|
||||||
|
<td>Read timeout, in milliseconds, that will be used while reading from the target URL.
|
||||||
|
Accepts any value ≥ 0. Value of 0 implies wait indefinitely. Value < 0 will be silently
|
||||||
|
ignored.<br/>
|
||||||
|
<em>since Ant 1.10.6</em></td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="socket">socket</h4>
|
||||||
|
<p>The <code>socket</code> condition checks for the existence of a TCP/IP listener at the specified
|
||||||
|
host and port.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>server</td>
|
||||||
|
<td>The DNS name or IP address of the server.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>The port number to connect to.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="filesmatch">filesmatch</h4>
|
||||||
|
<p>Test two files for matching. Nonexistence of one file results in <q>false</q>, although if
|
||||||
|
neither exists they are considered equal in terms of content. This test does a byte for byte
|
||||||
|
comparison, so test time scales with byte size. <strong>Note</strong>: if the files are different
|
||||||
|
sizes, one of them is missing or the filenames match the answer is so obvious the detailed test is
|
||||||
|
omitted.
|
||||||
|
</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file1</td>
|
||||||
|
<td>First file to test</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file2</td>
|
||||||
|
<td>Second file to test</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>textfile</td>
|
||||||
|
<td>Whether to ignore line endings when comparing files. <em>Since Ant 1.7</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q> which triggers a binary comparison</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="contains">contains</h4>
|
||||||
|
<p>Tests whether a string contains another one.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>The string to search in.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>substring</td>
|
||||||
|
<td>The string to search for.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>casesensitive</td>
|
||||||
|
<td>Perform a case sensitive comparison.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="istrue">istrue</h4>
|
||||||
|
<p>Tests whether a string equals any of the Ant definitions of true, that
|
||||||
|
is <q>true</q>, <q>yes</q>, or <q>on</q></p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>value to test</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<pre>
|
||||||
|
<istrue value="${someproperty}"/>
|
||||||
|
<istrue value="false"/></pre>
|
||||||
|
|
||||||
|
<h4 id="isfalse">isfalse</h4>
|
||||||
|
<p>Tests whether a string is not true, the negation of <code><istrue></code></p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>value to test</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<pre>
|
||||||
|
<isfalse value="${someproperty}"/>
|
||||||
|
<isfalse value="false"/></pre>
|
||||||
|
|
||||||
|
<h4 id="isreference">isreference</h4>
|
||||||
|
<p>Test whether a given reference has been defined in this project and—optionally—is of
|
||||||
|
an expected type.</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refid</td>
|
||||||
|
<td>The <var>id</var> of the reference to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>Name of the data type or task this reference is expected to be.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="issigned">issigned</h4>
|
||||||
|
<p>Test whether a jarfile is signed. If the name of the signature is passed, the file is checked
|
||||||
|
for presence of that particular signature; otherwise the file is checked for the existence of any
|
||||||
|
signature. It does not perform rigorous signature validation; it only looks for the presence of a
|
||||||
|
signature.</p>
|
||||||
|
<p><em>Since Apache Ant 1.7</em>.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The jarfile that is to be tested for the presence of a signature.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The signature name to check for.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="isfileselected">isfileselected</h4>
|
||||||
|
<p>Test whether a file passes an embedded <a href="../Types/selectors.html">selector</a>.</p>
|
||||||
|
<p><em>Since Apache Ant 1.6.3</em>.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to check if is passes the embedded selector.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>basedir</td>
|
||||||
|
<td>The base directory to use for name based selectors. It this is not set, the
|
||||||
|
project's <var>basedir</var> will be used.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>Example usage:</p>
|
||||||
|
<pre>
|
||||||
|
<isfileselected file="a.xml">
|
||||||
|
<date datetime="06/28/2000 2:02 pm" when="equal"/>
|
||||||
|
</isfileselected></pre>
|
||||||
|
|
||||||
|
<h4 id="typefound">typefound</h4>
|
||||||
|
|
||||||
|
<p>Test whether a given type is defined, and that its implementation class can be loaded. Types
|
||||||
|
include tasks, datatypes, scriptdefs, macrodefs and presetdefs.</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.7</em>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>Name of the type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>uri</td>
|
||||||
|
<td>The URI that this type lives in.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>Example usages:</p>
|
||||||
|
<pre>
|
||||||
|
<typefound name="junit"/>
|
||||||
|
<typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/></pre>
|
||||||
|
|
||||||
|
<h4 id="scriptcondition">scriptcondition</h4>
|
||||||
|
|
||||||
|
<p>Evaluate a condition based on a script in any <a href="https://jakarta.apache.org/bsf"
|
||||||
|
target="_top">Apache BSF</a>
|
||||||
|
or <a href="https://jcp.org/aboutJava/communityprocess/maintenance/jsr223/223ChangeLog.html"
|
||||||
|
target="_top">JSR 223</a> supported language.</p>
|
||||||
|
<p>See the <a href="../Tasks/script.html">Script</a> task for an explanation of scripts and
|
||||||
|
dependencies.</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.7</em>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>language</td>
|
||||||
|
<td>script language</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>manager</td>
|
||||||
|
<td>The script engine manager to use. See the <a href="../Tasks/script.html">script</a> task
|
||||||
|
for using this attribute.</td>
|
||||||
|
<td>No; default is <q>auto</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>default boolean value</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>src</td>
|
||||||
|
<td>filename of script source</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>The encoding of the script source. <em>Since Ant 1.10.2</em>.</td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>setbeans</td>
|
||||||
|
<td>whether to have all properties, references and targets as global variables in the
|
||||||
|
script. <em>since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>The classpath to pass into the script.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>The classpath to use, given as a <a href="../using.html#references">reference</a> to a path
|
||||||
|
defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h5>Parameters specified as nested elements</h5>
|
||||||
|
<h6>classpath</h6>
|
||||||
|
<p>See the <a href="../Tasks/script.html">script</a> task for using this nested element.</p>
|
||||||
|
<h5>Description</h5>
|
||||||
|
<p>The script supports script language inline, this script has access to the same beans as
|
||||||
|
the <code><script></code> task, and to the <code>self</code> bean, which refers back to the
|
||||||
|
condition itself. If the script evaluates to a boolean result, this is the result of the condition's
|
||||||
|
evaluation (<em>since Ant 1.7.1</em>). Alternatively, <code>self.value</code> can be used to set
|
||||||
|
the evaluation result.</p>
|
||||||
|
<p>Example:</p>
|
||||||
|
<pre>
|
||||||
|
<scriptcondition language="javascript"
|
||||||
|
value="true">
|
||||||
|
self.setValue(false);
|
||||||
|
</scriptcondition></pre>
|
||||||
|
|
||||||
|
<p>Sets the default value of the condition to <q>true</q>, then in the script, sets the value
|
||||||
|
to <q>false</q>. This condition always evaluates to <q>false</q>.</p>
|
||||||
|
|
||||||
|
<h4 id="parsersupports">parsersupports</h4>
|
||||||
|
|
||||||
|
<p>Tests whether Ant's XML parser supports a given feature or property, as per the SAX/JAXP
|
||||||
|
specifications, by attempting to set the appropriate property/feature</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.7</em>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>property to set</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>feature</td>
|
||||||
|
<td class="left">feature to set</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>string (property) or boolean (feature)</td>
|
||||||
|
<td>For property tests, but not for feature tests</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<pre><parsersupports feature="http://xml.org/sax/features/namespaces"/></pre>
|
||||||
|
<p>Check for namespace support. All SAX2 parsers should have this.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<or>
|
||||||
|
<parsersupports
|
||||||
|
feature="http://apache.org/xml/features/validation/schema"/>
|
||||||
|
<parsersupports
|
||||||
|
feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/>
|
||||||
|
</or></pre>
|
||||||
|
<p>Check for XML Schema support.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<parsersupports
|
||||||
|
property="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
|
||||||
|
value="document.xsd"/></pre>
|
||||||
|
<p>Check for Xerces-specific definition of the location of the no namespace schema.</p>
|
||||||
|
|
||||||
|
<h4 id="isreachable">isreachable</h4>
|
||||||
|
|
||||||
|
<p>Uses Java 5+ networking APIs to probe for a (remote) system being reachable. Exactly what probe
|
||||||
|
mechanisms are used is an implementation feature of the JVM. They may include ICMP "ping" packets,
|
||||||
|
UDP or TCP connections to port 7 "echo service" or other means.</p>
|
||||||
|
<p>This condition turns unknown host exceptions into false conditions. This is because on a laptop,
|
||||||
|
DNS is one of the first services when the network goes; you are implicitly offline.</p>
|
||||||
|
<p>If a URL is supplied instead of a <var>host</var>, the hostname is extracted and used in the
|
||||||
|
test—all other parts of the URL are discarded.</p>
|
||||||
|
<p>The test may not work through firewalls, that is, something may be reachable using a protocol
|
||||||
|
such as HTTP, while the lower level ICMP packets get dropped on the floor. Similarly, a host may
|
||||||
|
detected as reachable with ICMP, but not reachable on other ports (i.e. port 80), because of
|
||||||
|
firewalls.</p>
|
||||||
|
<p><em>Since Apache Ant 1.7</em>.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>host</td>
|
||||||
|
<td>host to check for</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>url</td>
|
||||||
|
<td class="left">URL containing hostname</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timeout</td>
|
||||||
|
<td>timeout in seconds</td>
|
||||||
|
<td>No; default is <q>30</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<condition property="offline">
|
||||||
|
<isreachable url="https://ibiblio.org/maven/"/>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
<p>Probe for the Maven repository being reachable.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<condition property="offline">
|
||||||
|
<isreachable host="ibiblio.org" timeout="10"/>
|
||||||
|
</condition></pre>
|
||||||
|
|
||||||
|
<p>Probe for the Maven repository being reachable using the hostname, ten second timeout.</p>
|
||||||
|
|
||||||
|
<h4 id="length">length</h4>
|
||||||
|
<p><em>Since Ant 1.6.3</em></p>
|
||||||
|
<p>This condition is a facet of the <a href="length.html">Length</a> task. It is used to test the
|
||||||
|
length of a string or one or more files.</p>
|
||||||
|
|
||||||
|
<pre><length string=" foo " trim="true" length="3"/></pre>
|
||||||
|
<p>Verify a string is of a certain length.</p>
|
||||||
|
|
||||||
|
<pre><length file="foo" when="greater" length="0"/></pre>
|
||||||
|
<p>Verify that file <samp>foo</samp> is not empty.</p>
|
||||||
|
|
||||||
|
<h4 id="isfailure">isfailure</h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>Test the return code of an executable (see the <a href="exec.html">Exec</a> task) for
|
||||||
|
failure.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>code</td>
|
||||||
|
<td>The return code to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="resourcecount">resourcecount</h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>This condition is a facet of the <a href="resourcecount.html">ResourceCount</a> task. It is used
|
||||||
|
to test the size of a <a href="../Types/resources.html#collection">resource
|
||||||
|
collection</a>.</p>
|
||||||
|
|
||||||
|
<pre><resourcecount refid="myresourcecollection" when="greater" count="0"/></pre>
|
||||||
|
<p>Verify that a resource collection is not empty.</p>
|
||||||
|
|
||||||
|
<h4 id="resourcesmatch">resourcesmatch</h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>Test resources for matching. Nonexistence of one or more resources results in <q>false</q>,
|
||||||
|
although if none exists they are considered equal in terms of content. By default, this test does a
|
||||||
|
byte for byte comparison, so test time scales with byte size. <strong>Note</strong>: if the files
|
||||||
|
are different sizes, one of them is missing or the filenames match the answer is so obvious the
|
||||||
|
detailed test is omitted. The resources to check are specified as
|
||||||
|
nested <a href="../Types/resources.html#collection">resource collections</a>, meaning that more than
|
||||||
|
two resources can be checked; in this case all resources must match.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>astext</td>
|
||||||
|
<td>Whether to ignore line endings when comparing resource content; <q>true</q> triggers a
|
||||||
|
binary comparison.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="resourcecontains">resourcecontains</h4>
|
||||||
|
<p><em>Since Ant 1.7.1</em></p>
|
||||||
|
<p>Tests whether a resource contains a given (sub)string.</p>
|
||||||
|
<p>The resources to check are specified via references or—in the case of file
|
||||||
|
resources—via the <var>resource</var> attribute.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resource</td>
|
||||||
|
<td>Name of a file that is the resource to test.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refid</td>
|
||||||
|
<td class="left">Reference to a resource defined inside the project.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>substring</td>
|
||||||
|
<td>The string to search for.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>casesensitive</td>
|
||||||
|
<td>Perform a case sensitive comparison.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="hasmethod">hasmethod</h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>Tests for a class having a method or field. If the class is not found or fails to load, the build
|
||||||
|
fails.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classname</td>
|
||||||
|
<td>name of the class to load</td>
|
||||||
|
<td>yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>field</td>
|
||||||
|
<td>name of a field to look for</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>method</td>
|
||||||
|
<td class="left">name of a method to look for</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoreSystemClasses</td>
|
||||||
|
<td>should system classes be ignored?</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>a class path</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>reference to a class path</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>There is also a nested <code><classpath></code> element, which can be used to specify a
|
||||||
|
classpath.</p>
|
||||||
|
<pre><hasmethod classname="java.util.ArrayList" method="trimToSize"/></pre>
|
||||||
|
<p>Looks for the method <code class="code">trimToSize()</code> in
|
||||||
|
the <code class="code">java.util.ArrayList</code> class.</p>
|
||||||
|
|
||||||
|
<h4 id="matches">matches</h4>
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
<p>Test if the specified string matches the specified regular expression pattern</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>The string to test.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pattern</td>
|
||||||
|
<td>The regular expression pattern used to test.</td>
|
||||||
|
<td>Yes, unless there is a nested <code><regexp></code> element</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>casesensitive</td>
|
||||||
|
<td>Perform a case sensitive match.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>multiline</td>
|
||||||
|
<td>Perform a multi line match.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>singleline</td>
|
||||||
|
<td>This allows <q>.</q> to match new lines. <var>SingleLine</var> is not to be confused with
|
||||||
|
multiline, <var>SingleLine</var> is a perl regex term, it corresponds to <var>dotall</var> in
|
||||||
|
Java regex.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>There is also an optional <code><regexp></code> element, which can be used to specify a
|
||||||
|
regular expression instead of the <var>pattern</var> attribute.
|
||||||
|
See <a href="../Types/regexp.html">Regexp Type</a> for the description of the nested element regexp
|
||||||
|
and of the choice of regular expression implementation.</p>
|
||||||
|
<p>An example:</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="legal-password">
|
||||||
|
<matches pattern="[1-9]" string="${user-input}"/>
|
||||||
|
</condition>
|
||||||
|
<fail message="Your password should at least contain one number"
|
||||||
|
unless="legal-password"/></pre>
|
||||||
|
<p>The following example sets the property <code>ok</code> if the property <code>input</code> is
|
||||||
|
three characters long, starting with <q>a</q> and ending with <q>b</q>.</p>
|
||||||
|
<pre>
|
||||||
|
<condition property="ok">
|
||||||
|
<matches string="${input}" pattern="^a.b$"/>
|
||||||
|
</condition></pre>
|
||||||
|
<p>The following defines a reference regular expression for matching dates and then uses antunit to
|
||||||
|
check if the property <code>today</code> is in the correct format:</p>
|
||||||
|
<pre>
|
||||||
|
<regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/>
|
||||||
|
|
||||||
|
<au:assertTrue xmlns:au="antlib:org.apache.ant.antunit">
|
||||||
|
<matches string="${today}">
|
||||||
|
<regexp refid="date.pattern"/>
|
||||||
|
</matches>
|
||||||
|
</au:assertTrue></pre>
|
||||||
|
<p>The following example shows the use of the <var>singleline</var> and the <var>casesensitive</var>
|
||||||
|
flags.</p>
|
||||||
|
<pre>
|
||||||
|
<au:assertTrue>
|
||||||
|
<matches string="AB${line.separator}C" pattern="^ab.*C$"
|
||||||
|
casesensitive="false"
|
||||||
|
singleline="true"/>
|
||||||
|
</au:assertTrue>
|
||||||
|
<au:assertFalse>
|
||||||
|
<matches string="AB${line.separator}C" pattern="^ab.*C$"
|
||||||
|
casesensitive="false"
|
||||||
|
singleline="false"/>
|
||||||
|
</au:assertFalse></pre>
|
||||||
|
|
||||||
|
<h4 id="antversion">antversion</h4>
|
||||||
|
<p>This condition is identical to the <a href="antversion.html">Antversion</a> task, all attributes
|
||||||
|
are supported, the <var>property</var> attribute is redundant and will be ignored.</p>
|
||||||
|
|
||||||
|
<h4 id="hasfreespace">hasfreespace</h4>
|
||||||
|
<p><em>Since Ant 1.7.0</em></p>
|
||||||
|
<p>Tests a partition to see if there is enough space.</p>
|
||||||
|
<p>Needed attribute can be specified using standard computing terms:</p>
|
||||||
|
<ul>
|
||||||
|
<li>K : Kilobytes (1024 bytes)</li>
|
||||||
|
<li>M : Megabytes (1024 K)</li>
|
||||||
|
<li>G : Gigabytes (1024 M)</li>
|
||||||
|
<li>T : Terabytes (1024 G)</li>
|
||||||
|
<li>P : Petabytes (1024 T)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>partition</td>
|
||||||
|
<td>The partition or filesystem to check for free space</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>needed</td>
|
||||||
|
<td>The amount of free space needed.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>An example:</p>
|
||||||
|
<pre><hasfreespace partition="c:" needed="100M"/></pre>
|
||||||
|
|
||||||
|
<h4 id="islastmodified">islastmodified</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>Tests the last modified date of a resource.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>millis</td>
|
||||||
|
<td>Specifies the expected modification time of the resource in milliseconds since midnight Jan
|
||||||
|
1 1970.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>datetime</td>
|
||||||
|
<td class="left">Specifies the expected modification time of the resource. The special
|
||||||
|
value <q>now</q> indicates the current time.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pattern</td>
|
||||||
|
<td>SimpleDateFormat-compatible pattern string.</td>
|
||||||
|
<td>No; defaults to <q>MM/dd/YYYY hh:mm a</q> or <q>MM/dd/YYYY hh:mm:ss a</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mode</td>
|
||||||
|
<td>How to compare the timestamp. Accepted values
|
||||||
|
are <q>equals</q>, <q>before</q>, <q>not-before</q>, <q>after</q> and <q>not-after</q>.
|
||||||
|
<td>No; defaults to <q>equals</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>The actual resource to test is specified as a nested element.</p>
|
||||||
|
|
||||||
|
<p>An example:</p>
|
||||||
|
<pre>
|
||||||
|
<islastmodified dateTime="08/18/2009 04:41:19 AM" mode="not-before">
|
||||||
|
<file file="${file}"/>
|
||||||
|
</islastmodified></pre>
|
||||||
|
|
||||||
|
<h4 id="resourceexists">resourceexists</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>Tests a resource for existence.</p>
|
||||||
|
|
||||||
|
<p>The actual resource to test is specified as a nested element.</p>
|
||||||
|
|
||||||
|
<p>An example:</p>
|
||||||
|
<pre>
|
||||||
|
<resourceexists>
|
||||||
|
<file file="${file}"/>
|
||||||
|
</resourceexists></pre>
|
||||||
|
|
||||||
|
<h4 id="javaversion">javaversion</h4>
|
||||||
|
<p><em>Since Ant 1.10.2</em></p>
|
||||||
|
<p>Tests the version of the JVM executing Ant.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="left">atleast</td>
|
||||||
|
<td>The version that this JVM is of at least. The format
|
||||||
|
is <code>major.minor.point</code>. Starting with Java 9 really only the major number is
|
||||||
|
determined.</td>
|
||||||
|
<td rowspan="3">Exactly one of the three</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>atmost</td>
|
||||||
|
<td class="left">The version that this JVM is of at most. The format
|
||||||
|
is <code>major.minor.point</code>. Starting with Java 9 really only the major number is
|
||||||
|
determined.<br/>
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>exactly</td>
|
||||||
|
<td class="left">The version that this JVM is of exactly. The format
|
||||||
|
is <code>major.minor.point</code>. Starting with Java 9 really only the major number is
|
||||||
|
determined.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>An example:</p>
|
||||||
|
|
||||||
|
<pre><javaversion atleast="9"/></pre>
|
||||||
|
|
||||||
|
<p>will evaluate to true if the current JVM is Java 9 or above.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,303 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Copy Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="copy">Copy</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Copies a file or resource collection to a new file or directory. By default, files are only
|
||||||
|
copied if the source file is newer than the destination file, or when the destination file does not
|
||||||
|
exist - please see the <var>granularity</var> attribute for Ant's idea of <em>newer</em>.
|
||||||
|
However, you can explicitly overwrite files with the <code>overwrite</code> attribute.</p>
|
||||||
|
|
||||||
|
<p><a href="../Types/resources.html#collection">Resource collections</a> are used to select a group
|
||||||
|
of files to copy. To use a resource collection, the <var>todir</var> attribute must be
|
||||||
|
set. <strong>Note</strong> that some resources (for example
|
||||||
|
the <a href="../Types/resources.html#file">file</a> resource) return absolute paths as names and the
|
||||||
|
result of using them without using a nested mapper (or the flatten attribute) may not be what you
|
||||||
|
expect.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: If you employ filters in your copy operation, you should limit the copy to
|
||||||
|
text files. Binary files will be corrupted by the copy operation. This applies whether the filters
|
||||||
|
are implicitly defined by the <a href="filter.html">filter</a> task or explicitly provided to the
|
||||||
|
copy operation
|
||||||
|
as <a href="../Types/filterset.html">filtersets</a>. <em>See <a href="#encoding">encoding
|
||||||
|
note</a></em>.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to copy.</td>
|
||||||
|
<td>Yes, unless a nested resource collection element is used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservelastmodified</td>
|
||||||
|
<td>Give the copied files the same last modified time as the original source files.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tofile</td>
|
||||||
|
<td>The file to copy to. Prior to Apache Ant 1.8.2, the <var>tofile</var> attribute only
|
||||||
|
supported <a href="../Types/resources.html#file">file resources</a> to copy from.</td>
|
||||||
|
<td rowspan="2">With the <var>file</var> attribute, either <var>tofile</var> or <var>todir</var>
|
||||||
|
can be used.<br/> With nested resource collection elements, if the number of included
|
||||||
|
resources is greater than 1, or if only the <var>dir</var> attribute is specified in
|
||||||
|
the <code><fileset></code>, or if the <var>file</var> attribute is also specified, then
|
||||||
|
only <var>todir</var> is allowed.<br/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>todir</td>
|
||||||
|
<td class="left">The directory to copy to.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>overwrite</td>
|
||||||
|
<td>Overwrite existing files even if the destination files are newer.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>force</td>
|
||||||
|
<td>Overwrite read-only destination files. <em>since Ant 1.8.2</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filtering</td>
|
||||||
|
<td>Indicates whether token filtering using the <a href="../using.html#filters">global
|
||||||
|
build-file filters</a> should take place during the copy. <strong>Note</strong>:
|
||||||
|
Nested <code><filterset></code> elements will always be used, even if this attribute is
|
||||||
|
not specified, or its value is <q>false</q>, <q>no</q>, or <q>off</q>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>flatten</td>
|
||||||
|
<td>Ignore the directory structure of the source files, and copy all files into the directory
|
||||||
|
specified by the <var>todir</var> attribute. Note that you can achieve the same effect by
|
||||||
|
using a <a href="../Types/mapper.html#flatten-mapper">flatten mapper</a>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includeEmptyDirs</td>
|
||||||
|
<td>Copy any empty directories included in the FileSet(s).</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>If <q>false</q>, log a warning message, but do not stop the build, when the file to copy
|
||||||
|
does not exist or one of the nested filesets points to a directory that doesn't exist or an
|
||||||
|
error occurs while copying.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quiet</td>
|
||||||
|
<td>If <q>true</q> and <var>failonerror</var> is <q>false</q>, then do not log a warning message
|
||||||
|
when the file to copy does not exist or one of the nested filesets points to a directory that
|
||||||
|
doesn't exist or an error occurs while copying. <em>since Ant 1.8.3</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Log the files that are being copied.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>The encoding to assume when filter-copying the files. <em>since Ant 1.5</em>.</td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputencoding</td>
|
||||||
|
<td>The encoding to use when writing the files.
|
||||||
|
<em>since Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to <var>encoding</var> if set or default JVM character encoding otherwise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enablemultiplemappings</td>
|
||||||
|
<td>If <q>true</q> the task will process to all the mappings for a given source
|
||||||
|
path. If <q>false</q> the task will only process the first file or directory. This attribute
|
||||||
|
is only relevant if there is a <code>mapper</code> subelement. <em>since Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>granularity</td>
|
||||||
|
<td>The number of milliseconds leeway to give before deciding a file is out of date. This is
|
||||||
|
needed because not every file system supports tracking the last modified time to the
|
||||||
|
millisecond level. This can also be useful if source and target files live on separate
|
||||||
|
machines with clocks being out of sync. <em>since Ant 1.6.2</em>.</td>
|
||||||
|
<td>No; default is 1 second, or 2 seconds on DOS systems</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>any filesystem based resource collection</h4>
|
||||||
|
<p><a href="../Types/resources.html#collection">Resource collections</a> are used to select groups
|
||||||
|
of files to copy. To use a resource collection, the <var>todir</var> attribute must be set.</p>
|
||||||
|
<p>Prior to Ant 1.7, only <code><fileset></code> has been supported as a nested element.</p>
|
||||||
|
|
||||||
|
<h4>mapper</h4>
|
||||||
|
<p>You can define filename transformations by using a
|
||||||
|
nested <a href="../Types/mapper.html">mapper</a> element. The default mapper used
|
||||||
|
by <code><copy></code> is the <a href="../Types/mapper.html#identity-mapper">identity
|
||||||
|
mapper</a>.</p>
|
||||||
|
<p><em>Since Ant 1.6.3</em>, one can use a filenamemapper type in place of the mapper element.</p>
|
||||||
|
|
||||||
|
<p>Note that the source name handed to the mapper depends on the resource collection you use. If
|
||||||
|
you use <code><fileset></code> or any other collection that provides a base directory, the
|
||||||
|
name passed to the mapper will be a relative filename, relative to the base directory. In any other
|
||||||
|
case the absolute filename of the source will be used.</p>
|
||||||
|
|
||||||
|
<h4>filterset</h4>
|
||||||
|
<p><a href="../Types/filterset.html">FilterSet</a>s are used to replace tokens in files that are
|
||||||
|
copied. To use a FilterSet, use the nested <code><filterset></code> element.</p>
|
||||||
|
|
||||||
|
<p>It is possible to use more than one filterset.</p>
|
||||||
|
|
||||||
|
<h4>filterchain</h4>
|
||||||
|
<p>The Copy task supports nested <a href="../Types/filterchain.html">FilterChain</a>s.</p>
|
||||||
|
|
||||||
|
<p>If <code><filterset></code> and <code><filterchain></code> elements are used inside
|
||||||
|
the same <code><copy></code> task, all <code><filterchain></code> elements are processed
|
||||||
|
first followed by <code><filterset></code> elements.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Copy a single file</p>
|
||||||
|
<pre><copy file="myfile.txt" tofile="mycopy.txt"/></pre>
|
||||||
|
|
||||||
|
<p>Copy a single file to a directory</p>
|
||||||
|
<pre><copy file="myfile.txt" todir="../some/other/dir"/></pre>
|
||||||
|
|
||||||
|
<p>Copy a directory to another directory</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="../new/dir">
|
||||||
|
<fileset dir="src_dir"/>
|
||||||
|
</copy>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Copy a set of files to a directory</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="../dest/dir">
|
||||||
|
<fileset dir="src_dir">
|
||||||
|
<exclude name="**/*.java"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<copy todir="../dest/dir">
|
||||||
|
<fileset dir="src_dir" excludes="**/*.java"/>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>Copy a set of files to a directory, appending <samp>.bak</samp> to the file name on the
|
||||||
|
fly</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="../backup/dir">
|
||||||
|
<fileset dir="src_dir"/>
|
||||||
|
<globmapper from="*" to="*.bak"/>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>Copy a set of files to a directory, replacing <code>@TITLE@</code> with <samp>Foo
|
||||||
|
Bar</samp> in all files.</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="../backup/dir">
|
||||||
|
<fileset dir="src_dir"/>
|
||||||
|
<filterset>
|
||||||
|
<filter token="TITLE" value="Foo Bar"/>
|
||||||
|
</filterset>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>Collect all items from the current <code>CLASSPATH</code> setting into a destination
|
||||||
|
directory, flattening the directory structure.</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="dest" flatten="true">
|
||||||
|
<path>
|
||||||
|
<pathelement path="${java.class.path}"/>
|
||||||
|
</path>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>Copies some resources to a given directory.</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="dest" flatten="true">
|
||||||
|
<resources>
|
||||||
|
<file file="src_dir/file1.txt"/>
|
||||||
|
<url url="https://ant.apache.org/index.html"/>
|
||||||
|
</resources>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>If the example above didn't use the <var>flatten</var> attribute, the <code><file></code>
|
||||||
|
resource would have returned its full path as source and target name and would not have been copied
|
||||||
|
at all. In general it is a good practice to use an explicit mapper together with resources that use
|
||||||
|
an absolute path as their names.</p>
|
||||||
|
|
||||||
|
<p>Copies the two newest resources into a destination directory.</p>
|
||||||
|
<pre>
|
||||||
|
<copy todir="dest" flatten="true">
|
||||||
|
<first count="2">
|
||||||
|
<sort>
|
||||||
|
<date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
|
||||||
|
<resources>
|
||||||
|
<file file="src_dir/file1.txt"/>
|
||||||
|
<file file="src_dir/file2.txt"/>
|
||||||
|
<file file="src_dir/file3.txt"/>
|
||||||
|
<url url="https://ant.apache.org/index.html"/>
|
||||||
|
</resources>
|
||||||
|
</sort>
|
||||||
|
</first>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>The paragraph following the previous example applies to this example as well.</p>
|
||||||
|
|
||||||
|
<p><strong>Unix Note</strong>: File permissions are not retained when files are copied; they end up
|
||||||
|
with the default <code>UMASK</code> permissions instead. This is caused by the lack of any means to
|
||||||
|
query or set file permissions in the current Java runtimes. If you need a permission-preserving copy
|
||||||
|
function, use <code><exec executable="cp" ... ></code> instead.</p>
|
||||||
|
|
||||||
|
<p><strong>Windows Note</strong>: If you copy a file to a directory where that file already exists,
|
||||||
|
but with different case, the copied file takes on the case of the original. The workaround is
|
||||||
|
to <a href="delete.html">delete</a> the file in the destination directory before you copy it.</p>
|
||||||
|
<p id="encoding"><strong>Important Encoding Note</strong>: The reason that binary files when
|
||||||
|
filtered get corrupted is that filtering involves reading in the file using a Reader class. This has
|
||||||
|
an encoding specifying how files are encoded. There are a number of different types of
|
||||||
|
encoding—UTF-8, UTF-16, Cp1252, ISO-8859-1, US-ASCII and (lots of) others. On Windows the
|
||||||
|
default character encoding is Cp1252, on Unix it is usually UTF-8. For both of these encoding there
|
||||||
|
are illegal byte sequences (more in UTF-8 than for Cp1252).</p>
|
||||||
|
<p>How the Reader class deals with these illegal sequences is up to the implementation of the
|
||||||
|
character decoder. The current Sun Java implementation is to map them to legal characters. Previous
|
||||||
|
Sun Java (1.3 and lower) threw a <code>MalformedInputException</code>. IBM Java 1.4 also throws this
|
||||||
|
exception. It is the mapping of the characters that cause the corruption.</p>
|
||||||
|
<p>On Unix, where the default is normally UTF-8, this is a <em>big</em> problem, as it is easy to
|
||||||
|
edit a file to contain non US-ASCII characters from ISO-8859-1, for example the Danish œ
|
||||||
|
character. When this is copied (with filtering) by Ant, the character get converted to a question
|
||||||
|
mark (or some such thing).</p>
|
||||||
|
<p>There is not much that Ant can do. It cannot figure out which files are binary—a UTF-8
|
||||||
|
version of Korean will have lots of bytes with the top bit set. It is not informed about illegal
|
||||||
|
character sequences by current Sun Java implementations.</p>
|
||||||
|
<p>One trick for filtering containing only US-ASCII is to use the ISO-8859-1 encoding. This does not
|
||||||
|
seem to contain illegal character sequences, and the lower 7 bits are US-ASCII. Another trick is to
|
||||||
|
change the <code>LANG</code> environment variable from something like <q>us.utf8</q>
|
||||||
|
to <q>us</q>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,129 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Copydir Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="copydir">Copydir</h2>
|
||||||
|
<h3><em><u>Deprecated</u></em></h3>
|
||||||
|
<p><em>This task has been <u>deprecated</u>. Use the <code>Copy</code> task instead.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Copies a directory tree from the source to the destination.</p>
|
||||||
|
<p>It is possible to refine the set of files that are being copied. This can be done with
|
||||||
|
the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
|
||||||
|
and <var>defaultexcludes</var> attributes. With the <var>includes</var> or <var>includesfile</var>
|
||||||
|
attribute you specify the files you want to have included by using patterns. The <var>exclude</var>
|
||||||
|
or <var>excludesfile</var> attribute is used to specify the files you want to have excluded. This is
|
||||||
|
also done with patterns. And finally with the <var>defaultexcludes</var> attribute, you can specify
|
||||||
|
whether you want to use default exclusions or not. See the section
|
||||||
|
on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
|
||||||
|
inclusion/exclusion of files works, and how to write patterns.</p>
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>src</var>) as well as the
|
||||||
|
nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>src</td>
|
||||||
|
<td>the directory to copy.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>the directory to copy to.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filtering</td>
|
||||||
|
<td>indicates whether token filtering should take place during the copy</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>flatten</td>
|
||||||
|
<td>ignore directory structure of source directory, copy all files into a single directory,
|
||||||
|
specified by the <code>dest</code> attribute.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forceoverwrite</td>
|
||||||
|
<td>overwrite existing files even if the destination files are newer.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<copydir src="${src}/resources"
|
||||||
|
dest="${dist}"/></pre>
|
||||||
|
|
||||||
|
<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
|
||||||
|
recursively. All <samp>.java</samp> files are copied, except for files with the
|
||||||
|
name <samp>Test.java</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<copydir src="${src}/resources"
|
||||||
|
dest="${dist}"
|
||||||
|
includes="**/*.java"
|
||||||
|
excludes="**/Test.java"/></pre>
|
||||||
|
|
||||||
|
<p>Copy the directory <samp>${src}/resources</samp> to <samp>${dist}</samp>
|
||||||
|
recursively. All <samp>.java</samp> files are copied, except for the files under
|
||||||
|
the <samp>mypackage/test</samp> directory.</p>
|
||||||
|
<pre>
|
||||||
|
<copydir src="${src}/resources"
|
||||||
|
dest="${dist}"
|
||||||
|
includes="**/*.java"
|
||||||
|
excludes="mypackage/test/**"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Copyfile Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="copyfile">Copyfile</h2>
|
||||||
|
<h3><em><u>Deprecated</u></em></h3>
|
||||||
|
<p><em>This task has been <em>deprecated</em>. Use the <code>Copy</code> task instead.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Copies a file from the source to the destination. The file is only copied if the source file is
|
||||||
|
newer than the destination file, or when the destination file does not exist.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>src</td>
|
||||||
|
<td>the filename of the file to copy.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>the filename of the file where to copy to.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filtering</td>
|
||||||
|
<td>indicates whether token filtering should take place during the copy</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forceoverwrite</td>
|
||||||
|
<td>overwrite existing files even if the destination files are newer.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre>
|
||||||
|
<copyfile src="test.java" dest="subdir/test.java"/>
|
||||||
|
<copyfile src="${src}/index.html" dest="${dist}/help/index.html"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,220 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>CVS Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="cvs">Cvs</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Handles packages/modules retrieved from a <a href="https://www.nongnu.org/cvs/"
|
||||||
|
target="_top">CVS</a> repository.</p>
|
||||||
|
<p><strong>Important:</strong> This task needs <kbd>cvs</kbd> binary on the path. If it isn't, you
|
||||||
|
will get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't
|
||||||
|
work, try to execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you
|
||||||
|
are working. Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with
|
||||||
|
the Unix version, this is not completely true for certain other CVS clients—like CVSNT for
|
||||||
|
example—and some operation may fail when using such an incompatible client.</p>
|
||||||
|
|
||||||
|
<p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If
|
||||||
|
the <a href="cvspass.html">cvspass task</a> and the <var>passfile</var> attribute don't seem to work
|
||||||
|
for you, the most likely reason is that CVSNT ignores your <samp>.cvspass</samp> file completely.
|
||||||
|
See <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5" target="_top">bugzilla
|
||||||
|
report 21657</a> for recommended workarounds.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>command</td>
|
||||||
|
<td>the CVS command to execute.</td>
|
||||||
|
<td>No; default is <q>checkout</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compression</td>
|
||||||
|
<td><q>true</q> (equivalent to <var>compressionlevel</var>=<q>3</q>) or <q>false</q></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compressionlevel</td>
|
||||||
|
<td>A number between <q>1</q> and <q>9</q> (corresponding to possible values for
|
||||||
|
CVS <kbd>-z#</kbd> argument). Any other value is treated
|
||||||
|
as <var>compression</var>=<q>false</q></td>
|
||||||
|
<td>No; defaults to no compression</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRoot</td>
|
||||||
|
<td>the <code>CVSROOT</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRsh</td>
|
||||||
|
<td>the <code>CVS_RSH</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>the directory where the checked out files should be placed. Note that this is different
|
||||||
|
from CVS's <kbd>-d</kbd> command line switch as Apache Ant will never shorten pathnames to
|
||||||
|
avoid empty directories.</td>
|
||||||
|
<td>No; default is project's <var>basedir</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>package</td>
|
||||||
|
<td>the package/module to check out. <strong>Note</strong>: multiple attributes can be split
|
||||||
|
using spaces. Use a nested <code><module></code> element if you want to specify a
|
||||||
|
module with spaces in its name.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tag</td>
|
||||||
|
<td>the tag of the package/module to check out.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>date</td>
|
||||||
|
<td>Use the most recent revision no later than the given date</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quiet</td>
|
||||||
|
<td>suppress informational messages. This is the same as <kbd>-q</kbd> on the command
|
||||||
|
line.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>reallyquiet</td>
|
||||||
|
<td>suppress all messages. This is the same as <kbd>-Q</kbd> on the command line. <em>since
|
||||||
|
Ant 1.6</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>noexec</td>
|
||||||
|
<td>report only, don't change any files.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>the file to direct standard output from the command.</td>
|
||||||
|
<td>No; default is output to the log as <code>MSG_INFO</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>the file to direct standard error from the command.</td>
|
||||||
|
<td>No; default is error to the log as <code>MSG_WARN</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>whether to append output/error when redirecting to a file.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>Port used by CVS to communicate with the server.</td>
|
||||||
|
<td>No; default is <q>2401</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passfile</td>
|
||||||
|
<td>Password file to read passwords from.</td>
|
||||||
|
<td>No; default is <q>~/.cvspass</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>module</h4>
|
||||||
|
|
||||||
|
<p>Specifies a package/module to work on, unlike the package attribute modules specified using this
|
||||||
|
attribute can contain spaces in their name.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The module's/package's name.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Check out the package/module <samp>ant</samp> from the CVS repository pointed to by
|
||||||
|
the <var>cvsRoot</var> attribute, and store the files in <samp>${ws.dir}</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
|
||||||
|
package="ant"
|
||||||
|
dest="${ws.dir}"/></pre>
|
||||||
|
|
||||||
|
<p>Update the package/module that has previously been checked out into <samp>${ws.dir}</samp>.</p>
|
||||||
|
<pre><cvs dest="${ws.dir}" command="update"/></pre>
|
||||||
|
|
||||||
|
<p>Silently (<kbd>-q</kbd>) create a file called <samp>patch.txt</samp> containing a unified
|
||||||
|
(<kbd>-u</kbd>) diff which includes new files added via <kbd>cvs add</kbd> (<kbd>-N</kbd>) and can
|
||||||
|
be used as input to <kbd>patch</kbd>.</p>
|
||||||
|
<pre><cvs command="-q diff -u -N" output="patch.txt"/></pre>
|
||||||
|
|
||||||
|
<p>The equivalent, using <code><commandline></code> elements, is:</p>
|
||||||
|
<pre>
|
||||||
|
<cvs output="patch">
|
||||||
|
<commandline>
|
||||||
|
<argument value="-q"/>
|
||||||
|
<argument value="diff"/>
|
||||||
|
<argument value="-u"/>
|
||||||
|
<argument value="-N"/>
|
||||||
|
</commandline>
|
||||||
|
</cvs></pre>
|
||||||
|
<p>or:</p>
|
||||||
|
<pre>
|
||||||
|
<cvs output="patch">
|
||||||
|
<commandline>
|
||||||
|
<argument line="-q diff -u -N"/>
|
||||||
|
</commandline>
|
||||||
|
</cvs></pre>
|
||||||
|
<p>You may include as many <code><commandline></code> elements as you like. Each will inherit
|
||||||
|
the <var>failonerror</var>, <var>compression</var>, and other "global" parameters from
|
||||||
|
the <code><cvs></code> element.</p>
|
||||||
|
|
||||||
|
<p>Update from the head of repository ignoring sticky bits (<kbd>-A</kbd>) and creating any new
|
||||||
|
directories as necessary (<kbd>-d</kbd>).</p>
|
||||||
|
<pre><cvs command="update -A -d"/></pre>
|
||||||
|
<p>Note: the text of the command is passed to <kbd>cvs</kbd> "as-is" so any <kbd>cvs</kbd>
|
||||||
|
options should appear before the command, and any command options should appear after the command as
|
||||||
|
in the <code>diff</code> example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html"
|
||||||
|
target="_top">the CVS book</a> for details, specifically
|
||||||
|
the <a href="http://cvsbook.red-bean.com/cvsbook.html#Commands%20And%20Options" target="_top">Guide
|
||||||
|
to CVS commands</a>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,68 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>CVSPass Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="cvs">cvspass</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Adds entries to a <samp>.cvspass</samp> file. Adding entries to this file has the same affect as
|
||||||
|
a <kbd>cvs login</kbd> command.</p>
|
||||||
|
|
||||||
|
<p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If
|
||||||
|
the task doesn't seem to work for you, the most likely reason is that CVSNT ignores
|
||||||
|
your <samp>.cvspass</samp> file
|
||||||
|
completely. See <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=21657#c5"
|
||||||
|
target="_top">bugzilla report 21657</a> for recommended workarounds.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsroot</td>
|
||||||
|
<td>the CVS repository to add an entry for.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>password</td>
|
||||||
|
<td>Password to be added to the password file.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passfile</td>
|
||||||
|
<td>Password file to add the entry to.</td>
|
||||||
|
<td>No; default is <q>~/.cvspass</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Add an entry into the <samp>~/.cvspass</samp> password file.</p>
|
||||||
|
<pre>
|
||||||
|
<cvspass cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
|
||||||
|
password="anoncvs"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,238 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>CvsTagDiff Task</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2 id="cvstagdiff">CvsTagDiff</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates an XML-formatted report file of the changes between two tags or dates recorded in
|
||||||
|
a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p>
|
||||||
|
<p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get
|
||||||
|
an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to
|
||||||
|
execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working.
|
||||||
|
Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix
|
||||||
|
version, this is not completely true for certain other CVS clients—like CVSNT for
|
||||||
|
example—and some operation may fail when using such an incompatible client.</p>
|
||||||
|
<p>This task captures the output of the CVS command in a file inside of
|
||||||
|
the <a href="../running.html#tmpdir">temporary directory</a>.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>startTag</td>
|
||||||
|
<td>The earliest tag from which diffs are to be included in the report.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>startDate</td>
|
||||||
|
<td class="left">The earliest date from which diffs are to be included in the
|
||||||
|
report.<br/>Accepts all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D
|
||||||
|
date_spec</kbd> arguments.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>endTag</td>
|
||||||
|
<td>The latest tag from which diffs are to be included in the report.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>endDate</td>
|
||||||
|
<td class="left">The latest date from which diffs are to be included in the report.<br/>Accepts
|
||||||
|
all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D date_spec</kbd>
|
||||||
|
arguments.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The file in which to write the diff report.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoreRemoved</td>
|
||||||
|
<td>When set to <q>true</q>, the report will not include any removed files. <em>Since Apache
|
||||||
|
Ant 1.8.0</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters inherited from the <code>cvs</code> task</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compression</td>
|
||||||
|
<td><q>true</q> (equivalent to <q>3</q>), <q>false</q>, or a number between <q>1</q>
|
||||||
|
and <q>9</q> (corresponding to possible values for CVS <kbd>-z#</kbd> argument). Any other
|
||||||
|
value is treated as <q>false</q></td>
|
||||||
|
<td>No; defaults to no compression</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRoot</td>
|
||||||
|
<td>the <code>CVSROOT</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRsh</td>
|
||||||
|
<td>the <code>CVS_RSH</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>package</td>
|
||||||
|
<td>the package/module to analyze.<br/><em>Since Ant 1.6</em> multiple packages separated by
|
||||||
|
spaces are possible. aliases corresponding to different modules are also possible. Use a
|
||||||
|
nested <code><module></code> element if you want to specify a module with spaces in its
|
||||||
|
name.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quiet</td>
|
||||||
|
<td>suppress informational messages.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>Port used by CVS to communicate with the server.</td>
|
||||||
|
<td>No; default <q>2401</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passfile</td>
|
||||||
|
<td>Password file to read passwords from.</td>
|
||||||
|
<td>No; default <q>~/.cvspass</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>module</h4>
|
||||||
|
|
||||||
|
<p>Specifies a package/module to work on, unlike the package attribute modules specified using this
|
||||||
|
attribute can contain spaces in their name.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>Name of the module/package.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
|
||||||
|
the <code>ant</code> module between the tags <samp>ANT_14</samp>
|
||||||
|
and <samp>ANT_141</samp>. Write these changes into the file <samp>tagdiff.xml</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<cvstagdiff cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
|
||||||
|
destfile="tagdiff.xml"
|
||||||
|
package="ant"
|
||||||
|
startTag="ANT_14"
|
||||||
|
endTag="ANT_141"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
|
||||||
|
the <samp>ant</samp> module in January 2002. Write the changes into the
|
||||||
|
file <samp>tagdiff.xml</samp>. In this example, <var>cvsRoot</var> has not been
|
||||||
|
set. The current <var>cvsRoot</var> will be used (assuming the build is started from a folder stored
|
||||||
|
in CVS.</p>
|
||||||
|
<pre>
|
||||||
|
<cvstagdiff destfile="tagdiff.xml"
|
||||||
|
package="ant"
|
||||||
|
startDate="2002-01-01"
|
||||||
|
endDate="2002-31-01"/></pre>
|
||||||
|
|
||||||
|
<p>Generate a <code>tagdiff</code> report for all the changes that have been made in
|
||||||
|
the <samp>ant</samp> and <samp>jakarta-gump</samp> modules in January 2003. Write the changes into
|
||||||
|
the file <samp>tagdiff.xml</samp>. In this
|
||||||
|
example, <var>cvsRoot</var> has not been set. The current <var>cvsRoot</var> will be used (assuming
|
||||||
|
the build is started from a folder stored in CVS.</p>
|
||||||
|
<pre>
|
||||||
|
<cvstagdiff destfile="tagdiff.xml"
|
||||||
|
package="ant jakarta-gump"
|
||||||
|
startDate="2003-01-01"
|
||||||
|
endDate="2003-31-01"/></pre>
|
||||||
|
|
||||||
|
<h4>Generate Report</h4>
|
||||||
|
<p>Ant includes a basic XSLT stylesheet that you can use to generate a HTML report based on the XML
|
||||||
|
output. The following example illustrates how to generate an HTML report from the XML report.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<style in="tagdiff.xml"
|
||||||
|
out="tagdiff.html"
|
||||||
|
style="${ant.home}/etc/tagdiff.xsl">
|
||||||
|
<param name="title" expression="Ant Diff"/>
|
||||||
|
<param name="module" expression="ant"/>
|
||||||
|
<param name="cvsweb" expression="https://cvs.apache.org/viewcvs/"/>
|
||||||
|
</style></pre>
|
||||||
|
|
||||||
|
<h4>Output</h4>
|
||||||
|
<p>The <var>cvsroot</var> and <var>package</var> attributes of the <code><tagdiff></code> element are
|
||||||
|
added <em>since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>Description of <code><entry></code> attributes:</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Comment</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><var>name</var></td>
|
||||||
|
<td>when reporting on one package, the package name is removed from the output</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><var>revision</var></td>
|
||||||
|
<td>supplied for files which exist at the end of the reporting period</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><var>prevrevision</var></td>
|
||||||
|
<td>supplied for files which exist at the beginning of the reporting period.<br/>Old CVS servers
|
||||||
|
do not supply it for deleted files. CVS 1.12.2 supplies it.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>Example:</p>
|
||||||
|
<pre>
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tagdiff startTag="ANT_14" endTag="ANT_141"
|
||||||
|
cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" package="ant">
|
||||||
|
<entry>
|
||||||
|
<file>
|
||||||
|
<name>src/main/org/apache/tools/ant/DirectoryScanner.java</name>
|
||||||
|
<revision>1.15.2.1</revision>
|
||||||
|
<prevrevision>1.15</prevrevision>
|
||||||
|
</file>
|
||||||
|
</entry>
|
||||||
|
</tagdiff>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,102 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>CVSVersion Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="cvs">CvsVersion</h2>
|
||||||
|
<p><em>Since Apache Ant 1.6.1</em>.</p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>This task allows to retrieve a CVS client and server version.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="left">Attributes from parent <code><cvs></code> task which are
|
||||||
|
meaningful here</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRoot</td>
|
||||||
|
<td>the <code>CVSROOT</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cvsRsh</td>
|
||||||
|
<td>the <code>CVS_RSH</code> variable.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>directory containing the checked out version of the project</td>
|
||||||
|
<td>No; default is project's <var>basedir</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>package</td>
|
||||||
|
<td>the package/module to check out.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>Port used by CVS to communicate with the server.</td>
|
||||||
|
<td>No; default is <q>2401</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passfile</td>
|
||||||
|
<td>Password file to read passwords from.</td>
|
||||||
|
<td>No; default is <q>~/.cvspass</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="left">Specific attributes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clientversionproperty</td>
|
||||||
|
<td>Name of a property where the CVS client version should be stored</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>serverversionproperty</td>
|
||||||
|
<td>Name of a property where the CVS server version should be stored</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Find out the CVS client and server versions and store the versions in the properties
|
||||||
|
called <code>apachecvsversion</code> and <code>localcvsversion</code></p>
|
||||||
|
<pre>
|
||||||
|
<cvsversion cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
|
||||||
|
passfile="/home/myself/.cvspass"
|
||||||
|
serverversionproperty="apachecvsversion"
|
||||||
|
clientversionproperty="localcvsversion"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>DefaultExcludes Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="defaultexcludes">DefaultExcludes</h2>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.6</em></p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Alters the default excludes for all subsequent processing in the build, and prints out the
|
||||||
|
current default excludes if desired.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>echo</td>
|
||||||
|
<td>whether or not to print out the default excludes</td>
|
||||||
|
<td><q>true</q> required if no other attribute specified; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>default</td>
|
||||||
|
<td>go back to hard wired default excludes</td>
|
||||||
|
<td><q>true</q> required if no other attribute is specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>add</td>
|
||||||
|
<td>the pattern to add to the default excludes</td>
|
||||||
|
<td>if no other attribute is specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>remove</td>
|
||||||
|
<td>remove the specified pattern from the default excludes</td>
|
||||||
|
<td>if no other attribute is specified</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Print out the default excludes</p>
|
||||||
|
|
||||||
|
<pre><defaultexcludes echo="true"/></pre>
|
||||||
|
|
||||||
|
<p>Print out the default excludes and exclude all <samp>*.bak</samp> files in <strong>all</strong>
|
||||||
|
further processing</p>
|
||||||
|
|
||||||
|
<pre><defaultexcludes echo="true" add="**/*.bak"/></pre>
|
||||||
|
|
||||||
|
<p>Silently allow several fileset based tasks to operate on emacs backup files and then restore
|
||||||
|
normal behavior</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<defaultexcludes remove="**/*~"/>
|
||||||
|
|
||||||
|
(do several fileset based tasks here)
|
||||||
|
|
||||||
|
<defaultexcludes default="true"/></pre>
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>By default the pattern <samp>**/.svn</samp> and <samp>**/.svn/**</samp> are set as default
|
||||||
|
excludes. Since version 1.3, Subversion supports
|
||||||
|
the <a href="https://subversion.apache.org/docs/release-notes/1.3.html#_svn-hack"
|
||||||
|
target="_top">"_svn hack"</a>. That means, that the svn-libraries evaluate environment
|
||||||
|
variables and use <samp>.svn</samp> or <samp>_svn</samp> directory regarding to that value. We had
|
||||||
|
chosen not to evaluate environment variables to get a more reliable build. Instead you have to
|
||||||
|
change the settings by yourself by changing the exclude patterns:</p>
|
||||||
|
<pre>
|
||||||
|
<defaultexcludes remove="**/.svn"/>
|
||||||
|
<defaultexcludes remove="**/.svn/**"/>
|
||||||
|
<defaultexcludes add="**/_svn"/>
|
||||||
|
<defaultexcludes add="**/_svn/**"/>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,198 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Delete Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="delete">Delete</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Deletes a single file, a specified directory and all its files and subdirectories, or a set of
|
||||||
|
files specified by one or more <a href="../Types/resources.html#collection">resource
|
||||||
|
collection</a>s. The literal implication of <code><fileset></code> is that directories are
|
||||||
|
not included; however the removal of empty directories can be triggered when using nested filesets
|
||||||
|
by setting the <var>includeEmptyDirs</var> attribute to <q>true</q>. Note that this attribute is
|
||||||
|
meaningless in the context of any of the various resource collection types that <em>do</em> include
|
||||||
|
directories, but that no attempt will be made to delete non-empty directories in any case. Whether
|
||||||
|
a directory is empty or not is decided by looking into the filesystem—include or exclude
|
||||||
|
patterns don't apply here.</p>
|
||||||
|
<p>If you use this task to delete temporary files created by editors and it doesn't seem to work,
|
||||||
|
read up on the <a href="../dirtasks.html#defaultexcludes">default exclusion set</a>
|
||||||
|
in <strong>Directory-based Tasks</strong>, and see the <code>defaultexcludes</code> attribute
|
||||||
|
below.</p>
|
||||||
|
|
||||||
|
<p>For historical reasons <code><delete dir="x"/></code> is different
|
||||||
|
from <code><delete><fileset dir="x"/></delete></code>; it will try to remove
|
||||||
|
everything inside <q>x</q> including <q>x</q> itself, not taking default excludes into account,
|
||||||
|
blindly following all symbolic links. If you need more control, use a
|
||||||
|
nested <code><fileset></code>.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to delete, specified as either the simple filename (if the file exists in the
|
||||||
|
current base directory), a relative-path filename, or a full-path filename.</td>
|
||||||
|
<td rowspan="2">At least one of the two, unless nested resource collections are specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td class="left">The directory to delete, including all its files and
|
||||||
|
subdirectories.<br/><strong>Note</strong>: <var>dir</var> is <em>not</em> used to specify a
|
||||||
|
directory name for <var>file</var>; <var>file</var> and <var>dir</var> are independent of each
|
||||||
|
other.<br/><strong>Warning</strong>: Do <strong>not</strong> set <var>dir</var>
|
||||||
|
to <q>.</q>, <q>${basedir}</q>, or the full-pathname equivalent unless you
|
||||||
|
truly <em>intend</em> to recursively remove the entire contents of the current base directory
|
||||||
|
(and the base directory itself, if different from the current working directory).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Whether to show the name of each deleted file.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quiet</td>
|
||||||
|
<td>If the specified file or directory does not exist, do not display a diagnostic message
|
||||||
|
(unless Apache Ant has been invoked with the <kbd>-verbose</kbd> or <kbd>-debug</kbd>
|
||||||
|
switches) or modify the exit status to reflect an error. When set to <q>true</q>, if a file
|
||||||
|
or directory cannot be deleted, no error is reported. This setting emulates
|
||||||
|
the <kbd>-f</kbd> option to the Unix <em>rm</em> command. Setting this to <q>true</q>
|
||||||
|
implies setting <var>failonerror</var> to <q>false</q>.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Controls whether an error (such as a failure to delete a file) stops the build or is merely
|
||||||
|
reported to the screen. Only relevant if <code>quiet</code> is <q>false</q>.</td>
|
||||||
|
<td>No; default <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includeemptydirs</td>
|
||||||
|
<td>Whether to delete empty directories when using filesets.</td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Use resource collections. Comma- or space-separated list of
|
||||||
|
patterns of files that must be deleted. All files are relative to the directory specified
|
||||||
|
in <var>dir</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Use resource collections. Name of a file; each line of this
|
||||||
|
file is taken to be an include pattern.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Use resource collections. Comma- or space-separated list of
|
||||||
|
patterns of files that must be excluded from the deletion list. All files are relative to the
|
||||||
|
directory specified in <var>dir</var>.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Use resource collections. Name of a file; each line of this
|
||||||
|
file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Use resource collections. Whether to
|
||||||
|
use <a href="../dirtasks.html#defaultexcludes">default excludes.</a></td>
|
||||||
|
<td>No; default <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>deleteonexit</td>
|
||||||
|
<td>Indicates whether to use <code>File#deleteOnExit()</code> if there is a failure to delete a
|
||||||
|
file. This causes the JVM to attempt to delete the file when the JVM process is
|
||||||
|
terminating. <em>Since Ant 1.6.2</em></td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>removeNotFollowedSymlinks</td>
|
||||||
|
<td>Whether symbolic links (not the files/directories they link to) should be removed if they
|
||||||
|
haven't been followed because <var>followSymlinks</var> was <q>false</q> or the maximum number
|
||||||
|
of symbolic links was too big. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>performGCOnFailedDelete</td>
|
||||||
|
<td>If Ant fails to delete a file or directory it will retry the operation once. If this flag
|
||||||
|
is set to <q>true</q> it will perform a garbage collection before retrying the
|
||||||
|
delete.<br/>Setting this flag to true is known to resolve some problems on Windows (where it
|
||||||
|
defaults to <q>true</q>) but also for directory trees residing on an NFS share. <em>Since Ant
|
||||||
|
1.8.3</em></td>
|
||||||
|
<td>No; default <q>true</q> on Windows and <q>true</q> on any other OS</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Delete the file <samp>/lib/ant.jar</samp>.</p>
|
||||||
|
<pre><delete file="/lib/ant.jar"/></pre>
|
||||||
|
|
||||||
|
<p>Delete the <samp>lib</samp> directory, including all files and subdirectories
|
||||||
|
of <samp>lib</samp>.</p>
|
||||||
|
<pre><delete dir="lib"/></pre>
|
||||||
|
|
||||||
|
<p>Delete all files with the extension <samp>.bak</samp> from the current directory and any
|
||||||
|
subdirectories.</p>
|
||||||
|
<pre>
|
||||||
|
<delete>
|
||||||
|
<fileset dir="." includes="**/*.bak"/>
|
||||||
|
</delete>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Delete all files and subdirectories of <samp>build</samp>, including <samp>build</samp>
|
||||||
|
itself.</p>
|
||||||
|
<pre>
|
||||||
|
<delete includeEmptyDirs="true">
|
||||||
|
<fileset dir="build"/>
|
||||||
|
</delete>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Delete all files and subdirectories of <samp>build</samp>, without <samp>build</samp> itself.</p>
|
||||||
|
<pre>
|
||||||
|
<delete includeemptydirs="true">
|
||||||
|
<fileset dir="build" includes="**/*"/>
|
||||||
|
</delete>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Delete the Subversion metadata directories under <samp>src</samp>. Because <samp>.svn</samp> is
|
||||||
|
on of the <a href="../dirtasks.html#defaultexcludes">default excludes</a> you have to use
|
||||||
|
the <var>defaultexcludes</var> flag, otherwise Ant won't delete these directories and the files in
|
||||||
|
it.</p>
|
||||||
|
<pre>
|
||||||
|
<delete includeemptydirs="true">
|
||||||
|
<fileset dir="src" includes="**/.svn/" defaultexcludes="false"/>
|
||||||
|
</delete>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Deltree Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="deltree">Deltree</h2>
|
||||||
|
<h3><em><u>Deprecated</u></em></h3>
|
||||||
|
<p><em>This task has been <u>deprecated</u>. Use the <code>Delete</code> task instead.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Deletes a directory with all its files and subdirectories.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>the directory to delete.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Delete the directory <samp>dist</samp>, including its files and subdirectories.</p>
|
||||||
|
<pre><deltree dir="dist"/></pre>
|
||||||
|
|
||||||
|
<p>Delete the directory <samp>${dist}</samp>, including its files and subdirectories.</p>
|
||||||
|
<pre><deltree dir="${dist}"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,194 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Depend Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>Depend</h2>
|
||||||
|
|
||||||
|
<p>A task to manage Java class file dependencies.</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>The <code>depend</code> task works by determining which classes are out of date with respect to
|
||||||
|
their source and then removing the class files of any other classes which depend on the out-of-date
|
||||||
|
classes.</p>
|
||||||
|
|
||||||
|
<p>To determine the class dependencies, the <code>depend</code> task analyzes the class files of all
|
||||||
|
class files passed to it. The task does not parse your source code in any way but relies upon the
|
||||||
|
class references encoded into the class files by the compiler. This is generally faster than parsing
|
||||||
|
the Java source files.</p>
|
||||||
|
|
||||||
|
<p>To learn more about how this information is obtained from the class files, please refer
|
||||||
|
to <a href="https://docs.oracle.com/javase/specs/" target="_top">the Java Virtual Machine
|
||||||
|
Specification</a></p>
|
||||||
|
|
||||||
|
<p>Since a class' dependencies only change when the class itself changes, the
|
||||||
|
<code>depend</code> task is able to cache dependency information. Only those class files which have
|
||||||
|
changed will have their dependency information re-analysed. Note that if you change a class'
|
||||||
|
dependencies by changing the source, it will be recompiled anyway. You can examine the dependency
|
||||||
|
files created to understand the dependencies of your classes. Please do not rely, however, on the
|
||||||
|
format of the information, as it may change in a later release.</p>
|
||||||
|
|
||||||
|
<p>Once <code>depend</code> discovers all of the class dependencies, it "inverts" this
|
||||||
|
relation to determine, for each class, which other classes are dependent upon it. This
|
||||||
|
"affects" list is used to discover which classes are invalidated by the out of date
|
||||||
|
class. The class files of the invalidated classes are removed, triggering the compilation of the
|
||||||
|
affected classes.</p>
|
||||||
|
|
||||||
|
<p>The <code>depend</code> task supports an attribute, <var>closure</var>, which controls
|
||||||
|
whether <code>depend</code> will only consider direct class-class relationships or whether it will
|
||||||
|
also consider transitive, indirect relationships. For example, say there are three classes, A, which
|
||||||
|
depends on B, which in-turn depends on C. Now say that class C is out of
|
||||||
|
date. Without <var>closure</var>, only class B would be removed
|
||||||
|
by <code>depend</code>. With <var>closure</var> set, class A would also be removed. Normally direct
|
||||||
|
relationships are sufficient—it is unusual for a class to depend on another without having a
|
||||||
|
direct relationship. With <var>closure</var> set, you will notice that <code>depend</code> typically
|
||||||
|
removes far more class files.</p>
|
||||||
|
|
||||||
|
<p>The <var>classpath</var> attribute for <code><depend></code> is optional. If it is
|
||||||
|
present, <code>depend</code> will check class dependencies against classes and jars on this
|
||||||
|
classpath. Any classes which depend on an element from this classpath and which are older than that
|
||||||
|
element will be deleted. A typical example where you would use this facility would be where you are
|
||||||
|
building a utility jar and want to make sure classes which are out of date with respect to this jar
|
||||||
|
are rebuilt. In this classpath, you should <strong>not</strong> include jars that you do not expect
|
||||||
|
to change, such as the JDK runtime jar or third party jars, since doing so will just slow down the
|
||||||
|
dependency check. This means that if you do use a classpath for the <code>depend</code> task it may
|
||||||
|
be different from the classpath necessary to actually compile your code.</p>
|
||||||
|
|
||||||
|
<h3>Performance</h3>
|
||||||
|
|
||||||
|
<p>The performance of the <code>depend</code> task is dependent on a number of factors such as class
|
||||||
|
relationship complexity and how many class files are out of date. The decision about whether it is
|
||||||
|
cheaper to just recompile all classes or to use the <code>depend</code> task will depend on the size
|
||||||
|
of your project and how interrelated your classes are.</p>
|
||||||
|
|
||||||
|
<h3>Limitations</h3>
|
||||||
|
|
||||||
|
<p>There are some source dependencies which <code>depend</code> will not detect:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>If the Java compiler optimizes away a class relationship, there can be a source dependency
|
||||||
|
without a class dependency.</li>
|
||||||
|
|
||||||
|
<li>Non-public classes cause two problems. Firstly, depend cannot relate the class file to a source
|
||||||
|
file. In the future this may be addressed using the source file attribute in the
|
||||||
|
classfile. Secondly, neither <code>depend</code> nor the compiler tasks can detect when a non-public
|
||||||
|
class is missing. Inner classes are handled by the <code>depend</code> task.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>The most obvious example of these limitations is that the task can't tell which classes to
|
||||||
|
recompile when a constant primitive data type exported by other classes is changed. For example, a
|
||||||
|
change in the definition of something like</p>
|
||||||
|
<pre>
|
||||||
|
public final class Constants {
|
||||||
|
public final static boolean DEBUG=false;
|
||||||
|
}</pre>
|
||||||
|
<p>will not be picked up by other classes.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>srcDir</td>
|
||||||
|
<td>This is the directory where the source exists. <code>depend</code> will examine this to
|
||||||
|
determine which classes are out of date. If you use multiple source directories you can pass
|
||||||
|
this attribute a path of source directories.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destDir</td>
|
||||||
|
<td>This is the root directory of the class files which will be analysed.</td>
|
||||||
|
<td>No; defaults to <var>srcdir</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cache</td>
|
||||||
|
<td>This is a directory in which <code>depend</code> can store and retrieve dependency
|
||||||
|
information.</td>
|
||||||
|
<td>No; defaults to no cache</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>closure</td>
|
||||||
|
<td>This attribute controls whether <code>depend</code> only removes classes which directly
|
||||||
|
depend on out of date classes. If this is set to <q>true</q>, <code>depend</code> will
|
||||||
|
traverse the class dependency graph deleting all affected classes.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dump</td>
|
||||||
|
<td>If true the dependency information will be written to the debug level log</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>The classpath containing jars and classes for which <code><depend></code> should also
|
||||||
|
check dependencies</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>warnOnRmiStubs</td>
|
||||||
|
<td>Flag to disable warnings about files that look like <kbd>rmic</kbd> generated
|
||||||
|
stub/skeleton classes and have no <samp>.java</samp> source. Useful when doing RMI
|
||||||
|
development.</td>
|
||||||
|
<td>No; default <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<p>The <code>depend</code> task's <var>classpath</var> attribute is
|
||||||
|
a <a href="../using.html#path">path-like structure</a> and can also be set via a
|
||||||
|
nested <code><classpath></code> element.</p>
|
||||||
|
|
||||||
|
<p>Additionally, this task forms an implicit <a href="../Types/fileset.html">FileSet</a> and
|
||||||
|
supports most attributes of <code><fileset></code> (<var>dir</var> becomes <var>srcdir</var>),
|
||||||
|
as well as the nested <code><include></code>, <code><exclude></code>,
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Remove any classes in the <samp>${build.classes}</samp> directory that depend on out-of-date
|
||||||
|
classes. Classes are considered out-of-date with respect to the source in
|
||||||
|
the <samp>${java.dir}</samp> directory, using the same mechanism as the <code><javac></code>
|
||||||
|
task. In this example, the <code><depend></code> task caches its dependency information in
|
||||||
|
the <samp>depcache</samp> directory.</p>
|
||||||
|
<pre>
|
||||||
|
<depend srcdir="${java.dir}"
|
||||||
|
destdir="${build.classes}"
|
||||||
|
cache="depcache"
|
||||||
|
closure="yes"/></pre>
|
||||||
|
|
||||||
|
<p>Do the same as the previous example, but explicitly include all <samp>.java</samp> files, except
|
||||||
|
those that match the list given in <samp>${java.dir}/build_excludes</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<depend srcdir="${java.dir}" destdir="${build.classes}"
|
||||||
|
cache="depcache" closure="yes">
|
||||||
|
<include name="**/*.java"/>
|
||||||
|
<excludesfile name="${java.dir}/build_excludes"/>
|
||||||
|
</depend></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,142 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>DependSet Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>DependSet</h2>
|
||||||
|
|
||||||
|
A task to manage arbitrary dependencies between resources.
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>The <code>dependset</code> task compares a set of sources with a set of target files. If any of
|
||||||
|
the sources has been modified more recently than any of the target files, all of the target files
|
||||||
|
are removed.</p>
|
||||||
|
<p>Sources and target files are specified via
|
||||||
|
nested <a href="../Types/resources.html#collection">resource collections</a>; sources can be
|
||||||
|
resources of any type, while targets are restricted to files only. At least one set of sources and
|
||||||
|
one set of targets is required.</p>
|
||||||
|
<p>Use a FileSet when you want to use wildcard include or exclude patterns and don't care about
|
||||||
|
missing files. Use a FileList when you want to consider the non-existence of a file as if it were
|
||||||
|
out of date. If there are any non-existing files in any source or target FileList, all target files
|
||||||
|
will be removed.</p>
|
||||||
|
<p>DependSet is useful to capture dependencies that are not or cannot be determined algorithmically.
|
||||||
|
For example, the <code><style></code> task only compares the source XML file and XSLT
|
||||||
|
stylesheet against the target file to determined whether to restyle the source.
|
||||||
|
Using <code>dependset</code> you can extend this dependency checking to include a DTD or XSD file as
|
||||||
|
well as other stylesheets imported by the main stylesheet.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Makes the task list all deleted targets files and the reason why they get deleted.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>sources</h4>
|
||||||
|
|
||||||
|
<p>The <code><sources></code> element is a <a href="../Types/resources.html#union">Union</a>
|
||||||
|
into which arbitrary resource collections can be nested. <em>Since Apache Ant 1.7</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4>srcfileset</h4>
|
||||||
|
|
||||||
|
<p>The nested <code><srcfileset></code> element specifies
|
||||||
|
a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will be compared
|
||||||
|
against all files included in all of the <code><targetfileset></code> filesets
|
||||||
|
and <code><targetfilelist></code> filelists. Multiple <code><srcfileset></code>
|
||||||
|
filesets may be specified.</p>
|
||||||
|
|
||||||
|
<h4>srcfilelist</h4>
|
||||||
|
|
||||||
|
<p>The nested <code><srcfilelist></code> element specifies
|
||||||
|
a <a href="../Types/filelist.html">FileList</a>. All files included in this filelist will be
|
||||||
|
compared against all files included in all of the <code><targetfileset></code> filesets
|
||||||
|
and <code><targetfilelist></code> filelists. Multiple <code><srcfilelist></code>
|
||||||
|
filelists may be specified.</p>
|
||||||
|
|
||||||
|
<h4>targets</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7</em></p>
|
||||||
|
|
||||||
|
<p>The <code><targets></code> element is a <a href="../using.html#path">Path</a> and thus can
|
||||||
|
include any filesystem-based resource.</p>
|
||||||
|
|
||||||
|
<h4>targetfileset</h4>
|
||||||
|
|
||||||
|
<p>The nested <code><targetfileset></code> element specifies
|
||||||
|
a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will be compared
|
||||||
|
against all files included in all of the <code><srcfileset></code> filesets
|
||||||
|
and <code><sourcefilelist></code> filelists, and if any are older, they are all deleted.
|
||||||
|
Multiple <code><targetfileset></code> filesets may be specified.</p>
|
||||||
|
|
||||||
|
<h4>targetfilelist</h4>
|
||||||
|
|
||||||
|
<p>The nested <code><targetfilelist></code> element specifies
|
||||||
|
a <a href="../Types/filelist.html">FileList</a>. All files included in this filelist will be
|
||||||
|
compared against all files included in all of the <code><srcfileset></code> filesets
|
||||||
|
and <code><sourcefilelist></code> filelists, and if any are older, they are all deleted.
|
||||||
|
Multiple <code><targetfilelist></code> filelists may be specified.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Remove derived HTML files in the ${output.dir} directory if they are out-of-date with respect
|
||||||
|
to:</p>
|
||||||
|
<ol>
|
||||||
|
<li>the DTD of their source XML files</li>
|
||||||
|
<li>a common DTD (imported by the main DTD)</li>
|
||||||
|
<li>a subordinate XSLT stylesheet (imported by the main stylesheet), or</li>
|
||||||
|
<li>the buildfile</li>
|
||||||
|
</ol>
|
||||||
|
<pre>
|
||||||
|
<dependset>
|
||||||
|
<srcfilelist
|
||||||
|
dir = "${dtd.dir}"
|
||||||
|
files = "paper.dtd,common.dtd"/>
|
||||||
|
<srcfilelist
|
||||||
|
dir = "${xsl.dir}"
|
||||||
|
files = "common.xsl"/>
|
||||||
|
<srcfilelist
|
||||||
|
dir = "${basedir}"
|
||||||
|
files = "build.xml"/>
|
||||||
|
<targetfileset
|
||||||
|
dir = "${output.dir}"
|
||||||
|
includes = "**/*.html"/>
|
||||||
|
</dependset></pre>
|
||||||
|
|
||||||
|
<p>If any of the sources in the above example does not exist, all target files will also be
|
||||||
|
removed. To ignore missing sources instead, use filesets instead of filelists for the sources.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,42 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Diagnostics Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="diagnostics">Diagnostics</h2>
|
||||||
|
<p><em>Since Ant 1.7.0</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Runs Apache Ant's <kbd>-diagnostics</kbd> code inside Ant itself. This is good for debugging
|
||||||
|
Ant's configuration under an IDE.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Print out the current diagnostics dump.</p>
|
||||||
|
<pre>
|
||||||
|
<target name="diagnostics" description="diagnostics">
|
||||||
|
<diagnostics/>
|
||||||
|
</target></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Dirname Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="echo">Dirname</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to determine the directory path of a specified file.</p>
|
||||||
|
<p>When this task executes, it will set the specified property to the value of the specified file
|
||||||
|
(or directory) up to, but not including, the last path element. If the specified file is a path that
|
||||||
|
ends in a filename, the filename will be dropped. If the specified file is just a filename, the
|
||||||
|
directory will be the current directory.</p>
|
||||||
|
<p><strong>Note</strong>: This is not the same as the UNIX <code>dirname</code> command, which is
|
||||||
|
defined as "strip non-directory suffix from filename". <code><dirname></code> determines the
|
||||||
|
full directory path of the specified file.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The path to take the dirname of.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of the property to set.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Set <code>antfile.dir</code> to the directory path for <samp>${ant.file}</samp>.</p>
|
||||||
|
<pre><dirname property="antfile.dir" file="${ant.file}"/></pre>
|
||||||
|
|
||||||
|
<p>Set <code>foo.dirname</code> to the project's <var>basedir</var>.</p>
|
||||||
|
<pre><dirname property="foo.dirname" file="foo.txt"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,276 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>EAR Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="ear">Ear</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>An extension of the <a href="jar.html">Jar</a> task with special treatment for files that should
|
||||||
|
end up in an Enterprise Application archive.</p>
|
||||||
|
<p>(The <code>Ear</code> task is a shortcut for specifying the particular layout of a EAR file. The
|
||||||
|
same thing can be accomplished by using the <var>prefix</var> and <var>fullpath</var> attributes of
|
||||||
|
zipfilesets in a <code>Zip</code> or <code>Jar</code> task.)</p>
|
||||||
|
<p>The extended zipfileset element from the <code>Zip</code> task (with
|
||||||
|
attributes <var>prefix</var>, <var>fullpath</var>, and <var>src</var>) is available in
|
||||||
|
the <code>Ear</code> task.</p>
|
||||||
|
|
||||||
|
<p><strong>Please note that the zip format allows multiple files of the same fully-qualified name to
|
||||||
|
exist within a single archive. This has been documented as causing various problems for
|
||||||
|
unsuspecting users. If you wish to avoid this behavior you must set the <var>duplicate</var>
|
||||||
|
attribute to a value other than its default, <q>add</q>.</strong></p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>the EAR file to create.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>appxml</td>
|
||||||
|
<td>The deployment descriptor to use (<samp>META-INF/application.xml</samp>).</td>
|
||||||
|
<td>Yes, unless <var>update</var> is set to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>basedir</td>
|
||||||
|
<td>the directory from which to jar the files.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compress</td>
|
||||||
|
<td>Not only store data but also compress them. Unless you set the <var>keepcompression</var>
|
||||||
|
attribute to <q>false</q>, this will apply to the entire archive, not only the files you've
|
||||||
|
added while updating.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keepcompression</td>
|
||||||
|
<td>For entries coming from existing archives (like nested <code>zipfileset</code>s or while
|
||||||
|
updating the archive), keep the compression as it has been originally instead of using the
|
||||||
|
<var>compress</var> attribute. <em>Since Apache Ant 1.6</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>The character encoding to use for filenames inside the archive. <strong>It is not
|
||||||
|
recommended to change this value as the created archive will most likely be unreadable for
|
||||||
|
Java otherwise.</strong> <br/>See also the <a href="zip.html#encoding">discussion in the zip
|
||||||
|
task page</a></td>
|
||||||
|
<td>No; defaults to <q>UTF8</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filesonly</td>
|
||||||
|
<td>Store only file entries.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>manifest</td>
|
||||||
|
<td>the manifest file to use.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filesetmanifest</td>
|
||||||
|
<td>behavior when a manifest file is found in a <code>zipfileset</code>
|
||||||
|
or <code>zipgroupfileset</code> file. Valid values are <q>skip</q>, <q>merge</q>,
|
||||||
|
and <q>mergewithoutmain</q>. <q>merge</q> will merge all of the manifests together, and merge
|
||||||
|
this into any other specified manifests. <q>mergewithoutmain</q> merges everything but the
|
||||||
|
Main section of the manifests.</td>
|
||||||
|
<td>No; defaults to <q>skip</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>whenmanifestonly</td>
|
||||||
|
<td>behavior when no files match. Valid values are <q>fail</q>, <q>skip</q>,
|
||||||
|
and <q>create</q>.</td>
|
||||||
|
<td>No; defaults to <q>create</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>manifestencoding</td>
|
||||||
|
<td>The encoding used to read the JAR manifest, when a manifest file is specified.</td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>index</td>
|
||||||
|
<td>whether to create
|
||||||
|
an <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR_Index"
|
||||||
|
target="_top">index list</a> to speed up classloading. Unless you specify additional jars with
|
||||||
|
nested <a href="jar.html#indexjars"><code>indexjars</code></a> elements, only the contents of
|
||||||
|
this jar will be included in the index.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>indexMetaInf</td>
|
||||||
|
<td>whether to include <samp>META-INF</samp> and its children in the index. Doesn't have any
|
||||||
|
effect if <var>index</var> is false.<br/>Oracle's jar implementation used to skip
|
||||||
|
the <samp>META-INF</samp> directory and Ant followed that example. The behavior has been
|
||||||
|
changed with <a href="https://bugs.openjdk.java.net/browse/JDK-4408526" target="_top">Java
|
||||||
|
5</a>. In order to avoid problems with Ant generated jars on Java 1.4 or earlier, Ant will
|
||||||
|
not include <samp>META-INF</samp> unless explicitly asked to.<br/><em>Since Ant
|
||||||
|
1.8.0</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>update</td>
|
||||||
|
<td>indicates whether to update or overwrite the destination file if it already exists.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>duplicate</td>
|
||||||
|
<td>behavior when a duplicate file is found. Valid values are <q>add</q>, <q>preserve</q>,
|
||||||
|
and <q>fail</q>.</td>
|
||||||
|
<td>No; default is <q>add</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>roundup</td>
|
||||||
|
<td>Whether the file modification times will be rounded up to the next even number of
|
||||||
|
seconds.<br/>Zip archives store file modification times with a granularity of 2 seconds, so
|
||||||
|
the times will either be rounded up or down. If you round down, the archive will always seem
|
||||||
|
out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a
|
||||||
|
different type of problems like JSPs inside a web archive that seem to be slightly more recent
|
||||||
|
than precompiled pages, rendering precompilation useless.<br/><em>Since Ant 1.6.2</em></td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>level</td>
|
||||||
|
<td>Non-default level at which file compression should be performed. Valid values range
|
||||||
|
from <q>0</q> (no compression/fastest) to <q>9</q> (maximum compression/slowest). <em>Since Ant
|
||||||
|
1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preserve0permissions</td>
|
||||||
|
<td>when updating an archive or adding entries from a different archive Ant will assume that a
|
||||||
|
Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means
|
||||||
|
that the permissions haven't been stored at all rather than real permissions and will instead
|
||||||
|
apply its own default values.<br/> Set this attribute to <q>true</q> if you really want to
|
||||||
|
preserve the original permission field. <em>Since Ant 1.8.0</em>
|
||||||
|
</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useLanguageEncodingFlag</td>
|
||||||
|
<td>Whether to set the language encoding flag if the encoding is UTF-8. This setting doesn't
|
||||||
|
have any effect if the encoding is not UTF-8. <em>Since Ant 1.8.0</em>.<br/>See also
|
||||||
|
the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>createUnicodeExtraFields</td>
|
||||||
|
<td>Whether to create Unicode extra fields to store the file names a second time inside the
|
||||||
|
entry's metadata.<br/>Possible values are <q>never</q>, <q>always</q>
|
||||||
|
and <q>not-encodeable</q> which will only add Unicode extra fields if the file name cannot be
|
||||||
|
encoded using the specified encoding. <em>Since Ant 1.8.0</em>. <br/>See also
|
||||||
|
the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; default is <q>never</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fallbacktoUTF8</td>
|
||||||
|
<td>Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a
|
||||||
|
file name cannot be encoded using the specified encoding. <em>Since Ant 1.8.0</em>.<br/>See
|
||||||
|
also the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mergeClassPathAttributes</td>
|
||||||
|
<td>Whether to merge the <code>Class-Path</code> attributes found in different manifests (if
|
||||||
|
merging manifests). If <q>false</q>, only the attribute of the last merged manifest will be
|
||||||
|
preserved. <em>Since Ant 1.8.0</em>.<br/>unless you also set <var>flattenAttributes</var>
|
||||||
|
to <q>true</q> this may result in manifests containing multiple <code>Class-Path</code>
|
||||||
|
attributes which violates the manifest specification.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>flattenAttributes</td>
|
||||||
|
<td>Whether to merge attributes occurring more than once in a section (this can only happen for
|
||||||
|
the <code>Class-Path</code> attribute) into a single attribute. <em>Since Ant
|
||||||
|
1.8.0</em>.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>zip64Mode</td>
|
||||||
|
<td>When to use Zip64 extensions for entries. The possible values
|
||||||
|
are <q>never</q>, <q>always</q> and <q>as-needed</q>. <em>Since Ant 1.9.1</em>.<br/>See also
|
||||||
|
the <a href="zip.html#zip64">discussion in the zip task page</a></td>
|
||||||
|
<td>No; default is <q>never</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top">modificationtime</td>
|
||||||
|
<td valign="top">Set all stored file modification times to the
|
||||||
|
given time. This can either be a number interpreted as
|
||||||
|
milliseconds since 1970-01-01T00:00:00Z or a string that can be
|
||||||
|
parsed as a ISO 8601 timestamp with optional timezone.
|
||||||
|
<em>Since Ant 1.10.2</em>.
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="top">No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>metainf</h4>
|
||||||
|
<p>The nested <code>metainf</code> element specifies
|
||||||
|
a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will end up in
|
||||||
|
the <samp>META-INF</samp> directory of the ear file. If this fileset includes a file
|
||||||
|
named <samp>MANIFEST.MF</samp>, the file is ignored and you will get a warning.</p>
|
||||||
|
|
||||||
|
<h4>manifest, indexjars, service</h4>
|
||||||
|
<p>These are inherited from <a href="jar.html"><jar></a></p>
|
||||||
|
|
||||||
|
<h3>Example</h3>
|
||||||
|
<pre>
|
||||||
|
<ear destfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml">
|
||||||
|
<fileset dir="${build.dir}" includes="*.jar,*.war"/>
|
||||||
|
</ear></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,174 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Echo Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="echo">Echo</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Echoes a message to the current loggers and listeners which means <code>System.out</code> unless
|
||||||
|
overridden. A <var>level</var> can be specified, which controls at what logging level the message is
|
||||||
|
filtered at.</p>
|
||||||
|
<p>The task can also echo to a file, in which case the option to append rather than overwrite the
|
||||||
|
file is available, and the <var>level</var> option is ignored</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>message</td>
|
||||||
|
<td>the message to echo.</td>
|
||||||
|
<td>No; defaults to a blank line unless text is included in a character section within this
|
||||||
|
element</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>the file to write the message to.</td>
|
||||||
|
<td rowspan="2">No; only one of these may be used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td class="left">the <a href="../Types/resources.html">Resource</a>
|
||||||
|
to write the message to (see <a href="../develop.html#set-magic">note</a>).
|
||||||
|
<em>Since Apache Ant 1.8</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>Append to an existing file
|
||||||
|
(or <a href="https://docs.oracle.com/javase/8/docs/api//java/io/FileWriter.html#FileWriter-java.lang.String-boolean-"
|
||||||
|
target="_top"> open a new file / overwrite an existing file</a>)?
|
||||||
|
</td>
|
||||||
|
<td>No; ignored unless <var>output</var> indicates a filesystem destination, default
|
||||||
|
is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>level</td>
|
||||||
|
<td>Control the level at which this message is reported. One
|
||||||
|
of <q>error</q>, <q>warning</q>, <q>info</q>, <q>verbose</q>, <q>debug</q> (decreasing
|
||||||
|
order)</td>
|
||||||
|
<td>No; default is <q>warning</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>encoding to use. <em>since Ant 1.7</em></td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>force</td>
|
||||||
|
<td>Overwrite read-only destination files. <em>since Ant 1.8.2</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Basic use:</p>
|
||||||
|
<pre><echo message="Hello, world"/></pre>
|
||||||
|
<pre><echo message="Embed a line break:${line.separator}"/></pre>
|
||||||
|
<pre><echo>Embed another:${line.separator}</echo></pre>
|
||||||
|
<pre><echo>This is a longer message stretching over
|
||||||
|
two lines.
|
||||||
|
</echo></pre>
|
||||||
|
|
||||||
|
<p>The newline immediately following the <code><echo></code> tag is part of the
|
||||||
|
output. Newlines in character data within the content of an element are not discarded by XML
|
||||||
|
parsers.<br/>See <a href="https://www.w3.org/TR/xml/#sec-line-ends" target="_top">W3C Recommendation
|
||||||
|
26 November 2008 / End of Line handling</a> for more details.</p>
|
||||||
|
<pre><echo>
|
||||||
|
This is a longer message stretching over
|
||||||
|
three lines; the first line is a blank
|
||||||
|
</echo></pre>
|
||||||
|
|
||||||
|
<p>A message which only appears in <kbd>-debug</kbd> mode.</p>
|
||||||
|
<pre><echo message="Deleting drive C:" level="debug"/></pre>
|
||||||
|
|
||||||
|
<p>A message which appears even in <kbd>-quiet</kbd> mode.</p>
|
||||||
|
<pre><echo level="error">
|
||||||
|
Imminent failure in the antimatter containment facility.
|
||||||
|
Please withdraw to safe location at least 50km away.
|
||||||
|
</echo></pre>
|
||||||
|
|
||||||
|
<p>Generate a shell script by echoing to a file. Note the use of a double <q>$</q> symbol to stop
|
||||||
|
Ant filtering out the single <q>$</q> during variable expansion.</p>
|
||||||
|
<pre><echo file="runner.csh" append="false">#\!/bin/tcsh
|
||||||
|
java-1.3.1 -mx1024m ${project.entrypoint} $$*
|
||||||
|
</echo></pre>
|
||||||
|
|
||||||
|
<p>Depending on the log level Ant runs at, messages are print out or silently ignored:</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Ant command line</th>
|
||||||
|
<th scope="col"><kbd>-quiet</kbd>, <kbd>-q</kbd></th>
|
||||||
|
<th scope="col"><em>no switch</em></th>
|
||||||
|
<th scope="col"><kbd>-verbose</kbd>, <kbd>-v</kbd></th>
|
||||||
|
<th scope="col"><kbd>-debug</kbd>, <kbd>-d</kbd></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is error message." level="error"/></pre></td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is warning message."/></pre></td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is warning message." level="warning"/></pre></td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is info message." level="info"/></pre></td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is verbose message." level="verbose"/></pre></td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>ok</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><pre><echo message="This is debug message." level="debug"/></pre></td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>not logged</td>
|
||||||
|
<td>ok</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,124 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Echoproperties Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="echoproperties">echoproperties</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Displays all the current properties (or a subset of them specified by a
|
||||||
|
nested <code><propertyset></code>) in the project. The output can be sent to a file if
|
||||||
|
desired. This task can be used as a somewhat contrived means of returning data from an
|
||||||
|
<kbd>ant</kbd> invocation, but is really for debugging build
|
||||||
|
files.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>If specified, the value indicates the name of the file to send the output of the statement
|
||||||
|
to. The generated output file is compatible for loading by any Java application as a property
|
||||||
|
file.</td>
|
||||||
|
<td>No; by default, output to the log</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td>a prefix which is used to filter the properties: only properties whose names start with this
|
||||||
|
prefix will be echoed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>regex</td>
|
||||||
|
<td>a regular expression which is used to filter the properties: only those properties whose
|
||||||
|
names match it will be echoed.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>If an error occurs while writing the properties to a file, and this attribute is enabled,
|
||||||
|
then a <code>BuildException</code> will be thrown, causing the build to fail. If disabled,
|
||||||
|
then IO errors will be reported as a log statement, and the build will continue without
|
||||||
|
failure from this task.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>format</td>
|
||||||
|
<td>One of <q>text</q> or <q>xml</q>. Determines the output format.</td>
|
||||||
|
<td>No; defaults to <q>text</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>propertyset</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify subsets of properties to be echoed
|
||||||
|
with <a href="../Types/propertyset.html">propertyset</a>s. Using <code>propertyset</code>s gives
|
||||||
|
more control on which properties will be picked up. The attributes <var>prefix</var>
|
||||||
|
and <var>regex</var> are just shortcuts that use <code>propertyset</code>s internally.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Report the current properties to the log.</p>
|
||||||
|
<pre><echoproperties/></pre>
|
||||||
|
|
||||||
|
<p>Report the current properties to the file <samp>my.properties</samp>, and fail the build if the
|
||||||
|
file could not be created or written to.</p>
|
||||||
|
<pre><echoproperties destfile="my.properties"/></pre>
|
||||||
|
|
||||||
|
<p>Report the current properties to the file <samp>my.properties</samp>, and log a message if the
|
||||||
|
file could not be created or written to, but still allow the build to continue.</p>
|
||||||
|
<pre><echoproperties destfile="my.properties" failonerror="false"/></pre>
|
||||||
|
|
||||||
|
<p>List all properties beginning with <samp>java.</samp></p>
|
||||||
|
<pre><echoproperties prefix="java."/></pre>
|
||||||
|
|
||||||
|
<p>Lists all properties beginning with <samp>java.</samp> using a
|
||||||
|
nested <code><propertyset/></code> which is an equivalent but longer way.</p>
|
||||||
|
<pre>
|
||||||
|
<echoproperties>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref prefix="java."/>
|
||||||
|
</propertyset>
|
||||||
|
</echoproperties></pre>
|
||||||
|
|
||||||
|
<p>Lists all properties that contain <samp>ant</samp> in their names.</p>
|
||||||
|
<pre><echoproperties regex=".*ant.*"/></pre>
|
||||||
|
|
||||||
|
<p>The equivalent snippet with <code><propertyset/></code> is:</p>
|
||||||
|
<pre>
|
||||||
|
<echoproperties>
|
||||||
|
<propertyset>
|
||||||
|
<propertyref regex=".*ant.*"/>
|
||||||
|
</propertyset>
|
||||||
|
</echoproperties></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>EchoXML Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>EchoXML</h2>
|
||||||
|
<p><em>Since Apache Ant 1.7</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Echo nested XML to the console or a file.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to receive the XML.</td>
|
||||||
|
<td>No; by default nested XML is echoed to the log</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>Whether to append <var>file</var>, if specified.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>namespacePolicy</td>
|
||||||
|
<td>Sets the namespace policy as defined
|
||||||
|
by <code>org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy</code>. Valid values
|
||||||
|
are <q>ignore</q>, <q>elementsOnly</q>, or <q>all</q>. <em>Since Apache Ant 1.8</em></td>
|
||||||
|
<td>No; default <q>ignore</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<p>Nested XML content is required.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Create an Ant buildfile, <samp>subbuild.xml</samp>.</p>
|
||||||
|
<pre><echoxml file="subbuild.xml">
|
||||||
|
<project default="foo">
|
||||||
|
<target name="foo">
|
||||||
|
<echo>foo</echo>
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
|
</echoxml></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,406 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Exec Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="exec">Exec</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Executes a system command. When the <var>os</var> attribute is specified, then the command is
|
||||||
|
only executed when Apache Ant is run on one of the specified operating systems.</p>
|
||||||
|
|
||||||
|
<p>Note that you cannot interact with the forked program, the only way to send input to it is via
|
||||||
|
the input and inputstring attributes. Also note that <em>since Ant 1.6</em>, any attempt to read
|
||||||
|
input in the forked program will receive an EOF (<q>-1</q>). This is a change from Ant 1.5, where
|
||||||
|
such an attempt would block.</p>
|
||||||
|
|
||||||
|
<p>If you want to execute an executable using a path relative to the project's <var>basedir</var>,
|
||||||
|
you may need to use <var>vmlauncher</var>=<q>false</q> on some operating systems—but even this
|
||||||
|
may fail (Solaris 8/9 has been reported as problematic). The <var>resolveexecutable</var> attribute
|
||||||
|
should be more reliable, as would be something like</p>
|
||||||
|
<pre>
|
||||||
|
<property name="executable-full-path"
|
||||||
|
location="../relative/path/to/executable"/>
|
||||||
|
<exec executable="${executable-full-path}" ...</pre>
|
||||||
|
|
||||||
|
<h4>Windows Users</h4>
|
||||||
|
<p>The <code><exec></code> task delegates to <code>Runtime.exec</code> which in turn
|
||||||
|
apparently
|
||||||
|
calls <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx"
|
||||||
|
target="_top"><code>::CreateProcess</code></a>. It is the latter Win32 function that defines the
|
||||||
|
exact semantics of the call. In particular, if you do not put a file extension on the executable,
|
||||||
|
only <samp>.EXE</samp> files are looked for, not <samp>.COM</samp>, <samp>.CMD</samp> or other file
|
||||||
|
types listed in the environment variable <code>PATHEXT</code>. That is only used by the shell.</p>
|
||||||
|
<p>Note that <samp>.bat</samp> files cannot in general by executed directly. One normally needs to
|
||||||
|
execute the command shell executable <kbd>cmd</kbd> using the <kbd>/c</kbd> switch.</p>
|
||||||
|
<pre>
|
||||||
|
<target name="help">
|
||||||
|
<exec executable="cmd">
|
||||||
|
<arg value="/c"/>
|
||||||
|
<arg value="ant.bat"/>
|
||||||
|
<arg value="-p"/>
|
||||||
|
</exec>
|
||||||
|
</target></pre>
|
||||||
|
|
||||||
|
<p>A common problem is not having the executable on the <code>PATH</code>. In case you get an error
|
||||||
|
message <code class="output">Cannot run program "...":CreateProcess error=2. The system cannot find
|
||||||
|
the path specified.</code> have a look at your <code>PATH</code> variable. Just type the command
|
||||||
|
directly on the command line and if Windows finds it, Ant should do it too. (Otherwise ask on the
|
||||||
|
user mailinglist for help.) If Windows can not execute the program, add the directory of the program
|
||||||
|
to the <code>PATH</code> (<code>set PATH=%PATH%;dirOfProgram</code>) or specify the absolute path in
|
||||||
|
the <var>executable</var> attribute in your buildfile.</p>
|
||||||
|
|
||||||
|
<h4>Cygwin Users</h4>
|
||||||
|
<p>The <code><exec></code> task will not understand paths such as <q>/bin/sh</q> for
|
||||||
|
the <var>executable</var> parameter. This is because JVM in which Ant is running is a standard
|
||||||
|
Windows executable and is not aware of the Cygwin environment (i.e., doesn't
|
||||||
|
load <samp>cygwin1.dll</samp>). The only work-around for this is to compile a JVM under Cygwin (at
|
||||||
|
your own risk). See for
|
||||||
|
instance <a href="https://cdn.rawgit.com/AdoptOpenJDK/openjdk-jdk9/dev/common/doc/building.html#cygwin"
|
||||||
|
target="_top">OpenJDK build instructions for cygwin</a>.</p>
|
||||||
|
|
||||||
|
<h4>OpenVMS Users</h4>
|
||||||
|
<p>The command specified using <var>executable</var> and <code><arg></code> elements is
|
||||||
|
executed exactly as specified inside a temporary DCL script. This has some implications:</p>
|
||||||
|
<ul>
|
||||||
|
<li>the DCL script will be created inside
|
||||||
|
the <a href="../running.html#tmpdir">temporary directory</a>.</li>
|
||||||
|
<li>paths have to be written in VMS style</li>
|
||||||
|
<li>if your <var>executable</var> points to a DCL script remember to prefix it with
|
||||||
|
an <q>@</q>-sign (e.g. <var>executable</var>=<q>@[FOO]BAR.COM</q>), just as you would in a DCL
|
||||||
|
script</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Please note that JVM provided by HP doesn't follow OpenVMS' conventions of exit codes. If you
|
||||||
|
run a JVM with this task, the task may falsely claim that an error occurred (or silently ignore an
|
||||||
|
error). Don't use this task to run <kbd>JAVA.EXE</kbd>, use a <code><java></code> task with
|
||||||
|
the <var>fork</var> attribute set to <q>true</q> instead as this task will follow the JVM's
|
||||||
|
interpretation of exit codes.</p>
|
||||||
|
|
||||||
|
<h4>RedHat S/390 Users</h4>
|
||||||
|
<p>It has been <a href="https://www.mail-archive.com/linux-390@vm.marist.edu/msg22223.html"
|
||||||
|
target="_top">reported on linux-390</a> that shell scripts invoked via the Ant Exec task must have
|
||||||
|
their interpreter specified, i.e., the scripts must start with something like:</p>
|
||||||
|
|
||||||
|
<pre>#!/bin/bash</pre>
|
||||||
|
<p>or the task will fail as follows:</p>
|
||||||
|
<pre class="output">
|
||||||
|
[exec] Warning: UNIXProcess.forkAndExec native error: Exec format error
|
||||||
|
[exec] Result: 255</pre>
|
||||||
|
|
||||||
|
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4>
|
||||||
|
|
||||||
|
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use
|
||||||
|
the <code><exec></code> task with <var>spawn</var> set to <q>false</q>, you must provide
|
||||||
|
explicit input to the forked process or Ant will be suspended because it tries to read from the
|
||||||
|
standard input.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>command</td>
|
||||||
|
<td>the command to execute with all command line arguments. <em><u>Deprecated</u>,
|
||||||
|
use <var>executable</var> and nested <code><arg></code> elements instead</em>.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>executable</td>
|
||||||
|
<td class="left">the command to execute without any command line arguments.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>the directory in which the command should be executed.</td>
|
||||||
|
<td>No; if <var>vmlauncher</var> is <q>true</q>, defaults to the current working directory,
|
||||||
|
otherwise the project's <var>basedir</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>os</td>
|
||||||
|
<td>list of Operating Systems on which the command may be executed. If the current OS's name is
|
||||||
|
contained in this list, the command will be executed. The OS's name is determined by JVM and
|
||||||
|
is set in the <code>os.name</code> system property.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>osfamily</td>
|
||||||
|
<td>OS family as used in the <code><os></code> condition. <em>since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>spawn</td>
|
||||||
|
<td>whether or not you want the command to be spawned<br/>If you spawn a command, its output
|
||||||
|
will not be logged by Ant.<br/>The <var>input</var>, <var>output</var>, <var>error</var>,
|
||||||
|
and <var>result</var> property settings are not active when spawning a process.<br/><em>since
|
||||||
|
Ant 1.6</em>
|
||||||
|
</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>Name of a file to which to write the output. If the error stream is not also redirected to a
|
||||||
|
file or property, it will appear in this output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>The file to which the standard error of the command should be redirected. <em>since Ant
|
||||||
|
1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>logError</td>
|
||||||
|
<td>This attribute is used when you wish to see error output in Ant's log and you are
|
||||||
|
redirecting output to a file/property. The error output will not be included in the output
|
||||||
|
file/property. If you redirect error with the <var>error</var> or <var>errorProperty</var>
|
||||||
|
attributes, this will have no effect. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>Whether output and error files should be appended to or overwritten.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputproperty</td>
|
||||||
|
<td>The name of a property in which the output of the command should be stored. Unless the error
|
||||||
|
stream is redirected to a separate file or stream, this property will include the error
|
||||||
|
output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorproperty</td>
|
||||||
|
<td>The name of a property in which the standard error of the command should be
|
||||||
|
stored. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>input</td>
|
||||||
|
<td>A file from which the executed command's standard input is taken. This attribute is mutually
|
||||||
|
exclusive with the <var>inputstring</var> attribute. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inputstring</td>
|
||||||
|
<td>A string which serves as the input stream for the executed command. This attribute is
|
||||||
|
mutually exclusive with the <var>input</var> attribute. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resultproperty</td>
|
||||||
|
<td>the name of a property in which the return code of the command should be stored. Only of
|
||||||
|
interest if <var>failonerror</var>=<q>false</q>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timeout</td>
|
||||||
|
<td>Stop the command if it doesn't finish within the specified time (given in
|
||||||
|
milliseconds).</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code signaling failure.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failifexecutionfails</td>
|
||||||
|
<td>Stop the build if we can't start the program.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>newenvironment</td>
|
||||||
|
<td>Do not propagate old environment when new environment variables are specified.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>vmlauncher</td>
|
||||||
|
<td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the
|
||||||
|
underlying OS's shell, either directly or through the <kbd>antRun</kbd> scripts, will be
|
||||||
|
used. Under some operating systems, this gives access to facilities not normally available
|
||||||
|
through JVM including, under Windows, being able to execute scripts, rather than their
|
||||||
|
associated interpreter. If you want to specify the name of the executable as a relative path
|
||||||
|
to the directory given by the <var>dir</var> attribute, it may become necessary to
|
||||||
|
set <var>vmlauncher</var> to <q>false</q> as well.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resolveexecutable</td>
|
||||||
|
<td>When this attribute is <q>true</q>, the name of the executable is resolved firstly against
|
||||||
|
the project <var>basedir</var> and if that does not exist, against the execution directory if
|
||||||
|
specified. On Unix systems, if you only want to allow execution of commands in the user's
|
||||||
|
path, set this to <q>false</q>. <em>since Ant 1.6</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>searchpath</td>
|
||||||
|
<td>When this attribute is <q>true</q>, then system path environment variables will be searched
|
||||||
|
when resolving the location of the executable. <em>since Ant 1.6.3</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardOutput</td>
|
||||||
|
<td>Whether output should completely be discarded. This setting is
|
||||||
|
incompatible with any setting that redirects output to files or
|
||||||
|
properties.<br/>
|
||||||
|
If you set this to <q>true</q> error output will be discared as
|
||||||
|
well unless you redirect error output to files, properties or
|
||||||
|
enable <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardError</td>
|
||||||
|
<td>Whether error output should completely be discarded. This
|
||||||
|
setting is incompatible with any setting that redirects error
|
||||||
|
output to files or properties as well as <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre>
|
||||||
|
<exec dir="${src}" executable="cmd.exe" os="Windows 2000" output="dir.txt">
|
||||||
|
<arg line="/c dir"/>
|
||||||
|
</exec></pre>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>arg</h4>
|
||||||
|
<p>Command line arguments should be specified as nested <code><arg></code>
|
||||||
|
elements. See <a href="../using.html#arg">Command line arguments</a>.</p>
|
||||||
|
<h4 id="env">env</h4>
|
||||||
|
<p>It is possible to specify environment variables to pass to the system command via
|
||||||
|
nested <code><env></code> elements.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>key</td>
|
||||||
|
<td>The name of the environment variable.<br/><strong>Note</strong>: <em>since Ant 1.7</em>, for
|
||||||
|
Windows, the name is case-insensitive.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>The literal value for the environment variable.</td>
|
||||||
|
<td rowspan="3">Exactly one of these</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>path</td>
|
||||||
|
<td class="left">The value for a <code>PATH</code>-like environment variable. You can
|
||||||
|
use <q>;</q> or <q>:</q> as path separators and Ant will convert it to the platform's local
|
||||||
|
conventions.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td class="left">The value for the environment variable. Will be replaced by the absolute
|
||||||
|
filename of the file by Ant.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h4 id="redirector">redirector</h4>
|
||||||
|
<em>Since Ant 1.6.2</em>
|
||||||
|
<p>A nested <a href="../Types/redirector.html">I/O Redirector</a> can be specified. In general, the
|
||||||
|
attributes of the redirector behave as the corresponding attributes available at the task level.
|
||||||
|
The most notable peculiarity stems from the retention of the <code><exec></code> attributes
|
||||||
|
for backwards compatibility. Any file mapping is done using a <code>null</code> sourcefile;
|
||||||
|
therefore not all<a href="../Types/mapper.html">Mapper</a> types will return results. When no
|
||||||
|
results are returned, redirection specifications will fall back to the task level attributes. In
|
||||||
|
practice this means that defaults can be specified for input, output, and error output files.</p>
|
||||||
|
<h3>Errors and return codes</h3>
|
||||||
|
<p>By default the return code of a <code><exec></code> is ignored; when you
|
||||||
|
set <var>failonerror</var> to <q>true</q> then any return code signaling failure (OS specific)
|
||||||
|
causes the build to fail. Alternatively, you can set <var>resultproperty</var> to the name of a
|
||||||
|
property and have it assigned to the result code (barring immutability, of course).</p>
|
||||||
|
<p>If the attempt to start the program fails with an OS dependent error code,
|
||||||
|
then <code><exec></code> halts the build unless <var>failifexecutionfails</var> is set
|
||||||
|
to <q>false</q>. You can use that to run a program if it exists, but otherwise do nothing.</p>
|
||||||
|
<p>What do those error codes mean? Well, they are OS dependent. On Windows boxes you have to look
|
||||||
|
at <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx"
|
||||||
|
target="_top">the documentation</a>; <code>error=2</code> means 'no such program', which usually
|
||||||
|
means it is not on the path. Any time you see such an error from any Ant task, it is usually not an
|
||||||
|
Ant bug, but some configuration problem on your machine.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Start <kbd>emacs</kbd> on display 1 of the X Window System.</p>
|
||||||
|
<pre>
|
||||||
|
<exec executable="emacs">
|
||||||
|
<env key="DISPLAY" value=":1.0"/>
|
||||||
|
</exec>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Add <samp>${basedir}/bin</samp> to the <code>PATH</code> of the system command.</p>
|
||||||
|
<pre>
|
||||||
|
<property environment="env"/>
|
||||||
|
<exec ... >
|
||||||
|
<env key="PATH" path="${env.PATH}:${basedir}/bin"/>
|
||||||
|
</exec>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Start the <samp>${browser}</samp> with the specified <samp>${file}</samp> and end the Ant
|
||||||
|
process. The browser will remain.</p>
|
||||||
|
<pre>
|
||||||
|
<property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/>
|
||||||
|
<property name="file" location="ant/docs/manual/index.html"/>
|
||||||
|
|
||||||
|
<exec executable="${browser}" spawn="true">
|
||||||
|
<arg value="${file}"/>
|
||||||
|
</exec>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Send the string <q>blah before blah</q> to the <kbd>cat</kbd> executable, using
|
||||||
|
an <a href="../Types/filterchain.html"><inputfilterchain></a> to replace <q>before</q>
|
||||||
|
with <q>after</q> on the way in. Output is sent to the file <samp>redirector.out</samp> and stored
|
||||||
|
in a property of the same name. Similarly, error output is sent to a file and a property, both
|
||||||
|
named <samp>redirector.err</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<exec executable="cat">
|
||||||
|
<redirector outputproperty="redirector.out"
|
||||||
|
errorproperty="redirector.err"
|
||||||
|
inputstring="blah before blah">
|
||||||
|
<inputfilterchain>
|
||||||
|
<replacestring from="before" to="after"/>
|
||||||
|
</inputfilterchain>
|
||||||
|
<outputmapper type="merge" to="redirector.out"/>
|
||||||
|
<errormapper type="merge" to="redirector.err"/>
|
||||||
|
</redirector>
|
||||||
|
</exec>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: do not try to specify arguments using a simple <code>arg</code>-element
|
||||||
|
and separate them by spaces. This results in only a single argument containing the entire
|
||||||
|
string.</p>
|
||||||
|
<p><strong>Timeouts</strong>: If a timeout is specified, when it is reached the sub process is
|
||||||
|
killed and a message printed to the log. The return value of the execution will be <q>-1</q>, which
|
||||||
|
will halt the build if <var>failonerror</var>=<q>true</q>, but be ignored otherwise.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,132 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Fail Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="fail">Fail</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Exits the current build (just throwing a BuildException), optionally printing additional
|
||||||
|
information.</p>
|
||||||
|
<p>The message of the Exception can be set via the message attribute or character data nested into
|
||||||
|
the element.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>message</td>
|
||||||
|
<td>A message giving further information on why the build exited</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>if</td>
|
||||||
|
<td>Only fail <a href="../properties.html#if+unless">if a property of the given name exists</a>
|
||||||
|
in the current project</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>unless</td>
|
||||||
|
<td>Only fail <a href="../properties.html#if+unless">if a property of the given name doesn't
|
||||||
|
exist</a> in the current project</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>status</td>
|
||||||
|
<td>Exit using the specified status code; assuming the generated Exception is not caught, the
|
||||||
|
JVM will exit with this status. <em>Since Apache Ant 1.6.2</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<p>As an alternative to the <var>if</var>/<var>unless</var> attributes, conditional failure can be
|
||||||
|
achieved using a single nested <code><condition></code> element, which should contain exactly
|
||||||
|
one core or custom condition. For information about conditions,
|
||||||
|
see <a href="conditions.html">here</a>.<br/><em>Since Ant 1.6.2</em>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Exit the current build with no further information given.</p>
|
||||||
|
<pre><fail/></pre>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
BUILD FAILED
|
||||||
|
|
||||||
|
build.xml:4: No message</pre>
|
||||||
|
|
||||||
|
<p>Exit the current build and print a message to wherever your output goes:</p>
|
||||||
|
<pre><fail message="Something wrong here."/></pre>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
BUILD FAILED
|
||||||
|
|
||||||
|
build.xml:4: Something wrong here.</pre>
|
||||||
|
|
||||||
|
<p>A different way to achieve the same result as above.</p>
|
||||||
|
<pre><fail>Something wrong here.</fail></pre>
|
||||||
|
|
||||||
|
<p>Exit the current build and print an explanation to wherever your output goes:</p>
|
||||||
|
<pre><fail unless="thisdoesnotexist"/></pre>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
BUILD FAILED
|
||||||
|
|
||||||
|
build.xml:2: unless=thisdoesnotexist</pre>
|
||||||
|
|
||||||
|
<p>Use a condition to achieve the same effect:</p>
|
||||||
|
<pre>
|
||||||
|
<fail>
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<isset property="thisdoesnotexist"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail></pre>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
BUILD FAILED
|
||||||
|
|
||||||
|
build.xml:2: condition satisfied</pre>
|
||||||
|
|
||||||
|
<p>Check that both files <samp>one.txt</samp> and <samp>two.txt</samp> are present otherwise the
|
||||||
|
build will fail.</p>
|
||||||
|
<pre>
|
||||||
|
<fail message="Files are missing.">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<resourcecount count="2">
|
||||||
|
<fileset id="fs" dir="." includes="one.txt,two.txt"/>
|
||||||
|
</resourcecount>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Filter Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="filter">Filter</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Sets a token filter for this project or reads a properties file as multiple token filter
|
||||||
|
definitions and sets them. Token filters are used by all tasks that perform file copying operations
|
||||||
|
through the Project commodity methods. See the
|
||||||
|
warning <a href="../using.html#filters"><em>here</em></a> before using.</p>
|
||||||
|
<p>The task uses <q>@</q> as token separator. Token strings cannot contain separator characters;
|
||||||
|
incorrect tokens are ignored.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>token</td>
|
||||||
|
<td>the token string without the separator chars (<q>@</q>)</td>
|
||||||
|
<td rowspan="3">Yes; either both <var>token</var> and <var>value</var>, or
|
||||||
|
only <var>filtersfile</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td class="left">the string that should be put to replace the token when the file is copied</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filtersfile</td>
|
||||||
|
<td class="left">The file from which the filters must be read. This file must be a formatted as
|
||||||
|
a property file.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Copy recursively all the files from the <samp>src.dir</samp> directory into
|
||||||
|
the <samp>dest.dir</samp> directory replacing all the occurrences of the string <code>@year@</code>
|
||||||
|
with <q>2000</q>.</p>
|
||||||
|
<pre>
|
||||||
|
<filter token="year" value="2000"/>
|
||||||
|
<copy todir="${dest.dir}" filtering="true">
|
||||||
|
<fileset dir="${src.dir}"/>
|
||||||
|
</copy></pre>
|
||||||
|
|
||||||
|
<p>Read all property entries from the <samp>deploy_env.properties</samp> file and set these as
|
||||||
|
filters.</p>
|
||||||
|
<pre><filter filtersfile="deploy_env.properties"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,254 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>FixCRLF Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="fixcrlf">FixCRLF</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Adjusts a text file to local conventions.</p>
|
||||||
|
|
||||||
|
<p>The set of files to be adjusted can be refined with
|
||||||
|
the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
|
||||||
|
and <var>defaultexcludes</var> attributes. Patterns provided through the <var>includes</var>
|
||||||
|
or <var>includesfile</var> attributes specify files to be included. Patterns provided through
|
||||||
|
the <var>exclude</var> or <var>excludesfile</var> attribute specify files to be
|
||||||
|
excluded. Additionally, default exclusions can be specified with the <var>defaultexcludes</var>
|
||||||
|
attribute. See the section on <a href="../dirtasks.html#directorybasedtasks">directory-based
|
||||||
|
tasks</a>, for details of file inclusion/exclusion patterns and their usage.</p>
|
||||||
|
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>srcdir</var>) as well as
|
||||||
|
the nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The output file is only written if it is a new file, or if it
|
||||||
|
differs from the existing file. This prevents spurious
|
||||||
|
rebuilds based on unchanged files which have been regenerated
|
||||||
|
by this task. In order to assess whether a file has changed, this
|
||||||
|
task will create a pre-processed version of the source file inside of
|
||||||
|
the <a href="../running.html#tmpdir">temporary directory</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><em>Since Apache Ant 1.7</em>, this task can be used in
|
||||||
|
a <a href="../Types/filterchain.html">filterchain</a>.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" rowspan="2">Attribute</th>
|
||||||
|
<th scope="col" rowspan="2">Description</th>
|
||||||
|
<th scope="col" colspan="2">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">As Task</th>
|
||||||
|
<th scope="col">As Filter</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>srcDir</td>
|
||||||
|
<td>Where to find the files to be fixed up.</td>
|
||||||
|
<td rowspan="2" class="center">One of these</td>
|
||||||
|
<td rowspan="11">N/A</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td class="left">Name of a single file to fix. <em>Since Ant 1.7</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destDir</td>
|
||||||
|
<td>Where to place the corrected files.</td>
|
||||||
|
<td class="center">No; defaults to <var>srcDir</var> (replace the original files)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td class="center">No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern.</td>
|
||||||
|
<td class="center">No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td class="center">No; defaults to default excludes or none if <var>defaultexcludes</var>
|
||||||
|
is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern.</td>
|
||||||
|
<td class="center">No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td class="center">No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>The encoding of the files.</td>
|
||||||
|
<td class="center">No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputencoding</td>
|
||||||
|
<td>The encoding to use when writing the files. <em>Since Ant 1.7</em></td>
|
||||||
|
<td class="center">No; defaults to <var>encoding</var> if set or default JVM character encoding
|
||||||
|
otherwise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservelastmodified</td>
|
||||||
|
<td>Whether to preserve the last modified date of source files. <em>Since Ant 1.6.3</em></td>
|
||||||
|
<td class="center">No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>eol</td>
|
||||||
|
<td>Specifies how end-of-line (EOL) characters are to be handled. The EOL characters are CR, LF
|
||||||
|
and the pair CRLF. Valid values for this property are:
|
||||||
|
<ul>
|
||||||
|
<li><q>asis</q>: leave EOL characters alone</li>
|
||||||
|
<li><q>cr</q>: convert all EOLs to a single CR</li>
|
||||||
|
<li><q>lf</q>: convert all EOLs to a single LF</li>
|
||||||
|
<li><q>crlf</q>: convert all EOLs to the pair CRLF</li>
|
||||||
|
<li><q>mac</q>: convert all EOLs to a single CR</li>
|
||||||
|
<li><q>unix</q>: convert all EOLs to a single LF</li>
|
||||||
|
<li><q>dos</q>: convert all EOLs to the pair CRLF</li>
|
||||||
|
</ul>
|
||||||
|
<p>This is the preferred method for specifying EOL. The <var>cr</var> attribute (see below)
|
||||||
|
is now deprecated.</p>
|
||||||
|
<p><strong>Note</strong>: One special case is recognized. The three characters CR-CR-LF are
|
||||||
|
regarded as a single EOL. Unless this property is specified as <q>asis</q>, this sequence
|
||||||
|
will be converted into the specified EOL type.</p>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">No; default is platform-specific: <q>lf</q> for Unix platforms (including Mac OS
|
||||||
|
X/macOS), <q>crlf</q> for DOS-based systems (including Windows), <q>cr</q> for Mac environments
|
||||||
|
other than OS X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cr</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Specifies how CR characters are to be handled at end-of-line
|
||||||
|
(EOL). Valid values for this property are:
|
||||||
|
<ul>
|
||||||
|
<li><q>asis</q>: leave EOL characters alone.</li>
|
||||||
|
<li><q>add</q>: add a CR before any single LF characters. The intent is to convert all EOLs
|
||||||
|
to the pair CRLF.</li>
|
||||||
|
<li><q>remove</q>: remove all CRs from the file. The intent is to convert all EOLs to a
|
||||||
|
single LF.</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Note</strong>: One special case is recognized. The three characters CR-CR-LF are
|
||||||
|
regarded as a single EOL. Unless this property is specified as <q>asis</q>, this sequence
|
||||||
|
will be converted into the specified EOL type.</p>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">No; default is platform-specific: <q>remove</q> for Unix platforms, <q>add</q>
|
||||||
|
for DOS based systems (including Windows)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>javafiles</td>
|
||||||
|
<td>Used only in association with the <var>tab</var> attribute (see below), this boolean
|
||||||
|
attribute indicates whether the fileset is a set of Java source files (<q>yes|no</q>). See
|
||||||
|
notes in section on <var>tab</var>.</td>
|
||||||
|
<td colspan="2">No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tab</td>
|
||||||
|
<td>Specifies how tab characters are to be handled. Valid values for this property are:
|
||||||
|
<ul>
|
||||||
|
<li><q>add</q>: convert sequences of spaces which span a tab stop to tabs</li>
|
||||||
|
<li><q>asis</q>: leave tab and space characters alone</li>
|
||||||
|
<li><q>remove</q>: convert tabs to spaces</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Note</strong>: When the attribute <var>javafiles</var> (see above) is <q>true</q>,
|
||||||
|
literal TAB characters occurring within Java string or character constants are never
|
||||||
|
modified. This functionality also requires the recognition of Java-style comments.</p>
|
||||||
|
<p><strong>Note</strong>: There is an incompatibility between this and the previous version in
|
||||||
|
the handling of white space at the end of lines. This version
|
||||||
|
does <em><strong>not</strong></em> remove trailing whitespace on lines.</p>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">No; default is <q>asis</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tablength</td>
|
||||||
|
<td>TAB character interval. Valid values are between <q>2</q> and <q>80</q> inclusive.</td>
|
||||||
|
<td colspan="2">No; default is <q>8</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>eof</td>
|
||||||
|
<td>Specifies how DOS end of file (control-Z) characters are to be handled. Valid values for
|
||||||
|
this property are:
|
||||||
|
<ul>
|
||||||
|
<li><q>add</q>: ensure that there is an EOF character at the end of the file</li>
|
||||||
|
<li><q>asis</q>: leave EOF characters alone</li>
|
||||||
|
<li><q>remove</q>: remove any EOF character found at the end</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">No; default is platform-specific: <q>remove</q> for Unix platforms, <q>asis</q>
|
||||||
|
for DOS based systems (including Windows)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fixlast</td>
|
||||||
|
<td>Whether to add a missing EOL to the last line of a processed file.<br/>Ignored
|
||||||
|
if <var>eof</var> is <q>asis</q>.<br/><em>Since Ant 1.6.1</em></td>
|
||||||
|
<td colspan="2">No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Replace EOLs with LF characters and remove EOF characters from the shell scripts. Tabs and spaces
|
||||||
|
are left as is.</p>
|
||||||
|
<pre>
|
||||||
|
<fixcrlf srcdir="${src}" includes="**/*.sh"
|
||||||
|
eol="lf" eof="remove"/></pre>
|
||||||
|
|
||||||
|
<p>Replace all EOLs with cr-lf pairs in the batch files. Tabs and spaces are left as is. EOF
|
||||||
|
characters are left alone if run on DOS systems, and are removed if run on Unix systems.</p>
|
||||||
|
<pre>
|
||||||
|
<fixcrlf srcdir="${src}"
|
||||||
|
includes="**/*.bat" eol="crlf"/></pre>
|
||||||
|
|
||||||
|
<p>Set EOLs according to local OS conventions, and convert sequences of spaces and tabs into the
|
||||||
|
minimal set of spaces and tabs which will preserve spacing within the line. Tabs are set at 8
|
||||||
|
character intervals. EOF characters are left alone if run on DOS systems, and are removed if run on
|
||||||
|
Unix systems. Many versions of make require tabs prior to commands.</p>
|
||||||
|
<pre>
|
||||||
|
<fixcrlf srcdir="${src}"
|
||||||
|
includes="**/Makefile" tab="add"/></pre>
|
||||||
|
|
||||||
|
<p>Convert all EOLs in the included Java source files to a single LF. Replace all tab characters
|
||||||
|
except those in string or character constants with spaces, assuming a tab width of 3. If run on a
|
||||||
|
Unix system, any CTRL-Z EOF characters at the end of the file are removed. On DOS/Windows, any such
|
||||||
|
EOF characters will be left untouched.
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
<fixcrlf srcdir="${src}" includes="**/*.java"
|
||||||
|
tab="remove" tablength="3"
|
||||||
|
eol="lf" javafiles="yes"/></pre>
|
||||||
|
|
||||||
|
<p>Set EOLs according to local OS conventions, and convert all tabs to spaces, assuming a tab width
|
||||||
|
of 8. EOF characters are left alone if run on DOS systems, and are removed if run on Unix
|
||||||
|
systems. You never know what editor a user will use to browse READMEs.</p>
|
||||||
|
<pre>
|
||||||
|
<fixcrlf srcdir="${src}"
|
||||||
|
includes="**/README*" tab="remove"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,634 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>FTP Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="ftp">FTP</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>The <code>ftp</code> task implements a basic FTP client that can send, receive, list, delete
|
||||||
|
files, and create directories. See below for descriptions and examples of how to perform each
|
||||||
|
task.</p>
|
||||||
|
<p><strong>Note</strong>: This task depends on external libraries not included in the Apache Ant
|
||||||
|
distribution. See <a href="../install.html#commons-net">Library Dependencies</a> for more
|
||||||
|
information. <em>Get the latest version of this library, for the best support in Ant.</em></p>
|
||||||
|
<p>The <code>ftp</code> task attempts to determine what file system is in place on the FTP server.
|
||||||
|
Supported server types are Unix, NT, OS2, VMS, and OS400. In addition, NT and OS400 servers which
|
||||||
|
have been configured to display the directory in Unix style are also supported correctly.
|
||||||
|
Otherwise, the system will default to Unix standards. <var>remotedir</var> must be specified in the
|
||||||
|
exact syntax required by the FTP server. If the usual Unix conventions are not supported by the
|
||||||
|
server, <var>separator</var> can be used to set the file separator that should be used instead.</p>
|
||||||
|
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on
|
||||||
|
how the inclusion/exclusion of files works, and how to write patterns.</p>
|
||||||
|
<p>This task does not currently use the proxy information set by
|
||||||
|
the <a href="setproxy.html"><code><setproxy></code></a> task, and cannot go through a firewall
|
||||||
|
via socks.</p>
|
||||||
|
<p><strong>Warning</strong>: there have been problems reported concerning
|
||||||
|
the <code>ftp</code> <q>get</q> with the <var>newer</var> attribute. Problems might be due to
|
||||||
|
format of <kbd>ls -l</kbd> differing from what is expected by commons-net, for instance due to
|
||||||
|
specifics of language used by the FTP server in the directory listing. If you encounter such a
|
||||||
|
problem, please send an email including a sample directory listing coming from your FTP server
|
||||||
|
(<kbd>ls -l</kbd> on the FTP prompt).</p>
|
||||||
|
<p>If you can connect but not upload or download, try setting the <var>passive</var> attribute
|
||||||
|
to <q>true</q> to use the existing (open) channel, instead of having the server try to set up a new
|
||||||
|
connection.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>server</td>
|
||||||
|
<td>the address of the remote FTP server.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>port</td>
|
||||||
|
<td>the port number of the remote FTP server.</td>
|
||||||
|
<td>No; defaults to <q>21</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>userid</td>
|
||||||
|
<td>the login id to use on the FTP server.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>password</td>
|
||||||
|
<td>the login password to use on the FTP server.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>account</td>
|
||||||
|
<td>the account to use on the FTP server.
|
||||||
|
<em>since Ant 1.7</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>remotedir</td>
|
||||||
|
<td>remote directory on the FTP server see table below for detailed usage</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>action</td>
|
||||||
|
<td>FTP action to perform. Currently
|
||||||
|
supports <q>put</q>, <q>get</q>, <q>del</q>, <q>list</q>, <q>chmod</q>, <q>mkdir</q>, <q>rmdir</q>,
|
||||||
|
and <q>site</q>.</td>
|
||||||
|
<td>No; defaults to <q>send</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>binary</td>
|
||||||
|
<td>selects binary-mode (<q>yes</q>) or text-mode (<q>no</q>) transfers.</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>passive</td>
|
||||||
|
<td>selects passive-mode (<q>yes</q>) transfers, for better through-firewall connectivity, at
|
||||||
|
the price of performance.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>displays information on each file transferred if set to <q>yes</q>.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>depends</td>
|
||||||
|
<td>transfers only new or changed files if set to <q>yes</q>.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>newer</td>
|
||||||
|
<td>a synonym for <var>depends</var>. See <var>timediffauto</var>
|
||||||
|
and <var>timediffmillis</var></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timediffauto</td>
|
||||||
|
<td>set to <q>true</q> to make Ant calculate the time difference between client and
|
||||||
|
server.<br/><em>requires write access in the remote directory</em><br/><em>Since Ant
|
||||||
|
1.6</em><br/>
|
||||||
|
If this is set to <code>true</code> then Ant will create an empty
|
||||||
|
file inside of the <a href="../running.html#tmpdir">temporary
|
||||||
|
directory</a> and transfer it to the remote server - deleting it on
|
||||||
|
both sides once the difference has been determined.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="timestampGranularity">
|
||||||
|
<td>timestampGranularity</td>
|
||||||
|
<td>Specify either <q>MINUTE</q> or <q>NONE</q> (you may specify <q></q> which is equivalent to
|
||||||
|
not specifying a value, useful for property-file driven scripts). Allows override of the
|
||||||
|
typical situation in <q>put</q> and <q>get</q> where local filesystem timestamps
|
||||||
|
are <code>HH:mm:ss</code> and the typical FTP server's timestamps are <code>HH:mm</code>.
|
||||||
|
This can throw off <var>uptodate</var> calculations. However, the default values should
|
||||||
|
suffice for most applications.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No; only applies for <q>put</q> (default is <q>MINUTE</q>) and <q>get</q> (default
|
||||||
|
is <q>NONE</q>; not as necessary because we have the <var>preservelastmodified</var>
|
||||||
|
option)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timediffmillis</td>
|
||||||
|
<td><em><u>Deprecated</u></em>. Number of milliseconds to add to the time on the remote machine
|
||||||
|
to get the time on the local machine. The <var>timestampGranularity</var> attribute (for
|
||||||
|
which the default values should suffice in most situations), and
|
||||||
|
the <var>serverTimeZoneConfig</var> option, should make this
|
||||||
|
unnecessary. <var>serverTimeZoneConfig</var> does the math for you and also knows about
|
||||||
|
Daylight Savings Time.<br/><em>Since Ant 1.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>separator</td>
|
||||||
|
<td>sets the file separator used on the FTP server.</td>
|
||||||
|
<td>No; defaults to <q>/</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>umask</td>
|
||||||
|
<td>sets the default file permissions for new files, Unix only.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>chmod</td>
|
||||||
|
<td>sets or changes file permissions for new or existing files, Unix only. If used with
|
||||||
|
a <q>put</q> action, <q>chmod</q> will be issued for each file.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>listing</td>
|
||||||
|
<td>the file to write results of the <q>list</q> action.</td>
|
||||||
|
<td>Yes, for the <q>list</q> action; ignored otherwise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoreNoncriticalErrors</td>
|
||||||
|
<td>flag which permits the task to ignore some non-fatal error codes sent by some servers during
|
||||||
|
directory creation: wu-ftp in particular.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>skipFailedTransfers</td>
|
||||||
|
<td>flag which enables unsuccessful file <q>put</q>, <q>delete</q> and <q>get</q> operations to
|
||||||
|
be skipped with a warning and the remainder of the files still transferred.</td>
|
||||||
|
<td>No; default to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preservelastmodified</td>
|
||||||
|
<td>Give the copied files the same last modified time as the original source files (applies to
|
||||||
|
getting files only).</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>retriesAllowed</td>
|
||||||
|
<td>Set the number of retries allowed on an file-transfer operation. If a positive number is
|
||||||
|
specified, each file transfer can fail up to that many times before the operation is failed.
|
||||||
|
If <q>-1</q> or <q>forever</q> specified, the operation will keep trying until it
|
||||||
|
succeeds.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>siteCommand</td>
|
||||||
|
<td>Set the server-specific <code>SITE</code> command to execute if the <var>action</var>
|
||||||
|
attribute has been specified as <q>site</q>.
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>initialSiteCommand</td>
|
||||||
|
<td>Set a server-specific <code>SITE</code> command to execute immediately after login.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enableRemoteVerification</td>
|
||||||
|
<td>Whether data connection should be verified to connect to the same host as the control
|
||||||
|
connection. This is a security measure that is enabled by default, but it may be useful to
|
||||||
|
disable it in certain firewall scenarios. <em>since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dataTimeout</td>
|
||||||
|
<td>Sets a timeout in milliseconds used when waiting for data on the data connection.
|
||||||
|
A value of 0 means an infinite timeout.<em>since Ant 1.10.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>wakeUpTransferInterval</td>
|
||||||
|
<td>Only use if proved to be necessary, interval in seconds on which a LIST command is triggered
|
||||||
|
trigger a data connection (to avoid timeouts by the ftp server on no data connection).
|
||||||
|
<em>since Ant 1.10.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="left">
|
||||||
|
<p><strong>The following attributes
|
||||||
|
require <a href="https://commons.apache.org/net/download_net.cgi"
|
||||||
|
target="_top">jakarta-commons-net-1.4.0 or greater</a>.</strong></p>
|
||||||
|
<p>Use these options when the standard options don't work, because</p>
|
||||||
|
<ul>
|
||||||
|
<li>the server is in a different timezone and you need timestamp dependency checking</li>
|
||||||
|
<li>the default timestamp formatting doesn't match the server display and list parsing
|
||||||
|
therefore fails</li>
|
||||||
|
</ul>
|
||||||
|
<p>If none of these is specified, the default mechanism of letting the system auto-detect the
|
||||||
|
server OS type based on the FTP <code>SYST</code> command and assuming standard formatting
|
||||||
|
for that OS type will be used.</p>
|
||||||
|
<p>To aid in property-file-based development where a build script is configured with property
|
||||||
|
files, for any of these attributes, a value of <q></q> is equivalent to not specifying it.</p>
|
||||||
|
<p>Please understand that these options are incompatible with the autodetection scheme. If
|
||||||
|
any of these options is specified, (other than with a value of <q></q>) a system type must be
|
||||||
|
chosen and if <var>systemTypeKey</var> is not specified, UNIX will be assumed. The philosophy
|
||||||
|
behind this is that these options are for setting non-standard formats, and a build-script
|
||||||
|
author who knows what system he is dealing with will know what options to need to be
|
||||||
|
set. Otherwise, these options should be left alone and the default autodetection scheme can be
|
||||||
|
used and will work in the majority of cases.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>systemTypeKey</td>
|
||||||
|
<td>Specifies the type of system in use on the server. Supported values
|
||||||
|
are <q>UNIX</q>, <q>VMS</q>, <q>WINDOWS</q>, <q>OS/2</q>, <q>OS/400</q>, <q>MVS</q>. If not
|
||||||
|
specified, (or specified as <q></q>) and if no other <var>xxxConfig</var> attributes are
|
||||||
|
specified, the autodetection mechanism based on the FTP <code>SYST</code> command will be
|
||||||
|
used.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No, but if any of the following <var>xxxConfig</var> attributes is specified, UNIX will be
|
||||||
|
assumed, even if <q></q> is specified here.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>serverTimeZoneConfig</td>
|
||||||
|
<td>Specify as a
|
||||||
|
Java <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html"
|
||||||
|
target="_top">TimeZone</a> identifier, (e.g. <q>GMT</q>, <q>America/Chicago</q>
|
||||||
|
or <q>Asia/Jakarta</q>) the timezone used by the server for timestamps. This enables
|
||||||
|
timestamp dependency checking even when the server is in a different time zone from the
|
||||||
|
client. Time Zones know, also, about daylight savings time, and do not require you to
|
||||||
|
calculate milliseconds of difference. If not specified, (or specified as <q></q>), the time
|
||||||
|
zone of the client is assumed.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultDateFormatConfig</td>
|
||||||
|
<td>Specify in
|
||||||
|
Java <a href="https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html"
|
||||||
|
target="_top">SimpleDateFormat</a> notation, (e.g. <q>yyyy-MM-dd</q>), the date format
|
||||||
|
generally used by the FTP server to parse dates. In some cases this will be the only date
|
||||||
|
format used. In others, (<q>unix</q> for example) this will be used for dates older than a
|
||||||
|
year old. (See <var>recentDateFormatConfig</var>). When specified as <q></q>, default value
|
||||||
|
will be used.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No; defaults to default date format for the system type indicated
|
||||||
|
by <var>systemTypeKey</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>recentDateFormatConfig</td>
|
||||||
|
<td>Specify in
|
||||||
|
Java <a href="https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html"
|
||||||
|
target="_top">SimpleDateFormat</a> notation, (e.g. <q>MMM dd hh:mm</q>) the date format used
|
||||||
|
by the FTP server to parse dates less than a year old. If not specified (or specified
|
||||||
|
as <q></q>), and if the system type indicated by the <var>systemTypeKey</var> uses a recent
|
||||||
|
date format, its standard format will be used.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>serverLanguageCodeConfig</td>
|
||||||
|
<td>a <a href="http://www.mathguide.de/info/tools/languagecode.html" target="_top">two-letter
|
||||||
|
ISO-639 language code</a> used to specify the language used by the server to format month
|
||||||
|
names. This only needs to be specified when the server uses non-numeric abbreviations for
|
||||||
|
months in its date listings in a language other than English. This appears to be becoming
|
||||||
|
rarer and rarer, as commonly distributed FTP servers seem increasingly to use English or
|
||||||
|
all-numeric formats. Languages supported are:
|
||||||
|
<ul>
|
||||||
|
<li><q>en</q>—English</li>
|
||||||
|
<li><q>fr</q>—French</li>
|
||||||
|
<li><q>de</q>—German</li>
|
||||||
|
<li><q>it</q>—Italian</li>
|
||||||
|
<li><q>es</q>—Spanish</li>
|
||||||
|
<li><q>pt</q>—Portuguese</li>
|
||||||
|
<li><q>da</q>—Danish</li>
|
||||||
|
<li><q>sv</q>—Swedish</li>
|
||||||
|
<li><q>no</q>—Norwegian</li>
|
||||||
|
<li><q>nl</q>—Dutch</li>
|
||||||
|
<li><q>ro</q>—Romanian</li>
|
||||||
|
<li><q>sq</q>—Albanian</li>
|
||||||
|
<li><q>sh</q>—Serbo-Croatian</li>
|
||||||
|
<li><q>sk</q>—Slovak</li>
|
||||||
|
<li><q>sl</q>—Slovenian</li>
|
||||||
|
</ul>
|
||||||
|
If you require a language other than the above, see also the <var>shortMonthNamesConfig</var>
|
||||||
|
attribute.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>shortMonthNamesConfig</td>
|
||||||
|
<td>specify the month abbreviations used on the server in file timestamp dates as a
|
||||||
|
pipe-delimited string for each month. For example, a set of month names used by a hypothetical
|
||||||
|
Icelandic FTP server might conceivably be specified
|
||||||
|
as <q>jan|feb|mar|apr|maí|jún|júl|ágú|sep|okt|nóv|des</q>.
|
||||||
|
This attribute exists primarily to support languages not supported by
|
||||||
|
the <var>serverLanguageCode</var> attribute.<br/><em>Since Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useFtps</td>
|
||||||
|
<td>Whether to use ftps instead of ftp. Boolean, defaults
|
||||||
|
to <var>false</var>.<br/>
|
||||||
|
<em>Since Ant 1.10.13</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Note about <var>remotedir</var> attribute</h3>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Action</th>
|
||||||
|
<th scope="col">meaning of <var>remotedir</var></th>
|
||||||
|
<th scope="col">use of nested <var>fileset</var>(s)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><q>send</q>/<q>put</q></td>
|
||||||
|
<td>base directory to which the files are sent</td>
|
||||||
|
<td>they are used normally and evaluated on the local machine</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>recv</q>/<q>get</q></td>
|
||||||
|
<td>base directory from which the files are retrieved</td>
|
||||||
|
<td>the remote files located under the <var>remotedir</var> matching the include/exclude
|
||||||
|
patterns of the <var>fileset</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>del</q>/<q>delete</q></td>
|
||||||
|
<td>base directory from which files get deleted</td>
|
||||||
|
<td>the remote files located under the <var>remotedir</var> matching the include/exclude
|
||||||
|
patterns of the <var>fileset</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>list</q></td>
|
||||||
|
<td>base directory from which files are listed</td>
|
||||||
|
<td>the remote files located under the <var>remotedir</var> matching the include/exclude
|
||||||
|
patterns of the <var>fileset</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>mkdir</q></td>
|
||||||
|
<td>directory to create</td>
|
||||||
|
<td><em>not used</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>chmod</q></td>
|
||||||
|
<td>base directory from which the mode of files get changed</td>
|
||||||
|
<td>the remote files located under the <var>remotedir</var> matching the include/exclude
|
||||||
|
patterns of the <var>fileset</var></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><q>rmdir</q></td>
|
||||||
|
<td>base directory from which directories get removed</td>
|
||||||
|
<td>the remote directories located under the <var>remotedir</var> matching the include/exclude
|
||||||
|
patterns of the <var>fileset</var></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>fileset</h4>
|
||||||
|
<p>The <code>ftp</code> task supports any number of
|
||||||
|
nested <a href="../Types/fileset.html"><code><fileset></code></a> elements to specify the
|
||||||
|
files to be retrieved, or deleted, or listed, or whose mode you want to change.</p>
|
||||||
|
<p>The attribute <var>followsymlinks</var> of <code>fileset</code> is supported on local
|
||||||
|
(<q>put</q>) as well as remote (<q>get</q>, <q>chmod</q>, <q>delete</q>, <q>list</q>) filesets. <em>Before Ant
|
||||||
|
1.6 there was no support of symbolic links in remote filesets. In order to exclude symbolic links
|
||||||
|
(preserve the behavior of Ant 1.5.x and older), you need to explicitly set <var>followsymlinks</var>
|
||||||
|
to <q>false</q>.</em> On remote filesets hidden files are not checked for being symbolic links.
|
||||||
|
Hidden files are currently assumed to not be symbolic links.</p>
|
||||||
|
|
||||||
|
<h3>Sending files</h3>
|
||||||
|
<p>The easiest way to describe how to send files is with a couple of examples.</p>
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload all files in
|
||||||
|
the <samp>htdocs/manual</samp> directory to the default directory for that user.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com">
|
||||||
|
<fileset dir="htdocs/manual"/>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload all new or changed
|
||||||
|
files in the <samp>htdocs/manual</samp> directory to the <samp>incoming</samp> directory relative to
|
||||||
|
the default directory for <samp>anonymous</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp server="ftp.apache.org"
|
||||||
|
remotedir="incoming"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
depends="yes">
|
||||||
|
<fileset dir="htdocs/manual"/>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> at port <samp>2121</samp> as <samp>coder</samp> with
|
||||||
|
password <samp>java1</samp> and upload all new or changed HTML files in
|
||||||
|
the <samp>htdocs/manual</samp> directory to the <samp>/pub/incoming</samp> directory. The files are
|
||||||
|
transferred in text mode. Passive mode has been switched on to send files from behind a
|
||||||
|
firewall.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp server="ftp.apache.org"
|
||||||
|
port="2121"
|
||||||
|
remotedir="/pub/incoming"
|
||||||
|
userid="coder"
|
||||||
|
password="java1"
|
||||||
|
passive="yes"
|
||||||
|
depends="yes"
|
||||||
|
binary="no">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>Log in to a Windows server at <samp>ftp.hypothetical.india.org</samp> at port <samp>2121</samp>
|
||||||
|
as <samp>coder</samp> with password <samp>java1</samp> and upload all new or changed (accounting for
|
||||||
|
timezone differences) HTML files in the <samp>htdocs/manual</samp> directory to
|
||||||
|
the <samp>/pub/incoming</samp> directory. The files are transferred in text mode.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp server="ftp.hypothetical.india.org"
|
||||||
|
port="2121"
|
||||||
|
remotedir="/pub/incoming"
|
||||||
|
userid="coder"
|
||||||
|
password="java1"
|
||||||
|
depends="yes"
|
||||||
|
binary="no"
|
||||||
|
systemTypeKey="Windows"
|
||||||
|
serverTimeZoneConfig="India/Calcutta">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>Log in to the Windows-based <samp>ftp.nt.org</samp> as <samp>coder</samp> with
|
||||||
|
password <samp>java1</samp> and upload all HTML files in the <samp>htdocs/manual</samp> directory to
|
||||||
|
the <samp>c:\uploads</samp> directory. Progress messages are displayed as each file is uploaded.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp server="ftp.nt.org"
|
||||||
|
remotedir="c:\uploads"
|
||||||
|
userid="coder"
|
||||||
|
password="java1"
|
||||||
|
separator="\"
|
||||||
|
verbose="yes">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<h3>Getting files</h3>
|
||||||
|
<p>Getting files from an FTP server works pretty much the same way as sending them does. The only
|
||||||
|
difference is that the nested filesets use the <var>remotedir</var> attribute as the base directory
|
||||||
|
for the files on the FTP server, and the <var>dir</var> attribute as the local directory to put the
|
||||||
|
files into. The file structure from the FTP site is preserved on the local machine.</p>
|
||||||
|
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and recursively download
|
||||||
|
all <samp>.html</samp> files from default directory for that user into
|
||||||
|
the <samp>htdocs/manual</samp> directory on the local machine.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="get"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>If <samp>apache.org</samp> ever switches to a Unix FTP server that uses the new all-numeric
|
||||||
|
format for timestamps, this version would become necessary. It would accomplish the same
|
||||||
|
functionality as the previous example but would successfully handle the numeric
|
||||||
|
timestamps. The <var>systemTypeKey</var> is not necessary here but helps clarify what is going
|
||||||
|
on.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="get"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
systemTypeKey="UNIX"
|
||||||
|
defaultDateFormatConfig="yyyy-MM-dd HH:mm">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<p>Log into a UNIX FTP server at <samp>ftp.hypothetical.fr</samp> which displays dates with French
|
||||||
|
names in Standard European format, as <samp>anonymous</samp>, and recursively download
|
||||||
|
all <samp>.html</samp> files from default directory for that user into
|
||||||
|
the <samp>htdocs/manual</samp> directory on the local machine.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="get"
|
||||||
|
server="ftp.hypthetical.fr"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
defaultDateFormatConfig="d MMM yyyy"
|
||||||
|
recentDateFormatConfig="d MMM HH:mm"
|
||||||
|
serverLanguageCodeConfig="fr">
|
||||||
|
<fileset dir="htdocs/manual">
|
||||||
|
<include name="**/*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<h3>Deleting files</h3>
|
||||||
|
<p>As you've probably guessed by now, you use nested fileset elements to select the files to delete
|
||||||
|
from the remote FTP server. Again, the filesets are relative to the remote directory, not a local
|
||||||
|
directory. In fact, the <var>dir</var> attribute of the fileset is ignored completely.</p>
|
||||||
|
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to delete
|
||||||
|
all <samp>*.tmp</samp> files from the default directory for that user. If you don't have permission
|
||||||
|
to delete a file, a <code>BuildException</code> is thrown.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="del"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com">
|
||||||
|
<fileset>
|
||||||
|
<include name="**/*.tmp"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<h3>Listing Files</h3>
|
||||||
|
<p>Get a file listing in <samp>data/ftp.listing</samp> of all the files on the FTP server relative
|
||||||
|
to the default directory of the <samp>anonymous</samp> user. The listing is in whatever format the
|
||||||
|
FTP server normally lists files.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="list"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
listing="data/ftp.listing">
|
||||||
|
<fileset>
|
||||||
|
<include name="**"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
|
||||||
|
<h3>Creating directories</h3>
|
||||||
|
<p>Note that with the <q>mkdir</q> action, the directory to create is specified using
|
||||||
|
the <var>remotedir</var> attribute.</p>
|
||||||
|
<p>Create the directory <samp>some/remote/dir</samp> beneath the default root directory. As with all
|
||||||
|
other actions, the directory separator character must be correct according to the desires of the FTP
|
||||||
|
server.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="mkdir"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
remotedir="some/remote/dir"/></pre>
|
||||||
|
|
||||||
|
<h3>Removing directories</h3>
|
||||||
|
<p>This action uses nested fileset elements to select the directories to remove from the remote FTP
|
||||||
|
server. The filesets are relative to the remote directory, not a local directory. The <var>dir</var>
|
||||||
|
attribute of the fileset is ignored completely. The directories to be removed must be empty, or
|
||||||
|
contain only other directories that have been also selected to be removed by the filesets patterns,
|
||||||
|
otherwise a <code>BuildException</code> will be thrown. Also, if you don't have permission to remove
|
||||||
|
a directory, a <code>BuildException</code> is thrown.</p>
|
||||||
|
|
||||||
|
<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to
|
||||||
|
remove <samp>/somedir/dira</samp> directory and all the directory tree starting at, and
|
||||||
|
including, <samp>/somedir/dirb</samp>. When removing the <samp>/somedir/dirb</samp> tree, the task
|
||||||
|
starts at the leaves moving up to the root, so that when it tries to remove a directory it is sure
|
||||||
|
all the directories under it are already removed. Obviously all the files in the tree must have
|
||||||
|
been already deleted.</p>
|
||||||
|
<pre>
|
||||||
|
<ftp action="rmdir"
|
||||||
|
server="ftp.apache.org"
|
||||||
|
userid="anonymous"
|
||||||
|
password="me@myorg.com"
|
||||||
|
remotedir="/somedir" >
|
||||||
|
<fileset>
|
||||||
|
<include name="dira"/>
|
||||||
|
<include name="dirb/**"/>
|
||||||
|
</fileset>
|
||||||
|
</ftp></pre>
|
||||||
|
<p>As an example suppose you want to delete everything contained in <samp>/somedir</samp>, so invoke
|
||||||
|
first the <code><ftp></code> task with <var>action</var>=<q>delete</q>, then
|
||||||
|
with <var>action</var>=<q>rmdir</q> specifying in both cases <var>remotedir</var>=<q>/somedir</q>
|
||||||
|
and</p>
|
||||||
|
<pre>
|
||||||
|
<fileset>
|
||||||
|
<include name="**"/>
|
||||||
|
</fileset></pre>
|
||||||
|
<p>The directory specified in the <var>remotedir</var> parameter is never selected for remove, so if
|
||||||
|
you need to remove it, specify its parent in <var>remotedir</var> parameter and include it in the
|
||||||
|
<code><fileset></code> pattern, like <samp>somedir/**</samp>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,123 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>GenKey Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="genkey">GenKey</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates a key in a keystore.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>alias</td>
|
||||||
|
<td>the alias to add under</td>
|
||||||
|
<td>Yes.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>storepass</td>
|
||||||
|
<td>password for keystore integrity. Must be at least 6 characters long</td>
|
||||||
|
<td>Yes.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keystore</td>
|
||||||
|
<td>keystore location</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>storetype</td>
|
||||||
|
<td>keystore type</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keypass</td>
|
||||||
|
<td>password for private key (if different)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sigalg</td>
|
||||||
|
<td>the algorithm to use in signing</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keyalg</td>
|
||||||
|
<td>the method to use when generating name-value pair</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>(<q>true|false</q>) verbose output when signing</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dname</td>
|
||||||
|
<td>The distinguished name for entity</td>
|
||||||
|
<td>Yes unless <code><dname></code> element is specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>saname</td>
|
||||||
|
<td>The subject alternative name for entity. Requires
|
||||||
|
Java 7 or higher.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>validity</td>
|
||||||
|
<td>(integer) indicates how many days certificate is valid</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keysize</td>
|
||||||
|
<td>(integer) indicates the size of key generated</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>Alternatively you can specify the distinguished name by creating a <code><dname></code>
|
||||||
|
sub-element and populating it with <code><param></code> elements that have a <var>name</var>
|
||||||
|
and a <var>value</var>. When using the subelement, it is automatically encoded properly and commas
|
||||||
|
(<q>,</q>) are replaced with <q>\,</q>.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>The following two examples are identical:</p>
|
||||||
|
<pre>
|
||||||
|
<genkey alias="apache-group" storepass="secret"
|
||||||
|
dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/></pre>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<genkey alias="apache-group" storepass="secret">
|
||||||
|
<dname>
|
||||||
|
<param name="CN" value="Ant Group"/>
|
||||||
|
<param name="OU" value="Jakarta Division"/>
|
||||||
|
<param name="O" value="Apache.Org"/>
|
||||||
|
<param name="C" value="US"/>
|
||||||
|
</dname>
|
||||||
|
</genkey></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,255 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Get Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="get">Get</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Gets files from URLs. When the <var>verbose</var> option is <q>on</q>, this task displays
|
||||||
|
a <q>.</q> for every 100 Kb retrieved. Any URL schema supported by the runtime is valid here,
|
||||||
|
including <q>http:</q>, <q>https:</q>, <q>ftp:</q> and <q>jar:</q>.</p>
|
||||||
|
<p>The <var>usetimestamp</var> option enables you to control downloads so that the remote file is
|
||||||
|
only fetched if newer than the local copy. If there is no local copy, the download always takes
|
||||||
|
place. When a file is downloaded, the timestamp of the downloaded file is set to the remote
|
||||||
|
timestamp. <strong>Note</strong>: This timestamp facility only works on downloads using the HTTP
|
||||||
|
protocol.</p>
|
||||||
|
<p>A username and password can be specified, in which case basic ('slightly encoded plain text')
|
||||||
|
authentication is used. This is only secure over an HTTPS link.</p>
|
||||||
|
|
||||||
|
<p><strong>Proxies</strong>. <em>Since Apache Ant 1.7.0</em>, Ant running on Java 5 or later
|
||||||
|
can <a href="../proxy.html">use the proxy settings of the operating system</a> if enabled with
|
||||||
|
the <kbd>-autoproxy</kbd> command line option. There is also
|
||||||
|
the <a href="../Tasks/setproxy.html"><setproxy></a> task for earlier Java versions. With
|
||||||
|
proxies turned on, <code><get></code> requests against localhost may not work as expected, if
|
||||||
|
the request is relayed to the proxy.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>src</td>
|
||||||
|
<td>the URL from which to retrieve a file.</td>
|
||||||
|
<td>Yes, or a nested resource collection</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dest</td>
|
||||||
|
<td>the file or directory where to store the retrieved file(s).</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>show verbose progress information (<q>on|off</q>).</td>
|
||||||
|
<td>No; default is <q>off</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quiet</td>
|
||||||
|
<td>Log errors only.(<q>true|false</q>).</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignoreerrors</td>
|
||||||
|
<td>Log errors but don't treat as fatal.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>usetimestamp</td>
|
||||||
|
<td>conditionally download a file based on the timestamp of the local copy. HTTP only</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>username</td>
|
||||||
|
<td>username for basic HTTP authentication</td>
|
||||||
|
<td>Yes, if <var>password</var> is set</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>password</td>
|
||||||
|
<td>password for basic HTTP authentication</td>
|
||||||
|
<td>Yes if <var>username</var> is set</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>authenticateOnRedirect</td>
|
||||||
|
<td>Whether the credentials should also be sent to the new location when a redirect is followed.<br/>
|
||||||
|
<em>since Ant 1.10.13</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxtime</td>
|
||||||
|
<td>Maximum time in seconds a single download may take, otherwise it will be interrupted and
|
||||||
|
treated like a download error. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>0</q> which means
|
||||||
|
unlimited</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>retries</td>
|
||||||
|
<td>The number of attempts to make for opening the URI.<br/>The name of the attribute is
|
||||||
|
misleading as a value of <q>1</q> means "don't retry on error" and a value of <q>0</q> meant
|
||||||
|
don't even try to reach the URI at all.<br/><em>since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>3</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>skipexisting</td>
|
||||||
|
<td>skip files that already exist on the local filesystem<br/><em>since Ant 1.8.0</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>httpusecaches</td>
|
||||||
|
<td>HTTP only—if <q>true</q>, allow caching at the <code>HttpUrlConnection</code> level,
|
||||||
|
if <q>false</q>, turn caching off.<br/><strong>Note</strong> this is only a hint to the
|
||||||
|
underlying <code>UrlConnection</code> class, implementations and proxies are free to ignore the
|
||||||
|
setting.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useragent</td>
|
||||||
|
<td><code>User-Agent</code> HTTP header to send.<br/><em>since Ant 1.9.3</em></td>
|
||||||
|
<td>No; defaults to <q>Apache Ant VERSION</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tryGzipEncoding</td>
|
||||||
|
<td>When set to <q>true</q>, Ant will tell the server it is willing to accept gzip encoding to
|
||||||
|
reduce the amount of data to transfer and uncompress the content transparently.<br/>Setting
|
||||||
|
this to <q>true</q> also means Ant will uncompress <code>.tar.gz</code> and similar files
|
||||||
|
automatically.<br/><em>since Ant 1.9.5</em></td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>any resource collection</h4>
|
||||||
|
|
||||||
|
<p><a href="../Types/resources.html#collection">resource collections</a> are used to select groups
|
||||||
|
of URLs to download. If the collection contains more than one resource, the <var>dest</var>
|
||||||
|
attribute must point to a directory if it exists or a directory will be created if it doesn't exist.
|
||||||
|
The destination file name use the last part of the path of the source URL unless you also specify a
|
||||||
|
mapper.</p>
|
||||||
|
|
||||||
|
<h4>mapper</h4>
|
||||||
|
|
||||||
|
<p>You can define name transformations by using a nested <a href="../Types/mapper.html">mapper</a>
|
||||||
|
element. You can also use any filenamemapper type in place of the mapper element.</p>
|
||||||
|
|
||||||
|
<p>The mapper will receive the resource's name as argument. Any resource for which the mapper
|
||||||
|
returns no or more than one mapped name will be skipped. If the returned name is a relative path,
|
||||||
|
it will be considered relative to the <var>dest</var> attribute.</p>
|
||||||
|
|
||||||
|
<h4>header</h4>
|
||||||
|
<p>Any arbitrary number of HTTP headers can be added to a request.<br/>The attributes of a
|
||||||
|
nested <code><header/></code> node are as follows:</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The name or key of this header. Cannot be null or empty. Leading and trailing spaces are
|
||||||
|
removed</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td>The value to assign to the header. Cannot be null or empty. Leading and trailing spaces are
|
||||||
|
removed</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Get the index page of <samp>https://ant.apache.org/</samp>, and store it in the
|
||||||
|
file <samp>help/index.html</samp>.</p>
|
||||||
|
<pre><get src="https://ant.apache.org/" dest="help/index.html"/></pre>
|
||||||
|
|
||||||
|
<p>Get the PGP keys of Ant's (current and past) release managers, if the local copy is missing or
|
||||||
|
out of date. Use the <var>verbose</var> option for progress information.</p>
|
||||||
|
<pre>
|
||||||
|
<get src="https://www.apache.org/dist/ant/KEYS"
|
||||||
|
dest="KEYS"
|
||||||
|
verbose="true"
|
||||||
|
usetimestamp="true"/></pre>
|
||||||
|
|
||||||
|
<p>Fetch some file from a server with access control. Because HTTPS is being used, the fact that
|
||||||
|
basic auth sends passwords in plaintext is moot if you ignore the fact that it is part of your build
|
||||||
|
file which may be readable by third parties. If you need more security, consider using
|
||||||
|
the <a href="input.html">input</a> task to query for a password.</p>
|
||||||
|
<pre>
|
||||||
|
<get src="https://insecure-bank.org/statement/user=1214"
|
||||||
|
dest="statement.html"
|
||||||
|
username="1214"
|
||||||
|
password="secret"/></pre>
|
||||||
|
|
||||||
|
<p>Using a macro like the following</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<macrodef name="get-and-checksum">
|
||||||
|
<attribute name="url"/>
|
||||||
|
<attribute name="dest"/>
|
||||||
|
<sequential>
|
||||||
|
<local name="destdir"/>
|
||||||
|
<dirname property="destdir" file="@{dest}"/>
|
||||||
|
<get dest="${destdir}">
|
||||||
|
<url url="@{url}"/>
|
||||||
|
<url url="@{url}.sha1"/>
|
||||||
|
<firstmatchmapper>
|
||||||
|
<globmapper from="@{url}.sha1" to="@{dest}.sha"/>
|
||||||
|
<globmapper from="@{url}" to="@{dest}"/>
|
||||||
|
</firstmatchmapper>
|
||||||
|
</get>
|
||||||
|
<local name="checksum.matches"/>
|
||||||
|
<local name="checksum.matches.fail"/>
|
||||||
|
<checksum file="@{dest}" algorithm="sha" fileext=".sha"
|
||||||
|
verifyproperty="checksum.matches"/>
|
||||||
|
<condition property="checksum.matches.fail">
|
||||||
|
<equals arg1="${checksum.matches}" arg2="false"/>
|
||||||
|
</condition>
|
||||||
|
<fail if="checksum.matches.fail">Checksum error</fail>
|
||||||
|
</sequential>
|
||||||
|
</macrodef></pre>
|
||||||
|
|
||||||
|
<p>it is possible to download an artifacts together with its SHA1 checksum (assuming a certain
|
||||||
|
naming convention for the checksum file, of course) and validate the checksum on the fly.</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<get dest="downloads">
|
||||||
|
<url url="https://ant.apache.org/index.html"/>
|
||||||
|
<url url="https://ant.apache.org/faq.html"/>
|
||||||
|
</get></pre>
|
||||||
|
|
||||||
|
<p>Using custom HTTP headers</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<get src="https://ant.apache.org/index.html" dest="downloads">
|
||||||
|
<header name="header1" value="headerValue1"/>
|
||||||
|
<header name="header2" value="headerValue2"/>
|
||||||
|
<header name="header3" value="headerValue3"/>
|
||||||
|
</get></pre>
|
||||||
|
|
||||||
|
<p>get the index and FAQ pages of <samp>https://ant.apache.org/</samp>, and store them in the
|
||||||
|
directory <samp>downloads</samp> which will be created if necessary.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>GUnZip Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
This document's new home is <a href="unpack.html">here</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>GZip Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
This document's new home is <a href="pack.html">here</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,83 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>HostInfo Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="hostinfo">HostInfo</h2>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Sets the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code>
|
||||||
|
properties in the current project.</p>
|
||||||
|
<p>
|
||||||
|
The <code>NAME</code> contains the host part of the canonical name of the host.<br/> If the host is
|
||||||
|
not found, the host will contain the name as provided to the task, or <code>localhost</code> if no
|
||||||
|
host was provided, and no name for the local host was found.<br/>The <code>DOMAIN</code> contains
|
||||||
|
the domain part of the canonical name of the host.<br/>If the host is not found, the domain will
|
||||||
|
contain the domain as provided to the task, or <code>localdomain</code> if no host / domain was
|
||||||
|
provided.<br/>The <code>ADDR4</code> contains the IPv4 address of the host with the widest
|
||||||
|
meaning.<br/>If no IPv4 address is found and a host has been provided the
|
||||||
|
address <code>0.0.0.0</code> is returned, when no host was provided the
|
||||||
|
address <code>127.0.0.1</code> is returned.<br/>The <code>ADDR6</code> contains the IPv6 address of
|
||||||
|
the host with the widest meaning.<br/>If no IPv6 address is found and a host has been provided the
|
||||||
|
address <code>::</code> is returned, when no host was provided the address <code>::1</code> is
|
||||||
|
returned.</p>
|
||||||
|
|
||||||
|
<p>These properties can be used in the build-file, for instance, to create host-stamped filenames,
|
||||||
|
or used to replace placeholder tags inside documents to indicate, for example, the host where the
|
||||||
|
build was performed on. The best place for this task is probably in an initialization target.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td>Prefix used for all properties set.</td>
|
||||||
|
<td>No; defaults to no prefix</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>host</td>
|
||||||
|
<td>The host to retrieve the information for.</td>
|
||||||
|
<td>No; default is to retrieve information for the host the task is running on</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Set the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code> for
|
||||||
|
the local host, using the most "global" address available.</p>
|
||||||
|
<pre><hostinfo/></pre>
|
||||||
|
|
||||||
|
<p>Set the properties <code>remotehost.NAME</code>
|
||||||
|
to <samp>eos</samp>, <code>remotehost.DOMAIN</code>
|
||||||
|
to <samp>apache.org</samp>, <code>remotehost.ADDR4</code> to <samp>140.211.11.130</samp>
|
||||||
|
and <code>remotehost.ADDR6</code> to <samp>::</samp> for the host with the
|
||||||
|
name <samp>www.apache.org</samp> (provided the canonical name and IP addresses do not change).</p>
|
||||||
|
<pre><hostinfo prefix="remotehost" host="www.apache.org"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
|
@ -0,0 +1,501 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
|
||||||
|
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
|
||||||
|
<key for="port" id="d1" yfiles.type="portgraphics"/>
|
||||||
|
<key for="port" id="d2" yfiles.type="portgeometry"/>
|
||||||
|
<key for="port" id="d3" yfiles.type="portuserdata"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="node" id="d4"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="node" id="d5"/>
|
||||||
|
<key for="node" id="d6" yfiles.type="nodegraphics"/>
|
||||||
|
<key for="graphml" id="d7" yfiles.type="resources"/>
|
||||||
|
<key for="edge" id="d8" yfiles.type="portconstraints"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="edge" id="d9"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="edge" id="d10"/>
|
||||||
|
<key for="edge" id="d11" yfiles.type="edgegraphics"/>
|
||||||
|
<graph edgedefault="directed" id="G">
|
||||||
|
<data key="d0" xml:space="preserve"/>
|
||||||
|
<node id="n0">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="47.0" width="245.0" x="207.5" y="-113.12162162162163"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="234.9150390625" x="5.04248046875" xml:space="preserve" y="3.0">org.apache.tools.ant.types.DataType<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve"> </y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n1">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="119.51351351351354" width="155.85546875" x="252.0" y="0.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="105.10546875" x="25.375" xml:space="preserve" y="3.0">ImageOperation<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">instructions : Vector</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve">addRotate(Rotate : instr)
|
||||||
|
addDraw(Draw : instr)
|
||||||
|
addText(Text : instr)
|
||||||
|
addScale(Scale : instr)</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n2">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLNoteNode>
|
||||||
|
<y:Geometry height="105.0" width="260.55078125" x="-419.1051056860584" y="469.59294436906373"/>
|
||||||
|
<y:Fill hasColor="false" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="SansSerif" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="88.796875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="250.55078125" x="5.0" xml:space="preserve" y="8.1015625">The setType() method forces type to
|
||||||
|
one of the values of java.awt.geom.Arc2D:
|
||||||
|
open = Arc2D.OPEN
|
||||||
|
pie = Arc2D.PIE
|
||||||
|
chord = Arc2D.CHORD
|
||||||
|
Parameter is not case-sensitive.<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
</y:UMLNoteNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n3">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="88.0" width="168.0" x="-24.0" y="106.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="sides" modelPosition="n" textColor="#000000" verticalTextPosition="bottom" visible="true" width="73.37353515625" x="47.313232421875" xml:space="preserve" y="3.0">BasicShape</y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">stroke_width : int = 0
|
||||||
|
fill : String = "transparent"
|
||||||
|
stroke : String = "black"</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n4">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="76.0" width="366.0" x="537.0" y="105.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="sides" modelPosition="n" textColor="#000000" verticalTextPosition="bottom" visible="true" width="132.33056640625" x="116.834716796875" xml:space="preserve" y="3.0">TransformOperation</y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve">executeTransformOperation(PlanarImage img) : PlanarImage
|
||||||
|
addRectangle(Rectangle instr)</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n5">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="83.94054054054055" width="237.505859375" x="209.59510287695048" y="478.2061205031355"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="98.9482421875" x="69.27880859375" xml:space="preserve" y="26.1328125">DrawOperation<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="interface" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve">executeDrawOperation() : PlanarImage</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n6">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLNoteNode>
|
||||||
|
<y:Geometry height="75.75675675675677" width="216.060546875" x="220.31775912695048" y="635.8665334262349"/>
|
||||||
|
<y:Fill hasColor="false" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="SansSerif" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="60.53125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="206.060546875" x="5.0" xml:space="preserve" y="7.612753378378443">The implementing class uses
|
||||||
|
ColorMapper to evaluate the color.
|
||||||
|
Only the values defined in
|
||||||
|
ColorMapper are used.<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
</y:UMLNoteNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n7">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="271.4234234234233" width="251.275390625" x="562.7103372519505" y="541.3371349640008"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="85.34521484375" x="82.965087890625" xml:space="preserve" y="3.0">ColorMapper<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">COLOR_BLACK : String = "black"
|
||||||
|
COLOR_BLUE : String = "blue"
|
||||||
|
COLOR_CYAN : String = "cyan"
|
||||||
|
COLOR_DARKGRAY : String = "darkgray"
|
||||||
|
COLOR_GRAY : String = "gray"
|
||||||
|
COLOR_LIGHTGRAY : String = "lightgray"
|
||||||
|
COLOR_DARKGREY : String = "darkgrey"
|
||||||
|
COLOR_GREY : String = "grey"
|
||||||
|
COLOR_LIGHTGREY : String = "lightgrey"
|
||||||
|
COLOR_GREEN : String = "green"
|
||||||
|
COLOR_MAGENTA : String = "magenta"
|
||||||
|
COLOR_ORANGE : String = "orange"
|
||||||
|
COLOR_PINK : String = "pink"
|
||||||
|
COLOR_RED : String = "red"
|
||||||
|
COLOR_WHITE : String = "white"
|
||||||
|
COLOR_YELLOW : String = "yellow"</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n8">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="130.0" width="146.0" x="257.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="32.2978515625" x="56.85107421875" xml:space="preserve" y="3.0">Text<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">string : String = ""
|
||||||
|
font : String = "Arial"
|
||||||
|
point : int = 10
|
||||||
|
bold : boolean = false
|
||||||
|
color : String = "black"
|
||||||
|
italic : boolean = false</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n9">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="59.0" width="126.0" x="447.0" y="271.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="44.35205078125" x="40.823974609375" xml:space="preserve" y="3.0">Rotate<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">angle : float = 0.0F</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n10">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="88.0" width="212.0" x="614.0" y="271.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="35.83984375" x="88.080078125" xml:space="preserve" y="3.0">Scale<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">width : String = "100%"
|
||||||
|
height : String = "100%"
|
||||||
|
keepProportions : boolean = false</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n11">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="104.0" width="142.0" x="874.0" y="270.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="36.25244140625" x="52.873779296875" xml:space="preserve" y="3.0">Draw<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">xloc : int = 0
|
||||||
|
yloc : int = 0</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve">addEllipse(Ellipse elip)
|
||||||
|
addArc(Arc arc)</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n12">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="102.0" width="120.0" x="3.168249660787012" y="272.5"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.33740234375" x="27.331298828125" xml:space="preserve" y="3.0">Rectangle<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">height : int = 0
|
||||||
|
width : int = 0
|
||||||
|
archeight : int = 0
|
||||||
|
arcwidth : int = 0</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n13">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="74.0" width="120.0" x="-165.13229308005424" y="270.8783783783784"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="44.37109375" x="37.814453125" xml:space="preserve" y="3.0">Ellipse<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">height : int = 0
|
||||||
|
width : int = 0</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n14">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="115.0" width="167.0" x="-375.3690637720489" y="270.5"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="24.947265625" x="71.0263671875" xml:space="preserve" y="3.0">Arc<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">height : int = 0
|
||||||
|
width : int = 0
|
||||||
|
start : int = 0
|
||||||
|
stop : int = 0
|
||||||
|
type : enumerated = open</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<edge id="e0" source="n1" target="n0">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.11753822740667" xml:space="preserve" y="-42.11074086736787"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e1" source="n3" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="50.41847892259207" xml:space="preserve" y="4.406343693110614"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e2" source="n4" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="30.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-60.071704848044874" xml:space="preserve" y="-56.61291038197166"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e3" source="n5" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-71.15174118848563" xml:space="preserve" y="-152.95377159050008"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e4" source="n5" target="n9">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="94.22024485236568" xml:space="preserve" y="-80.64710502773585"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e5" source="n5" target="n10">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="140.61508526079365" xml:space="preserve" y="-50.905946341704976"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e6" source="n9" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="81.36808268229174" xml:space="preserve" y="-35.51629638671875"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e7" source="n10" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.1015625" xml:space="preserve" y="-54.1005859375"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e8" source="n11" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-17.583335869279836" xml:space="preserve" y="-58.28909731112401"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e9" source="n8" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.08168461626724" xml:space="preserve" y="-85.2969236631651"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e10" source="n5" target="n8">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.446206886230925" xml:space="preserve" y="-47.146909230854135"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e11" source="n6" target="n5">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.101572603512977" xml:space="preserve" y="-45.90001897598199"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e12" source="n7" target="n6">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-67.06248989648702" xml:space="preserve" y="-39.64733927051532"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e13" source="n2" target="n14">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="25.446152710310912" xml:space="preserve" y="-51.156591780311885"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e14" source="n14" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="-50.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="160.70285069869294" xml:space="preserve" y="-37.02040127821758"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e15" source="n13" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="61.78918119362366" xml:space="preserve" y="-30.36348007332839"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e16" source="n12" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="25.390592784586175" xml:space="preserve" y="-48.2745361328125"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
<data key="d7">
|
||||||
|
<y:Resources/>
|
||||||
|
</data>
|
||||||
|
</graphml>
|
|
@ -0,0 +1,584 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Image Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="image">Image</h2>
|
||||||
|
<h3><em><u>Deprecated</u></em></h3>
|
||||||
|
<p><em>This task has been <u>deprecated</u>, because Java Advanced Image API depends on internal
|
||||||
|
classes which were removed in Java 9. Use the <code>ImageIO</code> task instead.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Applies a chain of image operations on a set of files.</p>
|
||||||
|
<p>Requires <a href="../install.html#librarydependencies">Java Advanced Image API</a> from Sun.</p>
|
||||||
|
|
||||||
|
<h5>Overview of used datatypes</h5>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-opacity="1"
|
||||||
|
color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black"
|
||||||
|
stroke-linecap="square" viewBox="0 0 1446 937" stroke-miterlimit="10" shape-rendering="auto"
|
||||||
|
stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1"
|
||||||
|
font-family="Sans-Serif" font-style="normal" stroke-linejoin="miter" font-size="12px" role="img"
|
||||||
|
stroke-dashoffset="0" image-rendering="auto" aria-labelledby="diagramTitle diagramDescription">
|
||||||
|
<title id="diagramTitle">ImageOperation class diagram</title>
|
||||||
|
<desc id="diagramDescription">A diagram of Ant DataType classes used by Image task.</desc>
|
||||||
|
<defs id="genericDefs"/>
|
||||||
|
<g>
|
||||||
|
<defs id="defs1">
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath1">
|
||||||
|
<path d="M0 0 L1446 0 L1446 937 L0 937 L0 0 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath2">
|
||||||
|
<path d="M-425 -119 L1021 -119 L1021 818 L-425 818 L-425 -119 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath3">
|
||||||
|
<path d="M207 -113 L207 -66 L452 -66 L452 -113 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4">
|
||||||
|
<path d="M252 0 L252 119 L407 119 L407 0 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath5">
|
||||||
|
<path d="M-24 106 L-24 194 L144 194 L144 106 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath6">
|
||||||
|
<path d="M537 105 L537 181 L903 181 L903 105 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath7">
|
||||||
|
<path d="M209 478 L209 561 L446 561 L446 478 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath8">
|
||||||
|
<path d="M562 541 L562 812 L813 812 L813 541 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath9">
|
||||||
|
<path d="M257 272 L257 402 L403 402 L403 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath10">
|
||||||
|
<path d="M447 271 L447 330 L573 330 L573 271 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath11">
|
||||||
|
<path d="M614 271 L614 359 L826 359 L826 271 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath12">
|
||||||
|
<path d="M874 270 L874 374 L1016 374 L1016 270 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath13">
|
||||||
|
<path d="M3 272 L3 374 L123 374 L123 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath14">
|
||||||
|
<path d="M-165 270 L-165 344 L-45 344 L-45 270 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath15">
|
||||||
|
<path d="M-375 270 L-375 385 L-208 385 L-208 270 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g fill="rgb(255,204,153)" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)" stroke="rgb(255,204,153)">
|
||||||
|
<rect x="208" width="243" height="45" y="-112" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(255,255,218)" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)" stroke="rgb(255,255,218)">
|
||||||
|
<rect x="207" width="1" height="47" y="-113" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<rect x="208" width="243" height="1" y="-113" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<rect x="208" y="-67" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="244" height="1" stroke="none"/>
|
||||||
|
<rect x="451" y="-113" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="46" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="214.5425" xml:space="preserve" y="-95.5533" clip-path="url(#clipPath3)" stroke="none">org.apache.tools.ant.types.DataType</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="-87" fill="none" x1="208" clip-path="url(#clipPath3)" x2="451" y1="-87"/>
|
||||||
|
<line y2="-77" fill="none" x1="208" clip-path="url(#clipPath3)" x2="451" y1="-77"/>
|
||||||
|
<text stroke-linecap="butt" x="212.5" y="-61.2095" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve"> </text>
|
||||||
|
<rect x="253" y="1" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="153" height="117" stroke="none"/>
|
||||||
|
<rect x="252" y="0" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="119" stroke="none"/>
|
||||||
|
<rect x="253" y="0" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="153" height="1" stroke="none"/>
|
||||||
|
<rect x="253" y="118" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="154" height="1" stroke="none"/>
|
||||||
|
<rect x="406" y="0" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="118" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="279.375" xml:space="preserve" y="17.5684" clip-path="url(#clipPath4)" stroke="none">ImageOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="25" fill="none" x1="253" clip-path="url(#clipPath4)" x2="406" y1="25"/>
|
||||||
|
<text stroke-linecap="butt" x="257" y="41.9121" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">instructions : Vector</text>
|
||||||
|
<line y2="49" fill="none" x1="253" clip-path="url(#clipPath4)" x2="406" y1="49"/>
|
||||||
|
<text stroke-linecap="butt" x="257" y="66.0449" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addRotate(Rotate : instr)</text>
|
||||||
|
<text stroke-linecap="butt" x="257" y="80.1777" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addDraw(Draw : instr)</text>
|
||||||
|
<text stroke-linecap="butt" x="257" y="94.3105" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addText(Text : instr)</text>
|
||||||
|
<text stroke-linecap="butt" x="257" y="108.4434" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addScale(Scale : instr)</text>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M-419.1051 469.593 L-173.5543 469.593 L-173.5543 484.593 L-158.5543 484.593 L-158.5543 574.593 L-419.1051 574.593 Z" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M-173.5543 469.593 L-173.5543 484.593 L-158.5543 484.593 Z" fill-rule="evenodd" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="491.2961" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">The setType() method forces type to</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="505.4289" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">one of the values of java.awt.geom.Arc2D:</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="519.5617" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">open = Arc2D.OPEN</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="533.6945" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">pie = Arc2D.PIE</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="547.8273" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">chord = Arc2D.CHORD</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="561.9601" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">Parameter is not case-sensitive.</text>
|
||||||
|
<rect x="-23" y="107" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="166" height="86" stroke="none"/>
|
||||||
|
<rect x="-24" y="106" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="88" stroke="none"/>
|
||||||
|
<rect x="-23" y="106" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="166" height="1" stroke="none"/>
|
||||||
|
<rect x="-23" y="193" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="167" height="1" stroke="none"/>
|
||||||
|
<rect x="143" y="106" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="87" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="25.3132" xml:space="preserve" y="123.5684" clip-path="url(#clipPath5)" stroke="none">BasicShape</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="131" fill="none" x1="-23" clip-path="url(#clipPath5)" x2="143" y1="131"/>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="147.9121" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">stroke_width : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="162.0449" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">fill : String = "transparent"</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="176.1777" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">stroke : String = "black"</text>
|
||||||
|
<line y2="183" fill="none" x1="-23" clip-path="url(#clipPath5)" x2="143" y1="183"/>
|
||||||
|
<rect x="538" y="106" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="364" height="74" stroke="none"/>
|
||||||
|
<rect x="537" y="105" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="76" stroke="none"/>
|
||||||
|
<rect x="538" y="105" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="364" height="1" stroke="none"/>
|
||||||
|
<rect x="538" y="180" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="365" height="1" stroke="none"/>
|
||||||
|
<rect x="902" y="105" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="75" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="655.8347" xml:space="preserve" y="122.5684" clip-path="url(#clipPath6)" stroke="none">TransformOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="130" fill="none" x1="538" clip-path="url(#clipPath6)" x2="902" y1="130"/>
|
||||||
|
<line y2="140" fill="none" x1="538" clip-path="url(#clipPath6)" x2="902" y1="140"/>
|
||||||
|
<text stroke-linecap="butt" x="542" y="156.9121" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">executeTransformOperation(PlanarImage img) : PlanarImage</text>
|
||||||
|
<text stroke-linecap="butt" x="542" y="171.0449" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addRectangle(Rectangle instr)</text>
|
||||||
|
<rect x="210" y="479" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="235" height="81" stroke="none"/>
|
||||||
|
<rect x="209" y="478" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="83" stroke="none"/>
|
||||||
|
<rect x="210" y="478" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="235" height="1" stroke="none"/>
|
||||||
|
<rect x="210" y="560" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="236" height="1" stroke="none"/>
|
||||||
|
<rect x="445" y="478" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="82" stroke="none"/>
|
||||||
|
<text stroke-linecap="butt" x="283.8344" y="494.8077" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve"><<interface>></text>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="280.8739" xml:space="preserve" y="518.9073" clip-path="url(#clipPath7)" stroke="none">DrawOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="526" fill="none" x1="210" clip-path="url(#clipPath7)" x2="446" y1="526"/>
|
||||||
|
<line y2="536" fill="none" x1="210" clip-path="url(#clipPath7)" x2="446" y1="536"/>
|
||||||
|
<text stroke-linecap="butt" x="214.5951" y="553.251" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">executeDrawOperation() : PlanarImage</text>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M220.3178 635.8665 L421.3783 635.8665 L421.3783 650.8665 L436.3783 650.8665 L436.3783 711.6233 L220.3178 711.6233 Z" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M421.3783 635.8665 L421.3783 650.8665 L436.3783 650.8665 Z" fill-rule="evenodd" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="657.0809" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">The implementing class uses</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="671.2137" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">ColorMapper to evaluate the color.</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="685.3465" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">Only the values defined in</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="699.4793" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">ColorMapper are used.</text>
|
||||||
|
<rect x="563" y="542" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="249" height="269" stroke="none"/>
|
||||||
|
<rect x="562" y="541" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="271" stroke="none"/>
|
||||||
|
<rect x="563" y="541" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="249" height="1" stroke="none"/>
|
||||||
|
<rect x="563" y="811" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="250" height="1" stroke="none"/>
|
||||||
|
<rect x="812" y="541" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="270" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="647.6754" xml:space="preserve" y="558.9055" clip-path="url(#clipPath8)" stroke="none">ColorMapper</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="566" fill="none" x1="563" clip-path="url(#clipPath8)" x2="812" y1="566"/>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="583.2493" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_BLACK : String = "black"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="597.3821" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_BLUE : String = "blue"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="611.5149" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_CYAN : String = "cyan"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="625.6477" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_DARKGRAY : String = "darkgray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="639.7805" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GRAY : String = "gray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="653.9133" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_LIGHTGRAY : String = "lightgray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="668.0461" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_DARKGREY : String = "darkgrey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="682.179" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GREY : String = "grey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="696.3118" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_LIGHTGREY : String = "lightgrey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="710.4446" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GREEN : String = "green"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="724.5774" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_MAGENTA : String = "magenta"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="738.7102" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_ORANGE : String = "orange"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="752.843" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_PINK : String = "pink"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="766.9758" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_RED : String = "red"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="781.1086" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_WHITE : String = "white"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="795.2415" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_YELLOW : String = "yellow"</text>
|
||||||
|
<line y2="802" fill="none" x1="563" clip-path="url(#clipPath8)" x2="812" y1="802"/>
|
||||||
|
<rect x="258" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="144" height="128" stroke="none"/>
|
||||||
|
<rect x="257" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="130" stroke="none"/>
|
||||||
|
<rect x="258" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="144" height="1" stroke="none"/>
|
||||||
|
<rect x="258" y="401" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="145" height="1" stroke="none"/>
|
||||||
|
<rect x="402" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="129" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="315.8511" xml:space="preserve" y="289.5684" clip-path="url(#clipPath9)" stroke="none">Text</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="297" fill="none" x1="258" clip-path="url(#clipPath9)" x2="402" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="262" y="313.9121" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">string : String = ""</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="328.0449" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">font : String = "Arial"</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="342.1777" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">point : int = 10</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="356.3105" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">bold : boolean = false</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="370.4434" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">color : String = "black"</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="384.5762" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">italic : boolean = false</text>
|
||||||
|
<line y2="392" fill="none" x1="258" clip-path="url(#clipPath9)" x2="402" y1="392"/>
|
||||||
|
<rect x="448" y="272" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="124" height="57" stroke="none"/>
|
||||||
|
<rect x="447" y="271" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="59" stroke="none"/>
|
||||||
|
<rect x="448" y="271" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="124" height="1" stroke="none"/>
|
||||||
|
<rect x="448" y="329" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="125" height="1" stroke="none"/>
|
||||||
|
<rect x="572" y="271" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="58" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="489.824" xml:space="preserve" y="288.5684" clip-path="url(#clipPath10)" stroke="none">Rotate</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="296" fill="none" x1="448" clip-path="url(#clipPath10)" x2="572" y1="296"/>
|
||||||
|
<text stroke-linecap="butt" x="452" y="312.9121" clip-path="url(#clipPath10)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">angle : float = 0.0F</text>
|
||||||
|
<line y2="320" fill="none" x1="448" clip-path="url(#clipPath10)" x2="572" y1="320"/>
|
||||||
|
<rect x="615" y="272" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="210" height="86" stroke="none"/>
|
||||||
|
<rect x="614" y="271" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="88" stroke="none"/>
|
||||||
|
<rect x="615" y="271" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="210" height="1" stroke="none"/>
|
||||||
|
<rect x="615" y="358" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="211" height="1" stroke="none"/>
|
||||||
|
<rect x="825" y="271" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="87" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="704.0801" xml:space="preserve" y="288.5684" clip-path="url(#clipPath11)" stroke="none">Scale</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="296" fill="none" x1="615" clip-path="url(#clipPath11)" x2="825" y1="296"/>
|
||||||
|
<text stroke-linecap="butt" x="619" y="312.9121" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : String = "100%"</text>
|
||||||
|
<text stroke-linecap="butt" x="619" y="327.0449" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : String = "100%"</text>
|
||||||
|
<text stroke-linecap="butt" x="619" y="341.1777" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">keepProportions : boolean = false</text>
|
||||||
|
<line y2="348" fill="none" x1="615" clip-path="url(#clipPath11)" x2="825" y1="348"/>
|
||||||
|
<rect x="875" y="271" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="140" height="102" stroke="none"/>
|
||||||
|
<rect x="874" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="104" stroke="none"/>
|
||||||
|
<rect x="875" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="140" height="1" stroke="none"/>
|
||||||
|
<rect x="875" y="373" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="141" height="1" stroke="none"/>
|
||||||
|
<rect x="1015" y="270" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="103" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="928.8738" xml:space="preserve" y="287.5684" clip-path="url(#clipPath12)" stroke="none">Draw</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="295" fill="none" x1="875" clip-path="url(#clipPath12)" x2="1015" y1="295"/>
|
||||||
|
<text stroke-linecap="butt" x="879" y="311.9121" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">xloc : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="326.0449" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">yloc : int = 0</text>
|
||||||
|
<line y2="333" fill="none" x1="875" clip-path="url(#clipPath12)" x2="1015" y1="333"/>
|
||||||
|
<text stroke-linecap="butt" x="879" y="350.1777" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addEllipse(Ellipse elip)</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="364.3105" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addArc(Arc arc)</text>
|
||||||
|
<rect x="4" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="118" height="100" stroke="none"/>
|
||||||
|
<rect x="3" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="102" stroke="none"/>
|
||||||
|
<rect x="4" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="118" height="1" stroke="none"/>
|
||||||
|
<rect x="4" y="373" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="119" height="1" stroke="none"/>
|
||||||
|
<rect x="122" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="101" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="32.4995" xml:space="preserve" y="290.0684" clip-path="url(#clipPath13)" stroke="none">Rectangle</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="297" fill="none" x1="4" clip-path="url(#clipPath13)" x2="122" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="8.1683" y="314.4121" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="8.1683" y="328.5449" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="8.1683" y="342.6777" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">archeight : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="8.1683" y="356.8105" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">arcwidth : int = 0</text>
|
||||||
|
<line y2="364" fill="none" x1="4" clip-path="url(#clipPath13)" x2="122" y1="364"/>
|
||||||
|
<rect x="-164" y="271" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="118" height="72" stroke="none"/>
|
||||||
|
<rect x="-165" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="74" stroke="none"/>
|
||||||
|
<rect x="-164" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="118" height="1" stroke="none"/>
|
||||||
|
<rect x="-164" y="343" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="119" height="1" stroke="none"/>
|
||||||
|
<rect x="-46" y="270" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="73" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="-125.3178" xml:space="preserve" y="288.4467" clip-path="url(#clipPath14)" stroke="none">Ellipse</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="296" fill="none" x1="-164" clip-path="url(#clipPath14)" x2="-46" y1="296"/>
|
||||||
|
<text stroke-linecap="butt" x="-160.1323" y="312.7905" clip-path="url(#clipPath14)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-160.1323" y="326.9233" clip-path="url(#clipPath14)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : int = 0</text>
|
||||||
|
<line y2="334" fill="none" x1="-164" clip-path="url(#clipPath14)" x2="-46" y1="334"/>
|
||||||
|
<rect x="-374" y="271" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="165" height="113" stroke="none"/>
|
||||||
|
<rect x="-375" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="115" stroke="none"/>
|
||||||
|
<rect x="-374" y="270" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="165" height="1" stroke="none"/>
|
||||||
|
<rect x="-374" y="384" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="166" height="1" stroke="none"/>
|
||||||
|
<rect x="-209" y="270" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="114" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="-302.3427" xml:space="preserve" y="288.0684" clip-path="url(#clipPath15)" stroke="none">Arc</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,425,119)">
|
||||||
|
<line y2="295" fill="none" x1="-374" clip-path="url(#clipPath15)" x2="-209" y1="295"/>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="312.4121" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="326.5449" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="340.6777" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">start : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="354.8105" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">stop : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="368.9434" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">type : enumerated = open</text>
|
||||||
|
<line y2="376" fill="none" x1="-374" clip-path="url(#clipPath15)" x2="-209" y1="376"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M329.9567 -0.0165 L329.9814 -51.1265" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
</g>
|
||||||
|
<g stroke-linecap="butt" transform="matrix(1,0,0,1,425,119)" fill="white" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" stroke="white" stroke-miterlimit="1.45">
|
||||||
|
<path d="M329.9886 -66.1265 L323.9809 -50.1294 L335.9809 -50.1236 Z" stroke="none" clip-path="url(#clipPath2)"/>
|
||||||
|
<path fill="none" d="M329.9886 -66.1265 L323.9809 -50.1294 L335.9809 -50.1236 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="358.0742" xml:space="preserve" y="-28.5257" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M143.99 121.9202 L237.7586 90.5711" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M251.9846 85.815 L234.9077 85.1978 L238.7126 96.5786 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M251.9846 85.815 L234.9077 85.1978 L238.7126 96.5786 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="196.4084" xml:space="preserve" y="139.9281" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M537.0108 119.8758 L422.2672 86.5641" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M407.8619 82.3821 L421.5547 92.605 L424.9003 81.0808 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M407.8619 82.3821 L421.5547 92.605 L424.9003 81.0808 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="478.9391" xml:space="preserve" y="76.8644" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M297.9329 478.2198 L91.9199 194.0324" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="228.7811" xml:space="preserve" y="338.8676" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M328.348 635.8402 L328.348 562.1666" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="356.4496" xml:space="preserve" y="603.5417" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M562.7084 675.8958 L436.4021 674.7366" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="497.6459" xml:space="preserve" y="649.85" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M328.7267 478.1836 L329.414 401.9734" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="357.1729" xml:space="preserve" y="444.6382" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M329.9831 271.9873 L329.9472 134.5243" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M329.9433 119.5243 L323.9475 135.5259 L335.9475 135.5227 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M329.9433 119.5243 L323.9475 135.5259 L335.9475 135.5227 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="358.0648" xml:space="preserve" y="200.2919" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M363.0508 478.2094 L485.6221 329.9808" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="459.2711" xml:space="preserve" y="411.1639" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M549.3494 270.988 L657.3173 190.0121" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M669.3173 181.0121 L652.9172 185.8121 L660.1172 195.412 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M669.3173 181.0121 L652.9172 185.8121 L660.1172 195.412 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="632.7175" xml:space="preserve" y="249.0732" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M408.4521 478.2119 L635.9901 359.0106" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="551.0673" xml:space="preserve" y="440.9075" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M720 271.0342 L720 195.9789" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M720 180.9789 L714 196.9789 L726 196.9789 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M720 180.9789 L714 196.9789 L726 196.9789 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="748.1016" xml:space="preserve" y="230.5352" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M879.6588 270.0175 L779.488 190.326" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M767.7495 180.9874 L776.5351 195.6439 L784.0059 186.2532 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M767.7495 180.9874 L776.5351 195.6439 L784.0059 186.2532 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="864.0755" xml:space="preserve" y="225.3299" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M62.2362 272.4581 L61.077 208.976" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M60.8031 193.9785 L55.0962 210.0854 L67.0942 209.8663 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M60.8031 193.9785 L55.0962 210.0854 L67.0942 209.8663 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="89.6268" xml:space="preserve" y="237.7852" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M-66.4496 270.8949 L3.1286 204.3732" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M13.9706 194.0074 L-1.7406 200.7274 L6.5521 209.4011 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M13.9706 194.0074 L-1.7406 200.7274 L6.5521 209.4011 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="-2.6604" xml:space="preserve" y="254.133" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M-289.6512 469.6367 L-290.9686 385.5053" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="-262.205" xml:space="preserve" y="432.0816" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M-271.2088 270.4844 L-38.071 185.6754" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M-23.9747 180.5476 L-41.0619 180.3788 L-36.9596 191.6558 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M-23.9747 180.5476 L-41.0619 180.3788 L-36.9596 191.6558 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="-108.5059" xml:space="preserve" y="247.0655" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Boolean value. If <q>false</q>, note errors to the output but keep going.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>srcdir</td>
|
||||||
|
<td>Directory containing the images.</td>
|
||||||
|
<td>Yes, unless nested fileset is used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>Image encoding type.<br/>Valid (case insensitive)
|
||||||
|
are: <q>jpg</q>, <q>jpeg</q>, <q>tif</q>, <q>tiff</q>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>jpeg</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>overwrite</td>
|
||||||
|
<td>Boolean value. Sets whether or not to overwrite a file if there is naming conflict.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gc</td>
|
||||||
|
<td>Boolean value. Enables garbage collection after each image processed.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td>Directory where the result images are stored.</td>
|
||||||
|
<td>No; defaults to value of <var>srcdir</var></td>
|
||||||
|
</tr>
|
||||||
|
<!-- attributes inherited from MatchingTask -->
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>caseSensitive</td>
|
||||||
|
<td>Boolean value. Sets case sensitivity of the file system.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>followSymlinks</td>
|
||||||
|
<td>Boolean value. Sets whether or not symbolic links should be followed.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> as well as the
|
||||||
|
nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
|
||||||
|
<p>The following ImageOperation objects can be specified as nested
|
||||||
|
elements: <code>Rotate</code>, <code>Scale</code> and <code>Draw</code>.</p>
|
||||||
|
|
||||||
|
<h4>Rotate</h4>
|
||||||
|
<p>Adds a Rotate ImageOperation to chain.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>angle</td>
|
||||||
|
<td>Float value. Sets the angle of rotation in degrees.</td>
|
||||||
|
<td>No; defaults to <q>0.0F</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>Scale</h4>
|
||||||
|
<p>Adds a Scale ImageOperation to chain.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proportions</td>
|
||||||
|
<td>Sets which dimension to control proportions from. Valid values are:
|
||||||
|
<ul>
|
||||||
|
<li><q>ignore</q>—treat the dimensions independently.</li>
|
||||||
|
<li><q>height</q>—keep proportions based on the width.</li>
|
||||||
|
<li><q>width</q>—keep proportions based on the height.</li>
|
||||||
|
<li><q>cover</q>—keep proportions and fit in the supplied dimensions.</li>
|
||||||
|
<li><q>fit</q>—keep proportions and cover the supplied dimensions.</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>ignore</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>width</td>
|
||||||
|
<td>Sets the width of the image, either as an integer (pixels) or a %.</td>
|
||||||
|
<td>No; defaults to <q>100%</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height</td>
|
||||||
|
<td>Sets the height of the image, either as an integer (pixels) or a %.</td>
|
||||||
|
<td>No; defaults to <q>100%</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>Draw</h4>
|
||||||
|
<p>Adds a Draw ImageOperation to chain. DrawOperation DataType objects can be nested inside the Draw
|
||||||
|
object.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>xloc</td>
|
||||||
|
<td>X-Position where to draw nested image elements.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>yloc</td>
|
||||||
|
<td>Y-Position where to draw nested image elements.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>For description of nested elements, please see the documentation
|
||||||
|
of <a href="imageio.html#draw">ImageIO task</a>.</p>
|
||||||
|
|
||||||
|
<h4>mapper</h4>
|
||||||
|
<p><em>Since Apache Ant 1.8.0</em></p>
|
||||||
|
|
||||||
|
<p>You can define filename transformations by using a
|
||||||
|
nested <a href="../Types/mapper.html">mapper</a> element. The default mapper used
|
||||||
|
by <code><image></code> is the <a href="../Types/mapper.html#identity-mapper">identity
|
||||||
|
mapper</a>.</p>
|
||||||
|
|
||||||
|
<p>You can also use a <code>filenamemapper</code> type in place of the <code>mapper</code>
|
||||||
|
element.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Create thumbnails of my images and make sure they all fit within the 160×160 pixel size
|
||||||
|
whether the image is portrait or landscape.</p>
|
||||||
|
<pre>
|
||||||
|
<image destdir="samples/low" overwrite="yes">
|
||||||
|
<fileset dir="samples/full">
|
||||||
|
<include name="**/*.jpg"/>
|
||||||
|
</fileset>
|
||||||
|
<scale width="160" height="160" proportions="fit"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Create a thumbnail for all PNG files in <samp>src</samp> of the size of 40 pixels keeping the
|
||||||
|
proportions and store the <samp>src</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Same as above but store the result in <samp>dest</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" destdir="dest" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Same as above but store the result to files with original names prefixed
|
||||||
|
by <samp>scaled-</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" destdir="dest" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
<globmapper from="*" to="scaled-*"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,498 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
|
||||||
|
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
|
||||||
|
<key for="port" id="d1" yfiles.type="portgraphics"/>
|
||||||
|
<key for="port" id="d2" yfiles.type="portgeometry"/>
|
||||||
|
<key for="port" id="d3" yfiles.type="portuserdata"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="node" id="d4"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="node" id="d5"/>
|
||||||
|
<key for="node" id="d6" yfiles.type="nodegraphics"/>
|
||||||
|
<key for="graphml" id="d7" yfiles.type="resources"/>
|
||||||
|
<key for="edge" id="d8" yfiles.type="portconstraints"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="edge" id="d9"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="edge" id="d10"/>
|
||||||
|
<key for="edge" id="d11" yfiles.type="edgegraphics"/>
|
||||||
|
<graph edgedefault="directed" id="G">
|
||||||
|
<data key="d0" xml:space="preserve"/>
|
||||||
|
<node id="n0">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="47.0" width="245.0" x="207.5" y="-113.12162162162163"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="234.9150390625" x="5.04248046875" xml:space="preserve" y="3.0">org.apache.tools.ant.types.DataType<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve"> </y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n1">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="104.0" width="182.0" x="239.0" y="26.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="105.10546875" x="38.447265625" xml:space="preserve" y="3.0">ImageOperation<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">instructions : List</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve">addDraw(Draw : instr)
|
||||||
|
addRotate(Rotate : instr)
|
||||||
|
addScale(Scale : instr)</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n2">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLNoteNode>
|
||||||
|
<y:Geometry height="105.0" width="260.55078125" x="-419.1051056860584" y="469.59294436906373"/>
|
||||||
|
<y:Fill hasColor="false" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="SansSerif" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="88.796875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="250.55078125" x="5.0" xml:space="preserve" y="8.1015625">The setType() method forces type to
|
||||||
|
one of the values of java.awt.geom.Arc2D:
|
||||||
|
open = Arc2D.OPEN
|
||||||
|
pie = Arc2D.PIE
|
||||||
|
chord = Arc2D.CHORD
|
||||||
|
Parameter is not case-sensitive.<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
</y:UMLNoteNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n3">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="115.0" width="168.0" x="-24.0" y="106.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="sides" modelPosition="n" textColor="#000000" verticalTextPosition="bottom" visible="true" width="73.37353515625" x="47.313232421875" xml:space="preserve" y="3.0">BasicShape</y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">height : int = 0
|
||||||
|
width : int = 0
|
||||||
|
strokeWidth : int = 0
|
||||||
|
stroke : String = "black"
|
||||||
|
fill : String = "transparent"</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n4">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="61.0" width="386.0" x="527.0" y="105.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="sides" modelPosition="n" textColor="#000000" verticalTextPosition="bottom" visible="true" width="132.33056640625" x="126.834716796875" xml:space="preserve" y="3.0">TransformOperation</y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve">executeTransformOperation(BufferedImage img) : BufferedImage</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n5">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="84.0" width="246.0" x="206.0" y="478.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="italic" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="98.9482421875" x="73.52587890625" xml:space="preserve" y="26.1328125">DrawOperation<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="interface" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve">executeDrawOperation() : BufferedImage</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n6">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLNoteNode>
|
||||||
|
<y:Geometry height="75.75675675675677" width="216.060546875" x="220.31775912695048" y="635.8665334262349"/>
|
||||||
|
<y:Fill hasColor="false" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="SansSerif" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="60.53125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="206.060546875" x="5.0" xml:space="preserve" y="7.612753378378443">The implementing class uses
|
||||||
|
ColorMapper to evaluate the color.
|
||||||
|
Only the values defined in
|
||||||
|
ColorMapper are used.<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
</y:UMLNoteNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n7">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="271.4234234234233" width="251.275390625" x="562.7103372519505" y="541.3371349640008"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="85.34521484375" x="82.965087890625" xml:space="preserve" y="3.0">ColorMapper<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">COLOR_BLACK : String = "black"
|
||||||
|
COLOR_BLUE : String = "blue"
|
||||||
|
COLOR_CYAN : String = "cyan"
|
||||||
|
COLOR_DARKGRAY : String = "darkgray"
|
||||||
|
COLOR_GRAY : String = "gray"
|
||||||
|
COLOR_LIGHTGRAY : String = "lightgray"
|
||||||
|
COLOR_DARKGREY : String = "darkgrey"
|
||||||
|
COLOR_GREY : String = "grey"
|
||||||
|
COLOR_LIGHTGREY : String = "lightgrey"
|
||||||
|
COLOR_GREEN : String = "green"
|
||||||
|
COLOR_MAGENTA : String = "magenta"
|
||||||
|
COLOR_ORANGE : String = "orange"
|
||||||
|
COLOR_PINK : String = "pink"
|
||||||
|
COLOR_RED : String = "red"
|
||||||
|
COLOR_WHITE : String = "white"
|
||||||
|
COLOR_YELLOW : String = "yellow"</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n8">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="130.0" width="146.0" x="257.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="32.2978515625" x="56.85107421875" xml:space="preserve" y="3.0">Text<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">string : String = ""
|
||||||
|
font : String = "Arial"
|
||||||
|
point : int = 10
|
||||||
|
bold : boolean = false
|
||||||
|
color : String = "black"
|
||||||
|
italic : boolean = false</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n9">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="59.0" width="122.0" x="449.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="44.35205078125" x="38.823974609375" xml:space="preserve" y="3.0">Rotate<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">angle : float = 0.0F</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n10">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="88.0" width="212.0" x="614.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="35.83984375" x="88.080078125" xml:space="preserve" y="3.0">Scale<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">width : String = "100%"
|
||||||
|
height : String = "100%"
|
||||||
|
keepProportions : boolean = false</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n11">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="130.0" width="180.0" x="874.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="36.25244140625" x="71.873779296875" xml:space="preserve" y="3.0">Draw<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">xloc : int = 0
|
||||||
|
yloc : int = 0</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve">addText(Text : text)
|
||||||
|
addRectangle(Rectangle rect)
|
||||||
|
addEllipse(Ellipse elip)
|
||||||
|
addArc(Arc arc)</y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n12">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="74.0" width="122.0" x="0.0" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.33740234375" x="28.331298828125" xml:space="preserve" y="3.0">Rectangle<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">archeight : int = 0
|
||||||
|
arcwidth : int = 0</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n13">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="45.0" width="122.0" x="-166.13229308005424" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="44.37109375" x="38.814453125" xml:space="preserve" y="3.0">Ellipse<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve"/>
|
||||||
|
<y:MethodLabel xml:space="preserve"> </y:MethodLabel>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n14">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:UMLClassNode>
|
||||||
|
<y:Geometry height="88.0" width="167.0" x="-375.3690637720489" y="272.0"/>
|
||||||
|
<y:Fill color="#FFCC99" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="SansSerif" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="24.947265625" x="71.0263671875" xml:space="preserve" y="3.0">Arc<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
|
||||||
|
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
|
||||||
|
<y:AttributeLabel xml:space="preserve">start : int = 0
|
||||||
|
stop : int = 0
|
||||||
|
type : enumerated = open</y:AttributeLabel>
|
||||||
|
<y:MethodLabel xml:space="preserve"/>
|
||||||
|
</y:UML>
|
||||||
|
</y:UMLClassNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<edge id="e0" source="n1" target="n0">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.1015625" xml:space="preserve" y="-55.113770252949486"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e1" source="n3" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="43.66826814854102" xml:space="preserve" y="7.339041583081126"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e2" source="n4" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="24.541169749339424" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-49.40849066634263" xml:space="preserve" y="-49.29658468306819"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e3" source="n5" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-64.77475497688485" xml:space="preserve" y="-139.5514023191172"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e4" source="n5" target="n9">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="93.83537882510757" xml:space="preserve" y="-80.02171272585866"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e5" source="n5" target="n10">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="141.8268161095399" xml:space="preserve" y="-51.25926438261342"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e6" source="n9" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="88.76195858042456" xml:space="preserve" y="-44.07133119943154"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e7" source="n10" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.1015625" xml:space="preserve" y="-62.0430908203125"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e8" source="n11" target="n4">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-26.439794564087606" xml:space="preserve" y="-66.58883222234243"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e9" source="n8" target="n1">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.1015625" xml:space="preserve" y="-80.0950927734375"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e10" source="n5" target="n8">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.309432546745086" xml:space="preserve" y="-47.024658203125"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e11" source="n6" target="n5">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="26.258473013120465" xml:space="preserve" y="-46.00484363844498"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e12" source="n7" target="n6">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="-67.06248989648702" xml:space="preserve" y="-39.64733927051532"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e13" source="n2" target="n14">
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#808080" type="dashed" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="none"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="25.296792915327387" xml:space="preserve" y="-63.858496077186885"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e14" source="n14" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="-39.69264350185832" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="158.34186581905368" xml:space="preserve" y="-29.575788755683107"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e15" source="n13" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="58.336471410972415" xml:space="preserve" y="-20.144000203114217"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="e16" source="n12" target="n3">
|
||||||
|
<data key="d9" xml:space="preserve"/>
|
||||||
|
<data key="d11">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="white_delta"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="DejaVu Sans Mono" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.796875" x="25.926868159120588" xml:space="preserve" y="-34.5875244140625"> <y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="true"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
<data key="d7">
|
||||||
|
<y:Resources/>
|
||||||
|
</data>
|
||||||
|
</graphml>
|
|
@ -0,0 +1,698 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Image Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="imageio">ImageIO</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Applies a chain of image operations on a set of files.</p>
|
||||||
|
<p>Uses AWT and ImageIO; replaces <a href="image.html">image</a> task for Java 9+. The task can be
|
||||||
|
used with Java 8 as well, see parameter table for limitations.</p>
|
||||||
|
<p><strong>Note</strong>: this task tries to stay as close as possible to syntax and semantics
|
||||||
|
of <code>image</code> task. However, it uses <var>format</var> attribute rather
|
||||||
|
than <var>encoding</var> attribute, because the latter is a misnomer: almost all tasks use similar
|
||||||
|
attributes for character encodings in files, file names or other strings. Also,
|
||||||
|
when <var>format</var> is not specified, its value is defined by the format of the first processed
|
||||||
|
image file.</p>
|
||||||
|
<h5>Overview of used datatypes</h5>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-opacity="1"
|
||||||
|
color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black"
|
||||||
|
stroke-linecap="square" viewBox="0 0 1504 957" stroke-miterlimit="10" shape-rendering="auto"
|
||||||
|
stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1"
|
||||||
|
font-family="Sans-Serif" font-style="normal" stroke-linejoin="miter" font-size="12px" role="img"
|
||||||
|
stroke-dashoffset="0" image-rendering="auto" aria-labelledby="diagramTitle diagramDescription">
|
||||||
|
<title id="diagramTitle">ImageOperation class diagram</title>
|
||||||
|
<desc id="diagramDescription">A diagram of Ant DataType classes used by ImageIO task.</desc>
|
||||||
|
<defs id="genericDefs"/>
|
||||||
|
<g>
|
||||||
|
<defs id="defs1">
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath1">
|
||||||
|
<path d="M0 0 L1504 0 L1504 957 L0 957 L0 0 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath2">
|
||||||
|
<path d="M-435 -129 L1069 -129 L1069 828 L-435 828 L-435 -129 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath3">
|
||||||
|
<path d="M207 -113 L207 -66 L452 -66 L452 -113 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4">
|
||||||
|
<path d="M239 26 L239 130 L421 130 L421 26 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath5">
|
||||||
|
<path d="M-24 106 L-24 221 L144 221 L144 106 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath6">
|
||||||
|
<path d="M527 105 L527 166 L913 166 L913 105 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath7">
|
||||||
|
<path d="M206 478 L206 562 L452 562 L452 478 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath8">
|
||||||
|
<path d="M562 541 L562 812 L813 812 L813 541 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath9">
|
||||||
|
<path d="M257 272 L257 402 L403 402 L403 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath10">
|
||||||
|
<path d="M449 272 L449 331 L571 331 L571 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath11">
|
||||||
|
<path d="M614 272 L614 360 L826 360 L826 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath12">
|
||||||
|
<path d="M874 272 L874 402 L1054 402 L1054 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath13">
|
||||||
|
<path d="M0 272 L0 346 L122 346 L122 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath14">
|
||||||
|
<path d="M-166 272 L-166 317 L-44 317 L-44 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath15">
|
||||||
|
<path d="M-375 272 L-375 360 L-208 360 L-208 272 Z"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g fill="white" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="translate(435,129)" stroke="white">
|
||||||
|
<rect x="-435" width="1504" height="957" y="-129" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(255,204,153)" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)" stroke="rgb(255,204,153)">
|
||||||
|
<rect x="208" width="243" height="45" y="-112" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<rect x="207" y="-113" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="47" stroke="none"/>
|
||||||
|
<rect x="208" y="-113" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="243" height="1" stroke="none"/>
|
||||||
|
<rect x="208" y="-67" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="244" height="1" stroke="none"/>
|
||||||
|
<rect x="451" y="-113" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="46" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="214.5425" xml:space="preserve" y="-95.5533" clip-path="url(#clipPath3)" stroke="none">org.apache.tools.ant.types.DataType</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="-87" fill="none" x1="208" clip-path="url(#clipPath3)" x2="451" y1="-87"/>
|
||||||
|
<line y2="-77" fill="none" x1="208" clip-path="url(#clipPath3)" x2="451" y1="-77"/>
|
||||||
|
<text stroke-linecap="butt" x="212.5" y="-61.2095" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve"> </text>
|
||||||
|
<rect x="240" y="27" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="180" height="102" stroke="none"/>
|
||||||
|
<rect x="239" y="26" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="104" stroke="none"/>
|
||||||
|
<rect x="240" y="26" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="180" height="1" stroke="none"/>
|
||||||
|
<rect x="240" y="129" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="181" height="1" stroke="none"/>
|
||||||
|
<rect x="420" y="26" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="103" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="279.4473" xml:space="preserve" y="43.5684" clip-path="url(#clipPath4)" stroke="none">ImageOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="51" fill="none" x1="240" clip-path="url(#clipPath4)" x2="420" y1="51"/>
|
||||||
|
<text stroke-linecap="butt" x="244" y="67.9121" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">instructions : List</text>
|
||||||
|
<line y2="75" fill="none" x1="240" clip-path="url(#clipPath4)" x2="420" y1="75"/>
|
||||||
|
<text stroke-linecap="butt" x="244" y="92.0449" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addDraw(Draw : instr)</text>
|
||||||
|
<text stroke-linecap="butt" x="244" y="106.1777" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addRotate(Rotate : instr)</text>
|
||||||
|
<text stroke-linecap="butt" x="244" y="120.3105" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addScale(Scale : instr)</text>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M-419.1051 469.593 L-173.5543 469.593 L-173.5543 484.593 L-158.5543 484.593 L-158.5543 574.593 L-419.1051 574.593 Z" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M-173.5543 469.593 L-173.5543 484.593 L-158.5543 484.593 Z" fill-rule="evenodd" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="491.2961" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">The setType() method forces type to</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="505.4289" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">one of the values of java.awt.geom.Arc2D:</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="519.5617" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">open = Arc2D.OPEN</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="533.6945" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">pie = Arc2D.PIE</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="547.8273" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">chord = Arc2D.CHORD</text>
|
||||||
|
<text stroke-linecap="butt" x="-412.1051" y="561.9601" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">Parameter is not case-sensitive.</text>
|
||||||
|
<rect x="-23" y="107" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="166" height="113" stroke="none"/>
|
||||||
|
<rect x="-24" y="106" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="115" stroke="none"/>
|
||||||
|
<rect x="-23" y="106" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="166" height="1" stroke="none"/>
|
||||||
|
<rect x="-23" y="220" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="167" height="1" stroke="none"/>
|
||||||
|
<rect x="143" y="106" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="114" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="25.3132" xml:space="preserve" y="123.5684" clip-path="url(#clipPath5)" stroke="none">BasicShape</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="131" fill="none" x1="-23" clip-path="url(#clipPath5)" x2="143" y1="131"/>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="147.9121" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="162.0449" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="176.1777" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">strokeWidth : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="190.3105" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">stroke : String = "black"</text>
|
||||||
|
<text stroke-linecap="butt" x="-19" y="204.4434" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">fill : String = "transparent"</text>
|
||||||
|
<line y2="211" fill="none" x1="-23" clip-path="url(#clipPath5)" x2="143" y1="211"/>
|
||||||
|
<rect x="528" y="106" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="384" height="59" stroke="none"/>
|
||||||
|
<rect x="527" y="105" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="61" stroke="none"/>
|
||||||
|
<rect x="528" y="105" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="384" height="1" stroke="none"/>
|
||||||
|
<rect x="528" y="165" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="385" height="1" stroke="none"/>
|
||||||
|
<rect x="912" y="105" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="60" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="655.8347" xml:space="preserve" y="122.5684" clip-path="url(#clipPath6)" stroke="none">TransformOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="130" fill="none" x1="528" clip-path="url(#clipPath6)" x2="912" y1="130"/>
|
||||||
|
<line y2="140" fill="none" x1="528" clip-path="url(#clipPath6)" x2="912" y1="140"/>
|
||||||
|
<text stroke-linecap="butt" x="532" y="156.9121" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">executeTransformOperation(BufferedImage img) : BufferedImage</text>
|
||||||
|
<rect x="207" y="479" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="244" height="82" stroke="none"/>
|
||||||
|
<rect x="206" y="478" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="84" stroke="none"/>
|
||||||
|
<rect x="207" y="478" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="244" height="1" stroke="none"/>
|
||||||
|
<rect x="207" y="561" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="245" height="1" stroke="none"/>
|
||||||
|
<rect x="451" y="478" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="83" stroke="none"/>
|
||||||
|
<text stroke-linecap="butt" x="284.4863" y="494.6016" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve"><<interface>></text>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" font-style="italic" stroke-miterlimit="1.45">
|
||||||
|
<text x="281.5259" xml:space="preserve" y="518.7012" clip-path="url(#clipPath7)" stroke="none">DrawOperation</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="526" fill="none" x1="207" clip-path="url(#clipPath7)" x2="451" y1="526"/>
|
||||||
|
<line y2="536" fill="none" x1="207" clip-path="url(#clipPath7)" x2="451" y1="536"/>
|
||||||
|
<text stroke-linecap="butt" x="211" y="553.0449" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">executeDrawOperation() : BufferedImage</text>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M220.3178 635.8665 L421.3783 635.8665 L421.3783 650.8665 L436.3783 650.8665 L436.3783 711.6233 L220.3178 711.6233 Z" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M421.3783 635.8665 L421.3783 650.8665 L436.3783 650.8665 Z" fill-rule="evenodd" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="657.0809" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">The implementing class uses</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="671.2137" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">ColorMapper to evaluate the color.</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="685.3465" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">Only the values defined in</text>
|
||||||
|
<text stroke-linecap="butt" x="227.3178" y="699.4793" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">ColorMapper are used.</text>
|
||||||
|
<rect x="563" y="542" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="249" height="269" stroke="none"/>
|
||||||
|
<rect x="562" y="541" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="271" stroke="none"/>
|
||||||
|
<rect x="563" y="541" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="249" height="1" stroke="none"/>
|
||||||
|
<rect x="563" y="811" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="250" height="1" stroke="none"/>
|
||||||
|
<rect x="812" y="541" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="270" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="647.6754" xml:space="preserve" y="558.9055" clip-path="url(#clipPath8)" stroke="none">ColorMapper</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="566" fill="none" x1="563" clip-path="url(#clipPath8)" x2="812" y1="566"/>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="583.2493" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_BLACK : String = "black"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="597.3821" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_BLUE : String = "blue"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="611.5149" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_CYAN : String = "cyan"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="625.6477" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_DARKGRAY : String = "darkgray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="639.7805" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GRAY : String = "gray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="653.9133" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_LIGHTGRAY : String = "lightgray"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="668.0461" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_DARKGREY : String = "darkgrey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="682.179" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GREY : String = "grey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="696.3118" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_LIGHTGREY : String = "lightgrey"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="710.4446" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_GREEN : String = "green"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="724.5774" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_MAGENTA : String = "magenta"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="738.7102" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_ORANGE : String = "orange"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="752.843" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_PINK : String = "pink"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="766.9758" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_RED : String = "red"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="781.1086" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_WHITE : String = "white"</text>
|
||||||
|
<text stroke-linecap="butt" x="567.7103" y="795.2415" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">COLOR_YELLOW : String = "yellow"</text>
|
||||||
|
<line y2="802" fill="none" x1="563" clip-path="url(#clipPath8)" x2="812" y1="802"/>
|
||||||
|
<rect x="258" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="144" height="128" stroke="none"/>
|
||||||
|
<rect x="257" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="130" stroke="none"/>
|
||||||
|
<rect x="258" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="144" height="1" stroke="none"/>
|
||||||
|
<rect x="258" y="401" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="145" height="1" stroke="none"/>
|
||||||
|
<rect x="402" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="129" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="315.8511" xml:space="preserve" y="289.5684" clip-path="url(#clipPath9)" stroke="none">Text</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="258" clip-path="url(#clipPath9)" x2="402" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="262" y="313.9121" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">string : String = ""</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="328.0449" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">font : String = "Arial"</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="342.1777" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">point : int = 10</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="356.3105" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">bold : boolean = false</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="370.4434" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">color : String = "black"</text>
|
||||||
|
<text stroke-linecap="butt" x="262" y="384.5762" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">italic : boolean = false</text>
|
||||||
|
<line y2="392" fill="none" x1="258" clip-path="url(#clipPath9)" x2="402" y1="392"/>
|
||||||
|
<rect x="450" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="120" height="57" stroke="none"/>
|
||||||
|
<rect x="449" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="59" stroke="none"/>
|
||||||
|
<rect x="450" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="120" height="1" stroke="none"/>
|
||||||
|
<rect x="450" y="330" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="121" height="1" stroke="none"/>
|
||||||
|
<rect x="570" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="58" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="489.824" xml:space="preserve" y="289.5684" clip-path="url(#clipPath10)" stroke="none">Rotate</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="450" clip-path="url(#clipPath10)" x2="570" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="454" y="313.9121" clip-path="url(#clipPath10)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">angle : float = 0.0F</text>
|
||||||
|
<line y2="321" fill="none" x1="450" clip-path="url(#clipPath10)" x2="570" y1="321"/>
|
||||||
|
<rect x="615" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="210" height="86" stroke="none"/>
|
||||||
|
<rect x="614" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="88" stroke="none"/>
|
||||||
|
<rect x="615" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="210" height="1" stroke="none"/>
|
||||||
|
<rect x="615" y="359" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="211" height="1" stroke="none"/>
|
||||||
|
<rect x="825" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="87" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="704.0801" xml:space="preserve" y="289.5684" clip-path="url(#clipPath11)" stroke="none">Scale</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="615" clip-path="url(#clipPath11)" x2="825" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="619" y="313.9121" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">width : String = "100%"</text>
|
||||||
|
<text stroke-linecap="butt" x="619" y="328.0449" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">height : String = "100%"</text>
|
||||||
|
<text stroke-linecap="butt" x="619" y="342.1777" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">keepProportions : boolean = false</text>
|
||||||
|
<line y2="349" fill="none" x1="615" clip-path="url(#clipPath11)" x2="825" y1="349"/>
|
||||||
|
<rect x="875" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="178" height="128" stroke="none"/>
|
||||||
|
<rect x="874" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="130" stroke="none"/>
|
||||||
|
<rect x="875" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="178" height="1" stroke="none"/>
|
||||||
|
<rect x="875" y="401" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="179" height="1" stroke="none"/>
|
||||||
|
<rect x="1053" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="129" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="947.8738" xml:space="preserve" y="289.5684" clip-path="url(#clipPath12)" stroke="none">Draw</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="875" clip-path="url(#clipPath12)" x2="1053" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="879" y="313.9121" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">xloc : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="328.0449" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">yloc : int = 0</text>
|
||||||
|
<line y2="335" fill="none" x1="875" clip-path="url(#clipPath12)" x2="1053" y1="335"/>
|
||||||
|
<text stroke-linecap="butt" x="879" y="352.1777" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addText(Text : text)</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="366.3105" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addRectangle(Rectangle rect)</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="380.4434" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addEllipse(Ellipse elip)</text>
|
||||||
|
<text stroke-linecap="butt" x="879" y="394.5762" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">addArc(Arc arc)</text>
|
||||||
|
<rect x="1" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="120" height="72" stroke="none"/>
|
||||||
|
<rect x="0" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="74" stroke="none"/>
|
||||||
|
<rect x="1" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="120" height="1" stroke="none"/>
|
||||||
|
<rect x="1" y="345" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="121" height="1" stroke="none"/>
|
||||||
|
<rect x="121" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="73" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="30.3313" xml:space="preserve" y="289.5684" clip-path="url(#clipPath13)" stroke="none">Rectangle</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="1" clip-path="url(#clipPath13)" x2="121" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="5" y="313.9121" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">archeight : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="5" y="328.0449" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">arcwidth : int = 0</text>
|
||||||
|
<line y2="335" fill="none" x1="1" clip-path="url(#clipPath13)" x2="121" y1="335"/>
|
||||||
|
<rect x="-165" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="120" height="43" stroke="none"/>
|
||||||
|
<rect x="-166" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="45" stroke="none"/>
|
||||||
|
<rect x="-165" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="120" height="1" stroke="none"/>
|
||||||
|
<rect x="-165" y="316" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="121" height="1" stroke="none"/>
|
||||||
|
<rect x="-45" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="44" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="-125.3178" xml:space="preserve" y="289.5684" clip-path="url(#clipPath14)" stroke="none">Ellipse</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="-165" clip-path="url(#clipPath14)" x2="-45" y1="297"/>
|
||||||
|
<line y2="307" fill="none" x1="-165" clip-path="url(#clipPath14)" x2="-45" y1="307"/>
|
||||||
|
<text stroke-linecap="butt" x="-161.1323" y="323.9121" clip-path="url(#clipPath14)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve"> </text>
|
||||||
|
<rect x="-374" y="273" clip-path="url(#clipPath2)" fill="rgb(255,204,153)" width="165" height="86" stroke="none"/>
|
||||||
|
<rect x="-375" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="1" height="88" stroke="none"/>
|
||||||
|
<rect x="-374" y="272" clip-path="url(#clipPath2)" fill="rgb(255,255,218)" width="165" height="1" stroke="none"/>
|
||||||
|
<rect x="-374" y="359" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="166" height="1" stroke="none"/>
|
||||||
|
<rect x="-209" y="272" clip-path="url(#clipPath2)" fill="rgb(178,142,107)" width="1" height="87" stroke="none"/>
|
||||||
|
</g>
|
||||||
|
<g font-size="13px" stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" text-rendering="geometricPrecision" font-family="sans-serif" shape-rendering="geometricPrecision" stroke-miterlimit="1.45">
|
||||||
|
<text x="-302.3427" xml:space="preserve" y="289.5684" clip-path="url(#clipPath15)" stroke="none">Arc</text>
|
||||||
|
</g>
|
||||||
|
<g text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,435,129)">
|
||||||
|
<line y2="297" fill="none" x1="-374" clip-path="url(#clipPath15)" x2="-209" y1="297"/>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="313.9121" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">start : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="328.0449" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">stop : int = 0</text>
|
||||||
|
<text stroke-linecap="butt" x="-370.369" y="342.1777" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" stroke-miterlimit="1.45" xml:space="preserve">type : enumerated = open</text>
|
||||||
|
<line y2="349" fill="none" x1="-374" clip-path="url(#clipPath15)" x2="-209" y1="349"/>
|
||||||
|
<path fill="none" stroke-miterlimit="1.45" d="M330 25.9866 L330 -51.1105" clip-path="url(#clipPath2)" stroke-linecap="butt"/>
|
||||||
|
</g>
|
||||||
|
<g stroke-linecap="butt" transform="matrix(1,0,0,1,435,129)" fill="white" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" stroke="white" stroke-miterlimit="1.45">
|
||||||
|
<path d="M330 -66.1105 L324 -50.1105 L336 -50.1105 Z" stroke="none" clip-path="url(#clipPath2)"/>
|
||||||
|
<path fill="none" d="M330 -66.1105 L324 -50.1105 L336 -50.1105 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="358.1016" xml:space="preserve" y="-15.5257" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M144.0125 136.8961 L224.6586 111.3581" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M238.9587 106.8297 L221.8939 105.9399 L225.5166 117.3801 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M238.9587 106.8297 L221.8939 105.9399 L225.5166 117.3801 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="189.6807" xml:space="preserve" y="157.8367" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M527.0471 119.4512 L435.6495 100.2246" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M420.9707 97.1368 L435.3929 106.302 L437.8632 94.559 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M420.9707 97.1368 L435.3929 106.302 L437.8632 94.559 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="479.6386" xml:space="preserve" y="83.7562" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M297.296 477.9833 L103.3633 220.9684" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="234.5212" xml:space="preserve" y="352.0335" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M328.5086 635.8717 L328.8219 562.0092" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="356.7671" xml:space="preserve" y="603.4684" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M562.7084 675.8958 L436.4021 674.7366" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="497.6459" xml:space="preserve" y="649.85" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M329.2297 477.9583 L329.6448 402.0074" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="357.5392" xml:space="preserve" y="444.5352" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M330 272.0287 L330 144.9652" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M330 129.9652 L324 145.9652 L336 145.9652 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M330 129.9652 L324 145.9652 L336 145.9652 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="358.1016" xml:space="preserve" y="205.5352" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M363.7992 477.991 L485.5677 330.9942" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="459.6346" xml:space="preserve" y="411.5709" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M547.2986 272.0164 L669.6319 175.3148" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M681.3994 166.0128 L665.1266 171.2279 L672.5682 180.6419 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M681.3994 166.0128 L665.1266 171.2279 L672.5682 180.6419 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="638.0605" xml:space="preserve" y="241.5466" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M409.4958 478.0022 L635.665 360.0009" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="553.3226" xml:space="preserve" y="440.3445" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M720 271.9767 L720 180.9874" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M720 165.9874 L714 181.9874 L726 181.9874 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M720 165.9874 L714 181.9874 L726 181.9874 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="748.1016" xml:space="preserve" y="223.5352" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M885.2778 271.9897 L768.5073 175.5583" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M756.9413 166.0069 L765.4578 180.8214 L773.0989 171.5687 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M756.9413 166.0069 L765.4578 180.8214 L773.0989 171.5687 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="860.838" xml:space="preserve" y="219.0024" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M60.7458 272.0211 L60.4984 236.019" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M60.3953 221.0194 L54.5054 237.0602 L66.5051 236.9778 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M60.3953 221.0194 L54.5054 237.0602 L66.5051 236.9778 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="88.6727" xml:space="preserve" y="251.0352" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M-76.7703 272.0004 L-24.2436 230.3307" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M-12.4923 221.0084 L-28.756 226.2517 L-21.2981 235.6528 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M-12.4923 221.0084 L-28.756 226.2517 L-21.2981 235.6528 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="-16.4339" xml:space="preserve" y="265.4579" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" stroke-dasharray="6,2" d="M-289.604 469.5886 L-291.2204 359.9842" clip-path="url(#clipPath2)" stroke="gray"/>
|
||||||
|
<text fill="black" x="-262.3073" xml:space="preserve" y="419.3316" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
<path fill="none" d="M-278.4248 271.9972 L-38.2704 195.005" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<path d="M-23.9865 190.4256 L-41.0544 189.5967 L-37.391 201.0238 Z" clip-path="url(#clipPath2)" stroke="none"/>
|
||||||
|
<path fill="none" d="M-23.9865 190.4256 L-41.0544 189.5967 L-37.391 201.0238 Z" clip-path="url(#clipPath2)" stroke="black"/>
|
||||||
|
<text fill="black" x="-118.083" xml:space="preserve" y="256.023" clip-path="url(#clipPath2)" stroke="none"> </text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Boolean value. If <q>false</q>, note errors to the output but keep going.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>srcdir</td>
|
||||||
|
<td>Directory containing the images.</td>
|
||||||
|
<td>Yes, unless nested fileset is used</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>format</td>
|
||||||
|
<td>Image format.<br/>Valid (case insensitive)
|
||||||
|
are: <q>bmp</q>, <q>gif</q>, <q>jpeg</q>, <q>jpg</q>, <q>png</q>, <q>tif</q>, <q>tiff</q>, <q>wbmp</q>
|
||||||
|
(Java 8 VM lacks support for TIFF, which can be provided
|
||||||
|
by <a href="../install.html#librarydependencies">external libraries</a>).</td>
|
||||||
|
<td>No; defaults to the format of the (first) original file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>overwrite</td>
|
||||||
|
<td>Boolean value. Sets whether or not to overwrite a file if there is naming conflict.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gc</td>
|
||||||
|
<td>Boolean value. Enables garbage collection after each image processed.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td>Directory where the result images are stored.</td>
|
||||||
|
<td>No; defaults to value of <var>srcdir</var></td>
|
||||||
|
</tr>
|
||||||
|
<!-- attributes inherited from MatchingTask -->
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>caseSensitive</td>
|
||||||
|
<td>Boolean value. Sets case sensitivity of the file system.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>followSymlinks</td>
|
||||||
|
<td>Boolean value. Sets whether or not symbolic links should be followed.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> as well as the
|
||||||
|
nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
|
||||||
|
<p>The following ImageOperation objects can be specified as nested
|
||||||
|
elements: <code>Rotate</code>, <code>Scale</code> and <code>Draw</code>.</p>
|
||||||
|
|
||||||
|
<h4>Rotate</h4>
|
||||||
|
<p>Adds a Rotate ImageOperation to chain.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>angle</td>
|
||||||
|
<td>Float value. Sets the angle of rotation in degrees.</td>
|
||||||
|
<td>No; defaults to <q>0.0F</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>Scale</h4>
|
||||||
|
<p>Adds a Scale ImageOperation to chain.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proportions</td>
|
||||||
|
<td>Sets which dimension to control proportions from. Valid values are:
|
||||||
|
<ul>
|
||||||
|
<li><q>ignore</q>—treat the dimensions independently.</li>
|
||||||
|
<li><q>height</q>—keep proportions based on the width.</li>
|
||||||
|
<li><q>width</q>—keep proportions based on the height.</li>
|
||||||
|
<li><q>cover</q>—keep proportions and fit in the supplied dimensions.</li>
|
||||||
|
<li><q>fit</q>—keep proportions and cover the supplied dimensions.</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>ignore</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>width</td>
|
||||||
|
<td>Sets the width of the image, either as an integer (pixels) or a %.</td>
|
||||||
|
<td>No; defaults to <q>100%</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height</td>
|
||||||
|
<td>Sets the height of the image, either as an integer (pixels) or a %.</td>
|
||||||
|
<td>No; defaults to <q>100%</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="draw">Draw</h4>
|
||||||
|
<p>Adds a Draw ImageOperation to chain. DrawOperation DataType objects can be nested inside the Draw
|
||||||
|
object.</p>
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>xloc</td>
|
||||||
|
<td>X-Position where to draw nested image elements.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>yloc</td>
|
||||||
|
<td>Y-Position where to draw nested image elements.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h5>Nested elements</h5>
|
||||||
|
<p>Both Text and BasicShape objects can be nested. Currently supported BasicShape objects are Arc,
|
||||||
|
Ellipse and Rectangle.</p>
|
||||||
|
<h6>Common parameters of BasicShape objects</h6>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height</td>
|
||||||
|
<td>Height of a BasicShape.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>width</td>
|
||||||
|
<td>Width of a BasicShape.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>strokewidth</td>
|
||||||
|
<td>Stroke width of a BasicShape.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>color</td>
|
||||||
|
<td>Color of a BasicShape.</td>
|
||||||
|
<td>No; defaults to <q>black</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fill</td>
|
||||||
|
<td>Fill of a BasicShape.</td>
|
||||||
|
<td>No; defaults to <q>transparent</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h6>Parameters specific to Arc objects</h6>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>start</td>
|
||||||
|
<td>Start angle of an arc in degrees.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>stop</td>
|
||||||
|
<td>Angle extent of an arc in degrees.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>One of <q>chord</q>, <q>open</q>, <q>pie</q>.</td>
|
||||||
|
<td>No; defaults to <q>open</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h6>Parameters specific to Ellipse objects</h6>
|
||||||
|
<p>None.</p>
|
||||||
|
<h6>Parameters specific to Rectangle objects</h6>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>archeight</td>
|
||||||
|
<td>Vertical diameter of the arc at the corners of the rectangle.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>arcwidth</td>
|
||||||
|
<td>Horisontal diameter of the arc at the corners of the rectangle.</td>
|
||||||
|
<td>No; defaults to <q>0</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h6>Parameters of Text</h6>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>string</td>
|
||||||
|
<td>The text string.</td>
|
||||||
|
<td>No; defaults to <q></q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>font</td>
|
||||||
|
<td>The font to set the text in.</td>
|
||||||
|
<td>No; defaults to <q>Arial</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>point</td>
|
||||||
|
<td>Size of the font in points.</td>
|
||||||
|
<td>No; defaults to <q>10</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bold</td>
|
||||||
|
<td>Whether the font is bold.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>color</td>
|
||||||
|
<td>Color of the text.</td>
|
||||||
|
<td>No; defaults to <q>black</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>italic</td>
|
||||||
|
<td>Whether the font is italic.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h4>mapper</h4>
|
||||||
|
<p>You can define filename transformations by using a
|
||||||
|
nested <a href="../Types/mapper.html">mapper</a> element. The default mapper used
|
||||||
|
by <code><image></code> is the <a href="../Types/mapper.html#identity-mapper">identity
|
||||||
|
mapper</a>.</p>
|
||||||
|
|
||||||
|
<p>You can also use a <code>filenamemapper</code> type in place of the <code>mapper</code>
|
||||||
|
element.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Create thumbnails of my images and make sure they all fit within the 160×160 pixel size
|
||||||
|
whether the image is portrait or landscape.</p>
|
||||||
|
<pre>
|
||||||
|
<image destdir="samples/low" overwrite="yes">
|
||||||
|
<fileset dir="samples/full">
|
||||||
|
<include name="**/*.jpg"/>
|
||||||
|
</fileset>
|
||||||
|
<scale width="160" height="160" proportions="fit"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Create a thumbnail for all PNG files in <samp>src</samp> of the size of 40 pixels keeping the
|
||||||
|
proportions and store the <samp>src</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Same as above but store the result in <samp>dest</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" destdir="dest" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
<p>Same as above but store the result to files with original names prefixed
|
||||||
|
by <samp>scaled-</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<image srcdir="src" destdir="dest" includes="*.png">
|
||||||
|
<scale proportions="width" width="40"/>
|
||||||
|
<globmapper from="*" to="scaled-*"/>
|
||||||
|
</image></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,288 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Import Task</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2 id="import">Import</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Imports another build file into the current project.</p>
|
||||||
|
|
||||||
|
<p>On execution it will select the proper ProjectHelper to parse the imported file, using the same
|
||||||
|
algorithm as the one executed at <a href="../projecthelper.html">startup</a>. The selected
|
||||||
|
ProjectHelper instance will then be responsible to actually parse the imported file.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong> as seen above, this task heavily relies on the ProjectHelper
|
||||||
|
implementation and doesn't really perform any work of its own. If you have configured Apache
|
||||||
|
Ant to use a ProjectHelper other than Ant's default, this task may or may not work.</p>
|
||||||
|
|
||||||
|
<p>In the common use case where only Ant's default project helper is used, it basically works like
|
||||||
|
the <a href="https://ant.apache.org/faq.html#xml-entity-include" target="_top">Entity Includes
|
||||||
|
as explained in the Ant FAQ</a>, as if the imported file was contained in the importing file,
|
||||||
|
minus the top <code><project></code> tag.</p>
|
||||||
|
|
||||||
|
<p>The <code>import</code> task may only be used as a top-level task. This means that it may not
|
||||||
|
be used in a target.</p>
|
||||||
|
|
||||||
|
<p>There are two further functional aspects that pertain to this task and that are not possible
|
||||||
|
with entity includes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>target overriding</li>
|
||||||
|
<li>special properties</li>
|
||||||
|
</ul>
|
||||||
|
<h4>Target overriding</h4>
|
||||||
|
|
||||||
|
<p>If a target in the main file is also present in at least one of the imported files, the one
|
||||||
|
from the main file takes precedence.</p>
|
||||||
|
|
||||||
|
<p>So if I import for example a <samp>docsbuild.xml</samp> file containing a project
|
||||||
|
named <q>builddocs</q> that contains a <q>docs</q> target, I can define a <q>docs</q> target in
|
||||||
|
my main buildfile and that is the one that will be called. This makes it easy to keep the same
|
||||||
|
target name, so that the overriding target is still called by any other targets—in either
|
||||||
|
the main or imported buildfile(s)—for which it is a dependency, with a different
|
||||||
|
implementation. The target from <samp>docsbuild.xml</samp> is made available by the
|
||||||
|
name <q>builddocs.docs</q>. This enables the new implementation to call the old target,
|
||||||
|
thus <em>enhancing</em> it with tasks called before or after it.</p>
|
||||||
|
|
||||||
|
<p>If you use the <var>as</var> attribute of the task, its value will be used to prefix the
|
||||||
|
overridden target's name instead of the <var>name</var> attribute of the <code>project</code>
|
||||||
|
tag.</p>
|
||||||
|
|
||||||
|
<h4>Special properties</h4>
|
||||||
|
|
||||||
|
<p>Imported files are treated as they are present in the main buildfile. This makes it easy to
|
||||||
|
understand, but it makes it impossible for them to reference files and resources relative to
|
||||||
|
their path. Because of this, for every imported file, Ant adds a property that contains the
|
||||||
|
path to the imported buildfile. With this path, the imported buildfile can keep resources and be
|
||||||
|
able to reference them relative to its position.</p>
|
||||||
|
|
||||||
|
<p>So if I import for example a <samp>docsbuild.xml</samp> file named <q>builddocs</q>, I can get
|
||||||
|
its path as <code>ant.file.builddocs</code>, similarly to the <code>ant.file</code> property of
|
||||||
|
the main buildfile.</p>
|
||||||
|
|
||||||
|
<p>Note that <q>builddocs</q> is not the filename, but the <var>name</var> attribute present in
|
||||||
|
the imported <code>project</code> tag.</p>
|
||||||
|
|
||||||
|
<p>If the imported file does not have a <var>name</var> attribute,
|
||||||
|
the <code>ant.file.<i>projectname</i></code> property will not be set.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.8.0</em>, the task can also import resources from URLs or classpath resources
|
||||||
|
(which are URLs, really). If you need to know whether the current build file's source has been
|
||||||
|
a file or an URL you can consult the property <code>ant.file.type.<i>projectname</i></code>
|
||||||
|
(using the same example as above <code>ant.file.type.builddocs</code>) which either have the
|
||||||
|
value <q>file</q> or <q>url</q>.</p>
|
||||||
|
|
||||||
|
<h4>Resolving files against the imported file</h4>
|
||||||
|
|
||||||
|
<p>Suppose your main build file called <samp>importing.xml</samp> imports a build
|
||||||
|
file <samp>imported.xml</samp>, located anywhere on the file system,
|
||||||
|
and <samp>imported.xml</samp> reads a set of properties
|
||||||
|
from <samp>imported.properties</samp>:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<!-- importing.xml -->
|
||||||
|
<project name="importing" basedir="." default="...">
|
||||||
|
<import file="${path_to_imported}/imported.xml"/>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<!-- imported.xml -->
|
||||||
|
<project name="imported" basedir="." default="...">
|
||||||
|
<property file="imported.properties"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>This snippet however will resolve <samp>imported.properties</samp> against
|
||||||
|
the <var>basedir</var> of <samp>importing.xml</samp>, because the <var>basedir</var>
|
||||||
|
of <samp>imported.xml</samp> is ignored by Ant. The right way to
|
||||||
|
use <samp>imported.properties</samp> is:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<!-- imported.xml -->
|
||||||
|
<project name="imported" basedir="." default="...">
|
||||||
|
<dirname property="imported.basedir" file="${ant.file.imported}"/>
|
||||||
|
<property file="${imported.basedir}/imported.properties"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>As explained above <code>ant.file.imported</code> stores the path of the build script, that
|
||||||
|
defines the project called <q>imported</q>, (in short it stores the path
|
||||||
|
to <samp>imported.xml</samp>) and <a href="dirname.html"><code><dirname></code></a> takes
|
||||||
|
its directory. This technique also allows <samp>imported.xml</samp> to be used as a standalone
|
||||||
|
file (without being imported in other project).</p>
|
||||||
|
|
||||||
|
<p>The above description only works for imported files that actually are imported from files and
|
||||||
|
not from URLs. For files imported from URLs using resources relative to the imported file
|
||||||
|
requires you to use tasks that can work on non-file resources in the first place. To create a
|
||||||
|
relative resource you'd use something like:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<loadproperties>
|
||||||
|
<url baseUrl="${ant.file.imported}"
|
||||||
|
relativePath="imported.properties"/>
|
||||||
|
</loadproperties></pre>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to import. If this is a relative file name, the file name will be resolved
|
||||||
|
relative to the <em>importing</em> file. <strong>Note</strong>: this is unlike most other
|
||||||
|
Ant file attributes, where relative files are resolved relative to <var>basedir</var>.</td>
|
||||||
|
<td>Yes or a nested resource collection</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>optional</td>
|
||||||
|
<td>If <q>true</q>, do not stop the build if the file does not exist.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>as</td>
|
||||||
|
<td>Specifies the prefix prepended to the target names.</td>
|
||||||
|
<td>No; defaults to <var>name</var> attribute of the <code>project</code> tag of the imported
|
||||||
|
file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefixSeparator</td>
|
||||||
|
<td>Specifies the separator to be used between the prefix and the target name.</td>
|
||||||
|
<td>No; defaults to <q>.</q></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>any <a href="../Types/resources.html">resource</a> or resource collection</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>The specified resources will be imported.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre><import file="../common-targets.xml"/></pre>
|
||||||
|
|
||||||
|
<p>Imports targets from the <samp>common-targets.xml</samp> file that is in a parent directory.</p>
|
||||||
|
|
||||||
|
<pre><import file="${deploy-platform}.xml"/></pre>
|
||||||
|
|
||||||
|
<p>Imports the project defined by the property <code>deploy-platform</code></p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<import>
|
||||||
|
<javaresource name="common/targets.xml">
|
||||||
|
<classpath location="common.jar"/>
|
||||||
|
</javaresource>
|
||||||
|
</import></pre>
|
||||||
|
|
||||||
|
<p>Imports targets from the <samp>targets.xml</samp> file that is inside the
|
||||||
|
directory <samp>common</samp> inside the jar file <samp>common.jar</samp>.</p>
|
||||||
|
|
||||||
|
<h3>How is <import> different from <a href="include.html"><include></a>?</h3>
|
||||||
|
|
||||||
|
<p>The short version: Use <code>import</code> if you intend to override a target, otherwise
|
||||||
|
use <code>include</code>.</p>
|
||||||
|
|
||||||
|
<p>When <code>import</code> is used, the imported targets are available by up to two names: their
|
||||||
|
"normal" name without any prefix and potentially with a prefixed name (the value of
|
||||||
|
the <var>as</var> attribute or the imported project's <var>name</var> attribute, if any).</p>
|
||||||
|
|
||||||
|
<p>When <code>include</code> is used, the included targets are only available in the prefixed form.</p>
|
||||||
|
|
||||||
|
<p>When <code>import</code> is used, the imported target's <var>depends</var> attribute remains
|
||||||
|
unchanged, i.e. it uses "normal" names and allows you to override targets in the dependency
|
||||||
|
list.</p>
|
||||||
|
|
||||||
|
<p>When <code>include</code> is used, the included targets cannot be overridden and
|
||||||
|
their <var>depends</var> attributes are rewritten so that prefixed names are used. This allows
|
||||||
|
writers of the included file to control which target is invoked as part of the dependencies.</p>
|
||||||
|
|
||||||
|
<p>It is possible to <code>include</code> the same file more than once by using different prefixes;
|
||||||
|
it is not possible to <code>import</code> the same file more than once.</p>
|
||||||
|
|
||||||
|
<h4>Examples</h4>
|
||||||
|
|
||||||
|
<p><samp>nested.xml</samp> shall be:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project>
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in nested"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="echo" depends="setUp">
|
||||||
|
<echo>prop has the value ${prop}</echo>
|
||||||
|
</target>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>When using <code>import</code> like in</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project default="test">
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in importing"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<import file="nested.xml" as="nested"/>
|
||||||
|
|
||||||
|
<target name="test" depends="nested.echo"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>Running the build file will emit:</p>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
setUp:
|
||||||
|
|
||||||
|
nested.echo:
|
||||||
|
[echo] prop has the value in importing
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>When using <code>include</code> like in</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project default="test">
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in importing"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<include file="nested.xml" as="nested"/>
|
||||||
|
|
||||||
|
<target name="test" depends="nested.echo"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>Running the target build file will emit:</p>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
nested.setUp:
|
||||||
|
|
||||||
|
nested.echo:
|
||||||
|
[echo] prop has the value in nested
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>and there won't be any target named <q>echo</q> on the including build file.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,283 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Include Task</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2 id="include">Include</h2>
|
||||||
|
<p><em>Since Apache Ant 1.8.0</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Include another build file into the current project.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong> this task heavily relies on the ProjectHelper implementation and doesn't
|
||||||
|
really perform any work of its own. If you have configured Ant to use a ProjectHelper other
|
||||||
|
than Ant's default, this task may or may not work.</p>
|
||||||
|
|
||||||
|
<p>On execution it will read another Ant file into the same project rewriting the included
|
||||||
|
target <var>name</var>s and <var>depends</var> lists. This is different
|
||||||
|
from <a href="https://ant.apache.org/faq.html#xml-entity-include" target="_top">Entity Includes
|
||||||
|
as explained in the Ant FAQ</a> insofar as the target names get prefixed by the included
|
||||||
|
project's <var>name</var> or <var>as</var> attribute and do not appear as if the file was
|
||||||
|
contained in the including file.</p>
|
||||||
|
|
||||||
|
<p>The <code>include</code> task may only be used as a top-level task. This means that
|
||||||
|
it may not be used in a target.</p>
|
||||||
|
|
||||||
|
<p>There are two further functional aspects that pertain to this task and that are not possible
|
||||||
|
with entity includes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>target rewriting</li>
|
||||||
|
<li>special properties</li>
|
||||||
|
</ul>
|
||||||
|
<h4>Target rewriting</h4>
|
||||||
|
|
||||||
|
<p>Any target in the included file will be renamed to <q>prefix.name</q> where <q>name</q> is the
|
||||||
|
original target's name and <q>prefix</q> is either the value of the <var>as</var> attribute or
|
||||||
|
the <var>name</var> attribute of the <code>project</code> tag of the included file.</p>
|
||||||
|
|
||||||
|
<p>The <var>depends</var> attribute of all included targets is rewritten so that all target names
|
||||||
|
are prefixed as well. This makes the included file self-contained.</p>
|
||||||
|
|
||||||
|
<p>Note that prefixes nest, so if a build file includes a file with prefix <q>q</q> and the
|
||||||
|
included file includes another file with prefix <q>b</q>, then the targets of that last build
|
||||||
|
file will be prefixed by <q>a.b.</q>.</p>
|
||||||
|
|
||||||
|
<p><code><import></code> contribute to the prefix as well, but only if their <var>as</var>
|
||||||
|
attribute has been specified.
|
||||||
|
|
||||||
|
<h4>Special properties</h4>
|
||||||
|
|
||||||
|
<p>Included files are treated as they are present in the main buildfile. This makes it easy to
|
||||||
|
understand, but it makes it impossible for them to reference files and resources relative to
|
||||||
|
their path. Because of this, for every included file, Ant adds a property that contains the
|
||||||
|
path to the included buildfile. With this path, the included buildfile can keep resources and be
|
||||||
|
able to reference them relative to its position.</p>
|
||||||
|
|
||||||
|
<p>So if I include for example a <samp>docsbuild.xml</samp> file named <q>builddocs</q>, I can get
|
||||||
|
its path as <code>ant.file.builddocs</code>, similarly to the <code>ant.file</code> property of
|
||||||
|
the main buildfile.</p>
|
||||||
|
|
||||||
|
<p>Note that <q>builddocs</q> is not the filename, but the <var>name</var> attribute present in
|
||||||
|
the included <code>project</code> tag.</p>
|
||||||
|
<p>If the included file does not have a <var>name</var> attribute,
|
||||||
|
the <code>ant.file.<i>projectname</i></code> property will not be set.</p>
|
||||||
|
|
||||||
|
<p>If you need to know whether the current build file's source has been a file or an URL you can
|
||||||
|
consult the property <code>ant.file.type.<i>projectname</i></code> (using the same example as
|
||||||
|
above <code>ant.file.type.builddocs</code>) which either have the value <q>file</q>
|
||||||
|
or <q>url</q>.</p>
|
||||||
|
|
||||||
|
<h4>Resolving files against the included file</h4>
|
||||||
|
|
||||||
|
<p>Suppose your main build file called <samp>including.xml</samp> includes a build
|
||||||
|
file <samp>included.xml</samp>, located anywhere on the file system,
|
||||||
|
and <samp>included.xml</samp> reads a set of properties
|
||||||
|
from <samp>included.properties</samp>:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<!-- including.xml -->
|
||||||
|
<project name="including" basedir="." default="...">
|
||||||
|
<include file="${path_to_included}/included.xml"/>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<!-- included.xml -->
|
||||||
|
<project name="included" basedir="." default="...">
|
||||||
|
<property file="included.properties"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>This snippet however will resolve <samp>included.properties</samp> against
|
||||||
|
the <var>basedir</var> of <samp>including.xml</samp>, because the <var>basedir</var>
|
||||||
|
of <samp>included.xml</samp> is ignored by Ant. The right way to
|
||||||
|
use <samp>included.properties</samp> is:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<!-- included.xml -->
|
||||||
|
<project name="included" basedir="." default="...">
|
||||||
|
<dirname property="included.basedir" file="${ant.file.included}"/>
|
||||||
|
<property file="${included.basedir}/included.properties"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>As explained above <code>ant.file.included</code> stores the path of the build script, that
|
||||||
|
defines the project called <q>included</q>, (in short it stores the path
|
||||||
|
to <samp>included.xml</samp>) and <a href="dirname.html"><code><dirname></code></a> takes
|
||||||
|
its directory. This technique also allows <samp>included.xml</samp> to be used as a standalone
|
||||||
|
file (without being included in other project).</p>
|
||||||
|
|
||||||
|
<p>The above description only works for included files that actually are included from files and
|
||||||
|
not from URLs. For files included from URLs using resources relative to the included file
|
||||||
|
requires you to use tasks that can work on non-file resources in the first place. To create a
|
||||||
|
relative resource you'd use something like:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<loadproperties>
|
||||||
|
<url baseUrl="${ant.file.included}"
|
||||||
|
relativePath="included.properties"/>
|
||||||
|
</loadproperties></pre>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to include. If this is a relative file name, the file name will be resolved
|
||||||
|
relative to the <em>including</em> file. <strong>Note</strong>, this is unlike most other
|
||||||
|
ant file attributes, where relative files are resolved relative to ${basedir}.</td>
|
||||||
|
<td>Yes or a nested resource collection</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>optional</td>
|
||||||
|
<td>If <q>true</q>, do not stop the build if the file does not exist.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>as</td>
|
||||||
|
<td>Specifies the prefix prepended to the target names.</td>
|
||||||
|
<td>Yes, if the included file's <code>project</code> tag doesn't specify a <var>name</var>
|
||||||
|
attribute (which is otherwise taken as default)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefixSeparator</td>
|
||||||
|
<td>Specifies the separator to be used between the prefix and the target name.</td>
|
||||||
|
<td>No; defaults to <q>.</q></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>any <a href="../Types/resources.html">resource</a> or resource collection</h4>
|
||||||
|
|
||||||
|
<p>The specified resources will be included.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre><include file="../common-targets.xml"/></pre>
|
||||||
|
|
||||||
|
<p>Includes targets from the <samp>common-targets.xml</samp> file that is in a parent directory.</p>
|
||||||
|
|
||||||
|
<pre><include file="${deploy-platform}.xml"/></pre>
|
||||||
|
|
||||||
|
<p>Includes the project defined by the property deploy-platform</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<include>
|
||||||
|
<javaresource name="common/targets.xml">
|
||||||
|
<classpath location="common.jar"/>
|
||||||
|
</javaresource>
|
||||||
|
</include></pre>
|
||||||
|
|
||||||
|
<p>Includes targets from the <samp>targets.xml</samp> file that is inside the
|
||||||
|
directory <samp>common</samp> inside the jar file <samp>common.jar</samp>.</p>
|
||||||
|
|
||||||
|
<h3>How is <a href="import.html"><import></a> different from <include>?</h3>
|
||||||
|
|
||||||
|
<p>The short version: Use <code>import</code> if you intend to override a target, otherwise
|
||||||
|
use <code>include</code>.</p>
|
||||||
|
|
||||||
|
<p>When <code>import</code> is used, the imported targets are available by up to two names: their
|
||||||
|
"normal" name without any prefix and potentially with a prefixed name (the value of
|
||||||
|
the <var>as</var> attribute or the imported project's <var>name</var> attribute, if any).</p>
|
||||||
|
|
||||||
|
<p>When <code>include</code> is used, the included targets are only available in the prefixed form.</p>
|
||||||
|
|
||||||
|
<p>When <code>import</code> is used, the imported target's <var>depends</var> attribute remains
|
||||||
|
unchanged, i.e. it uses "normal" names and allows you to override targets in the dependency
|
||||||
|
list.</p>
|
||||||
|
|
||||||
|
<p>When <code>include</code> is used, the included targets cannot be overridden and
|
||||||
|
their <var>depends</var> attributes are rewritten so that prefixed names are used. This allows
|
||||||
|
writers of the included file to control which target is invoked as part of the dependencies.</p>
|
||||||
|
|
||||||
|
<p>It is possible to <code>include</code> the same file more than once by using different prefixes;
|
||||||
|
it is not possible to <code>import</code> the same file more than once.</p>
|
||||||
|
|
||||||
|
<h4>Examples</h4>
|
||||||
|
|
||||||
|
<p><samp>nested.xml</samp> shall be:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project>
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in nested"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="echo" depends="setUp">
|
||||||
|
<echo>prop has the value ${prop}</echo>
|
||||||
|
</target>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>When using <code>import</code> like in</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project default="test">
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in importing"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<import file="nested.xml" as="nested"/>
|
||||||
|
|
||||||
|
<target name="test" depends="nested.echo"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>Running the build file will emit:</p>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
setUp:
|
||||||
|
|
||||||
|
nested.echo:
|
||||||
|
[echo] prop has the value in importing
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>When using <code>include</code> like in</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<project default="test">
|
||||||
|
<target name="setUp">
|
||||||
|
<property name="prop" value="in importing"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<include file="nested.xml" as="nested"/>
|
||||||
|
|
||||||
|
<target name="test" depends="nested.echo"/>
|
||||||
|
</project></pre>
|
||||||
|
|
||||||
|
<p>Running the target build file will emit:</p>
|
||||||
|
|
||||||
|
<pre class="output">
|
||||||
|
nested.setUp:
|
||||||
|
|
||||||
|
nested.echo:
|
||||||
|
[echo] prop has the value in nested
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>and there won't be any target named <q>echo</q> on the including build file.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,180 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Input Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="input">Input</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<p>Allows user interaction during the build process by prompting for input. To do so, it uses the
|
||||||
|
configured <a href="../inputhandler.html">InputHandler</a>.</p>
|
||||||
|
|
||||||
|
<p>The prompt can be set via the <var>message</var> attribute or as character data nested into the
|
||||||
|
element.</p>
|
||||||
|
|
||||||
|
<p>Optionally a set of valid input arguments can be defined via the <var>validargs</var>
|
||||||
|
attribute. <code>Input</code> task will not accept a value that doesn't match one of the
|
||||||
|
predefined.</p>
|
||||||
|
|
||||||
|
<p>Optionally a property can be created from the value entered by the user. This property can then
|
||||||
|
be used during the following build run. <code>Input</code> then behaves
|
||||||
|
as <a href="property.html">property task</a> which means that existing properties cannot be
|
||||||
|
overridden. <em>Since Apache Ant 1.6</em>, <code><input></code> will not prompt for input if
|
||||||
|
a property should be set by the task that has already been set in the project (and the task wouldn't
|
||||||
|
have any effect).</p>
|
||||||
|
|
||||||
|
<p>Historically, a regular complaint about this task has been that it echoes characters to the
|
||||||
|
console, this is a critical security defect, we must fix it immediately, etc, etc. This problem was
|
||||||
|
due to the lack in early versions of Java of a (fully functional) facility for handling secure
|
||||||
|
console input. In Java 6 that shortcoming in Java's API was addressed and Ant versions 1.7.1 and
|
||||||
|
1.8 have added support for Java 6 secure console input feature (see <a href="#handler.type">handler
|
||||||
|
type</a>).</p>
|
||||||
|
|
||||||
|
<p>IDE behaviour depends upon the IDE: some hang waiting for input, some let you type it in. For
|
||||||
|
this situation, place the password in a (secured) property file and load in before
|
||||||
|
the <code>input</code> task.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>message</td>
|
||||||
|
<td>the Message which gets displayed to the user during the build run.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>validargs</td>
|
||||||
|
<td>comma separated String containing valid input arguments. If set, <code>input</code> task
|
||||||
|
will reject any input not defined here. Comparison of input to <var>validargs</var> is case
|
||||||
|
sensitive. If you want <q>a</q> and
|
||||||
|
<q>A</q> to be accepted you will need to define both arguments within <var>validargs</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>addproperty</td>
|
||||||
|
<td>the name of a property to be created from input. Behaviour is equal
|
||||||
|
to <a href="property.html">property task</a> which means that existing properties cannot be
|
||||||
|
overridden.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultvalue</td>
|
||||||
|
<td>Defines the default value of the property to be created from input. Property value will be
|
||||||
|
set to default if no input is received.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>Handler</h4>
|
||||||
|
<p><em>Since Ant 1.7</em>, a nested <code><handler></code> element can be used to specify
|
||||||
|
an <code>InputHandler</code>, so that different <code>InputHandler</code>s may be used among
|
||||||
|
different <code>Input</code> tasks.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr id="handler.type">
|
||||||
|
<td>type</td>
|
||||||
|
<td>one of <q>default</q>, <q>propertyfile</q>, <q>greedy</q>, or <q>secure</q> (<em>since Ant
|
||||||
|
1.8</em>).</td>
|
||||||
|
<td rowspan="3">One of these</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refid</td>
|
||||||
|
<td class="left">Reference to an <code>InputHandler</code> defined elsewhere in the
|
||||||
|
project.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classname</td>
|
||||||
|
<td class="left">The name of an <code>InputHandler</code> subclass.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>The classpath to use with <var>classname</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>The refid of a classpath to use with <var>classname</var>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>loaderref</td>
|
||||||
|
<td>The refid of a classloader to use with <var>classname</var>.
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>The classpath can also be specified by means of one or more nested <code><classpath></code>
|
||||||
|
elements.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Pause the build run until return key is pressed when using
|
||||||
|
the <a href="../inputhandler.html#defaulthandler">default InputHandler</a>, the concrete behavior is
|
||||||
|
defined by the <code>InputHandler</code> implementation you use.</p>
|
||||||
|
<pre><input/></pre>
|
||||||
|
|
||||||
|
<p>Display the message <q>Press Return key to continue...</q> and pause the build run until return
|
||||||
|
key is pressed (again, the concrete behavior is implementation dependent).</p>
|
||||||
|
<pre><input>Press Return key to continue...</input></pre>
|
||||||
|
|
||||||
|
<p>Display the message <q>Press Return key to continue...</q> and pause the build run until return
|
||||||
|
key is pressed (see above).</p>
|
||||||
|
<pre><input message="Press Return key to continue..."/></pre>
|
||||||
|
|
||||||
|
<p>Display the message <q>All data is going to be deleted from DB continue (y/n)?</q> and
|
||||||
|
require <q>y</q> to continue build or <q>n</q> to exit build with following message <q>Build aborted
|
||||||
|
by user.</q>.</p>
|
||||||
|
<pre>
|
||||||
|
<input message="All data is going to be deleted from DB continue (y/n)?"
|
||||||
|
validargs="y,n"
|
||||||
|
addproperty="do.delete"/>
|
||||||
|
<condition property="do.abort">
|
||||||
|
<equals arg1="n" arg2="${do.delete}"/>
|
||||||
|
</condition>
|
||||||
|
<fail if="do.abort">Build aborted by user.</fail>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Display the message <q>Please enter db-username:</q> and set the property <code>db.user</code> to
|
||||||
|
the value entered by the user.</p>
|
||||||
|
<pre>
|
||||||
|
<input message="Please enter db-username:"
|
||||||
|
addproperty="db.user"/></pre>
|
||||||
|
|
||||||
|
<p>Same as above, but set <code>db.user</code> to the value <q>Scott-Tiger</q> if the user enters no
|
||||||
|
value (simply presses <q>return</q>).</p>
|
||||||
|
<pre>
|
||||||
|
<input message="Please enter db-username:"
|
||||||
|
addproperty="db.user"
|
||||||
|
defaultvalue="Scott-Tiger"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,564 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Jar Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="jar">Jar</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Jars a set of files.</p>
|
||||||
|
<p>The <var>basedir</var> attribute is the reference directory from where to jar.</p>
|
||||||
|
<p>Note that file permissions will not be stored in the resulting jarfile.</p>
|
||||||
|
|
||||||
|
<p>It is possible to refine the set of files that are being jarred. This can be done with
|
||||||
|
the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
|
||||||
|
and <var>defaultexcludes</var> attributes. With the <var>includes</var> or <var>includesfile</var>
|
||||||
|
attribute you specify the files you want to have included by using patterns. The <var>exclude</var>
|
||||||
|
or <var>excludesfile</var> attribute is used to specify the files you want to have excluded. This is
|
||||||
|
also done with patterns. And finally with the <var>defaultexcludes</var> attribute, you can specify
|
||||||
|
whether you want to use default exclusions or not. See the section
|
||||||
|
on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
|
||||||
|
inclusion/exclusion of files works, and how to write patterns.</p>
|
||||||
|
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>basedir</var>) as well as
|
||||||
|
the nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
<p>You can also use nested file sets for more flexibility, and specify multiple ones to merge
|
||||||
|
together different trees of files into one JAR. The extended <code>fileset</code>
|
||||||
|
and <code>groupfileset</code> child elements from the <code>zip</code> task are also available in
|
||||||
|
the <code>jar</code> task. See the <a href="zip.html">Zip</a> task for more details and
|
||||||
|
examples.</p>
|
||||||
|
|
||||||
|
<p>The <var>update</var> parameter controls what happens if the JAR file already exists. When set
|
||||||
|
to <q>yes</q>, the JAR file is updated with the files specified. When set to <q>no</q> (the default)
|
||||||
|
the JAR file is overwritten. An example use of this is provided in the <a href="zip.html">Zip task
|
||||||
|
documentation</a>. Please note that ZIP files store file modification times with a granularity of 2
|
||||||
|
seconds. If a file is less than 2 seconds newer than the entry in the archive, Ant will not
|
||||||
|
consider it newer.</p>
|
||||||
|
|
||||||
|
<p>If the manifest is omitted, a simple one will be supplied by Apache Ant.</p>
|
||||||
|
|
||||||
|
<p>The <var>whenmanifestonly</var> parameter controls what happens when no files, apart from the
|
||||||
|
manifest file, or nested services, match. If <q>skip</q>, the JAR is not created and a warning is
|
||||||
|
issued. If <q>fail</q>, the JAR is not created and the build is halted with an error.
|
||||||
|
If <q>create</q> (default), an empty JAR file (only containing a manifest and services) is
|
||||||
|
created.</p>
|
||||||
|
|
||||||
|
<p>(The <code>Jar</code> task has a shortcut for specifying the manifest file of a JAR file. The
|
||||||
|
same thing can be accomplished by using the <var>fullpath</var> attribute of
|
||||||
|
a <code>zipfileset</code> in a <code>Zip</code> task. The one difference is that if
|
||||||
|
the <var>manifest</var> attribute is not specified, the <code>Jar</code> task will include an empty
|
||||||
|
one for you.)</p>
|
||||||
|
|
||||||
|
<p>Manifests are processed by the <code>Jar</code> task according to
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html" target="_top">Jar
|
||||||
|
file specification.</a> Note in particular that this may result in manifest lines greater than 72
|
||||||
|
bytes being wrapped and continued on the next line.</p>
|
||||||
|
|
||||||
|
<p>The <code>Jar</code> task checks whether you specified package information according to
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90779"
|
||||||
|
target="_top">versioning specification</a>.</p>
|
||||||
|
|
||||||
|
<p><strong>Please note that the ZIP format allows multiple files of the same fully-qualified name to
|
||||||
|
exist within a single archive. This has been documented as causing various problems for unsuspecting
|
||||||
|
users. If you wish to avoid this behavior you must set the <var>duplicate</var> attribute to a value
|
||||||
|
other than its default, <q>add</q>.</strong></p>
|
||||||
|
|
||||||
|
<p>To cryptographically sign your JAR file, use the <a href="signjar.html">SignJar task</a> on the
|
||||||
|
JAR that you create from this task.</p>
|
||||||
|
|
||||||
|
<p>For creating a simple version of a <a href="https://openjdk.java.net/jeps/238" target="_top">JEP
|
||||||
|
238 multi-release jar</a>, you don't need any special tools. Just set the
|
||||||
|
required <code>manifest</code> entry and place the files where required, as you could see in
|
||||||
|
the <a href="#jep238-example">JEP 238 example</a>. If you want to tune this kind of jar,
|
||||||
|
e.g. decreasing the size by deleting 'same' classes from the versions-branches, you have to do more
|
||||||
|
...</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>the JAR file to create.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>basedir</td>
|
||||||
|
<td>the directory from which to jar the files.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compress</td>
|
||||||
|
<td>Not only store data but also compress them. Unless you set the <var>keepcompression</var>
|
||||||
|
attribute to <q>false</q>, this will apply to the entire archive, not only the files you've
|
||||||
|
added while updating.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keepcompression</td>
|
||||||
|
<td>For entries coming from existing archives (like nested <code>zipfileset</code>s or while
|
||||||
|
updating the archive), keep the compression as it has been originally instead of using the
|
||||||
|
<var>compress</var> attribute. <em>Since Ant 1.6</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>The character encoding to use for filenames inside the archive. <strong>It is not
|
||||||
|
recommended to change this value as the created archive will most likely be unreadable for
|
||||||
|
Java otherwise.</strong> <br/>See also the <a href="zip.html#encoding">discussion in the zip
|
||||||
|
task page</a></td>
|
||||||
|
<td>No; defaults to <q>UTF8</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filesonly</td>
|
||||||
|
<td>Store only file entries</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be included</td>
|
||||||
|
<td>No; defaults to all (<q>**</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>name of a file. Each line of this file is taken to be an include pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>comma- or space-separated list of patterns of files that must be excluded</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>Name of a file. Each line of this file is taken to be an exclude pattern</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used or not (<q>yes|no</q>)</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>manifest</td>
|
||||||
|
<td>the manifest file to use. This can be either the location of a manifest, or the name of a
|
||||||
|
jar added through a fileset. If its the name of an added jar, the task expects the manifest
|
||||||
|
to be in the jar at <samp>META-INF/MANIFEST.MF</samp></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>filesetmanifest</td>
|
||||||
|
<td>behavior when a manifest is found in a <code>zipfileset</code>
|
||||||
|
or <code>zipgroupfileset</code> file. Valid values are <q>skip</q>, <q>merge</q>,
|
||||||
|
and <q>mergewithoutmain</q>. <q>merge</q> will merge all of the manifests together, and merge
|
||||||
|
this into any other specified manifests. <q>mergewithoutmain</q> merges everything but the
|
||||||
|
Main section of the manifests.
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>skip</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>update</td>
|
||||||
|
<td>indicates whether to update or overwrite the destination file if it already exists</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>whenmanifestonly</td>
|
||||||
|
<td>behavior when no files match. Valid values are <q>fail</q>, <q>skip</q>,
|
||||||
|
and <q>create</q>.</td>
|
||||||
|
<td>No; defaults to <q>create</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>duplicate</td>
|
||||||
|
<td>behavior when a duplicate file is found. Valid values are <q>add</q>, <q>preserve</q>,
|
||||||
|
and <q>fail</q>.</td>
|
||||||
|
<td>No; defaults to <q>add</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>index</td>
|
||||||
|
<td>whether to create
|
||||||
|
an <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR_Index"
|
||||||
|
target="_top">index list</a> to speed up classloading.
|
||||||
|
Unless you specify additional jars with nested <a href="#indexjars"><code>indexjars</code></a>
|
||||||
|
elements, only the contents of this jar will be included in the index.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>indexMetaInf</td>
|
||||||
|
<td>whether to include <samp>META-INF</samp> and its children in the index. Doesn't have any
|
||||||
|
effect if <var>index</var> is <q>false</q>.<br/>Sun's jar implementation used to skip
|
||||||
|
the <samp>META-INF</samp> directory and Ant followed that example. The behavior has been
|
||||||
|
changed with <a href="https://bugs.openjdk.java.net/browse/JDK-4408526" target="_top">Java
|
||||||
|
5</a>. In order to avoid problems with Ant generated jars on Java 1.4 or earlier Ant will not
|
||||||
|
include <samp>META-INF</samp> unless explicitly asked to. <em>Since Ant 1.8.0</em></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>manifestencoding</td>
|
||||||
|
<td>The encoding used to read the JAR manifest, when a manifest file is specified. The task
|
||||||
|
will always use UTF-8 when writing the manifest.</td>
|
||||||
|
<td>No; defaults to default JVM character encoding</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>roundup</td>
|
||||||
|
<td>Whether the file modification times will be rounded up to the next even number of
|
||||||
|
seconds.<br/>Zip archives store file modification times with a granularity of 2 seconds, so
|
||||||
|
the times will either be rounded up or down. If you round down, the archive will always seem
|
||||||
|
out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a
|
||||||
|
different type of problems like JSPs inside a web archive that seem to be slightly more recent
|
||||||
|
than precompiled pages, rendering precompilation useless. <em>Since Ant 1.6.2</em></td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>level</td>
|
||||||
|
<td>Non-default level at which file compression should be performed. Valid values range
|
||||||
|
from <q>0</q> (no compression/fastest) to <q>9</q> (maximum compression/slowest). <em>Since
|
||||||
|
Ant 1.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>strict</td>
|
||||||
|
<td>Configures how to handle breaks of the packaging version specification:
|
||||||
|
<ul>
|
||||||
|
<li><q>fail</q> = throws a BuildException</li>
|
||||||
|
<li><q>warn</q> = logs a message on warn level</li>
|
||||||
|
<li><q>ignore</q> = logs a message on verbose level (default)</li>
|
||||||
|
</ul><em>Since Ant 1.7.1</em></td>
|
||||||
|
<td>No; defaults to <q>ignore</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>preserve0permissions</td>
|
||||||
|
<td>when updating an archive or adding entries from a different archive Ant will assume that a
|
||||||
|
Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means
|
||||||
|
that the permissions haven't been stored at all rather than real permissions and will instead
|
||||||
|
apply its own default values.<br/> Set this attribute to <q>true</q> if you really want to
|
||||||
|
preserve the original permission field. <em>since Ant 1.8.0</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useLanguageEncodingFlag</td>
|
||||||
|
<td>Whether to set the language encoding flag if the encoding is UTF-8. This setting doesn't
|
||||||
|
have any effect if the encoding is not UTF-8. <em>Since Ant 1.8.0</em>. <br/>See also
|
||||||
|
the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>createUnicodeExtraFields</td>
|
||||||
|
<td>Whether to create Unicode extra fields to store the file names a second time inside the
|
||||||
|
entry's metadata.<br/>Possible values are <q>never</q>, <q>always</q>
|
||||||
|
and <q>not-encodeable</q> which will only add Unicode extra fields if the file name
|
||||||
|
cannot.<br/>See also the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; defaults to <q>never</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fallbacktoUTF8</td>
|
||||||
|
<td>Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a
|
||||||
|
file name cannot be encoded using the specified encoding. <em>Since Ant 1.8.0</em>.<br/>See
|
||||||
|
also the <a href="zip.html#encoding">discussion in the zip task page</a></td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mergeClassPathAttributes</td>
|
||||||
|
<td>Whether to merge the <code>Class-Path</code> attributes found in different manifests (if
|
||||||
|
merging manifests). If <q>false</q>, only the attribute of the last merged manifest will be
|
||||||
|
preserved. <em>Since Ant 1.8.0</em>.<br/>Unless you also set <var>flattenAttributes</var>
|
||||||
|
to <q>true</q>, this may result in manifests containing multiple <code>Class-Path</code>
|
||||||
|
attributes which violates the manifest specification.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>flattenAttributes</td>
|
||||||
|
<td>Whether to merge attributes occurring more than once in a section (this can only happen for
|
||||||
|
the <code>Class-Path</code> attribute) into a single attribute. <em>Since Ant
|
||||||
|
1.8.0</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>zip64Mode</td>
|
||||||
|
<td>When to use Zip64 extensions for entries. The possible values
|
||||||
|
are <q>never</q>, <q>always</q> and <q>as-needed</q>. <em>Since Ant 1.9.1</em>.<br/>See also
|
||||||
|
the <a href="zip.html#zip64">discussion in the zip task page</a></td>
|
||||||
|
<td>No; defaults to <q>never</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top">modificationtime</td>
|
||||||
|
<td valign="top">Set all stored file modification times to the
|
||||||
|
given time. This can either be a number interpreted as
|
||||||
|
milliseconds since 1970-01-01T00:00:00Z or a string that can be
|
||||||
|
parsed as a ISO 8601 timestamp with optional timezone.
|
||||||
|
<em>Since Ant 1.10.2</em>.
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="top">No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>metainf</h4>
|
||||||
|
<p>The nested <code>metainf</code> element specifies
|
||||||
|
a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will end up in
|
||||||
|
the <samp>META-INF</samp> directory of the jar file. If this fileset includes a file
|
||||||
|
named <samp>MANIFEST.MF</samp>, the file is ignored and you will get a warning.</p>
|
||||||
|
|
||||||
|
<h4>manifest</h4>
|
||||||
|
<p>The nested <code>manifest</code> element allows the manifest for the Jar file to be provided
|
||||||
|
inline in the build file rather than in an external file. This element is identical to the
|
||||||
|
<a href="manifest.html">manifest</a> task, but the <var>file</var> and <var>mode</var>
|
||||||
|
attributes must be omitted.</p>
|
||||||
|
<p>If both an inline manifest and an external file are both specified, the manifests are merged.</p>
|
||||||
|
|
||||||
|
<p>When using inline manifests, the <code>Jar</code> task will check whether the manifest contents
|
||||||
|
have changed (i.e. the manifest as specified is different in any way from the manifest that exists
|
||||||
|
in the jar, if it exists. If the manifest values have changed, the jar will be updated or rebuilt,
|
||||||
|
as appropriate.</p>
|
||||||
|
|
||||||
|
<h4 id="indexjars">indexjars</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6.2</em></p>
|
||||||
|
|
||||||
|
<p>The nested <code>indexjars</code> element specifies a <a href="../using.html#path">path-like
|
||||||
|
structure</a>. Its content is completely ignored unless you set the <var>index</var> attribute of
|
||||||
|
the task to <q>true</q>.</p>
|
||||||
|
|
||||||
|
<p>The index created by this task will contain indices for the archives contained in this path, the
|
||||||
|
names used for the archives depend on your manifest:</p>
|
||||||
|
<ul>
|
||||||
|
<li>If the generated jar's manifest contains no <code>Class-Path</code> attribute, the file name
|
||||||
|
without any leading directory path will be used and all parts of the path will get indexed.</li>
|
||||||
|
<li>If the manifest contains a <code>Class-Path</code> attribute, this task will try to guess
|
||||||
|
which part of the <code>Class-Path</code> belongs to a given archive. If it cannot guess a name,
|
||||||
|
the archive will be skipped, otherwise the name listed inside the <code>Class-Path</code>
|
||||||
|
attribute will be used.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>This task will not create any index entries for archives that are empty or only contain files
|
||||||
|
inside the <samp>META-INF</samp> directory unless the <var>indexmetainf</var> attribute has been set
|
||||||
|
to <q>true</q>.</p>
|
||||||
|
|
||||||
|
<h4 id="indexjarsmapper">indexjarsmapper</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.10.9</em></p>
|
||||||
|
|
||||||
|
<p>The nested <code>indexjarsmapper</code> element can be used to perform custom filename
|
||||||
|
transformations for the archives specified by <code>indexjars</code> if the
|
||||||
|
<a href="#indexjars">default filename transformation</a> doesn't suffice.
|
||||||
|
|
||||||
|
<h4 id="service">service</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.7.0</em></p>
|
||||||
|
|
||||||
|
<p>The nested <code>service</code> element specifies a service. Services are described in
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Service_Provider"
|
||||||
|
target="_top">service provider overview</a>. The approach is to have providers JARs include files
|
||||||
|
named by the service provided, for
|
||||||
|
example, <samp>META-INF/services/javax.script.ScriptEngineFactory</samp> which can include
|
||||||
|
implementation class names, one per line (usually just one per JAR).</p>
|
||||||
|
|
||||||
|
<p>The name of the service is set by the <var>type</var> attribute. The classname implementing the
|
||||||
|
service is the the <var>provider</var> attribute, or if one wants to specify a number of classes
|
||||||
|
that implement the service, by <code>provider</code> nested elements.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>The name of the service.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>provider</td>
|
||||||
|
<td>The classname of the class implementing the service.</td>
|
||||||
|
<td>Yes, unless there is a nested <code><provider></code> element.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>The provider classname is specified either by the <var>provider</var> attribute, or by a
|
||||||
|
nested <code><provider></code> element, which has a single <var>classname</var> attribute. If
|
||||||
|
a JAR file has more that one implementation of the service, a number of
|
||||||
|
nested <code><provider></code> elements may be used.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<h4>Simple</h4>
|
||||||
|
<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
|
||||||
|
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory.</p>
|
||||||
|
<pre><jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/></pre>
|
||||||
|
|
||||||
|
<h4>With filters</h4>
|
||||||
|
|
||||||
|
<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
|
||||||
|
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Files with the
|
||||||
|
name <samp>Test.class</samp> are excluded.</p>
|
||||||
|
<pre><jar destfile="${dist}/lib/app.jar"
|
||||||
|
basedir="${build}/classes"
|
||||||
|
excludes="**/Test.class"/></pre>
|
||||||
|
|
||||||
|
<p>Jar all files in the <samp>${build}/classes</samp> directory into a file
|
||||||
|
called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Only files under the
|
||||||
|
directory <samp>mypackage/test</samp> are used, and files with the name <samp>Test.class</samp> are
|
||||||
|
excluded.</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="${dist}/lib/app.jar"
|
||||||
|
basedir="${build}/classes"
|
||||||
|
includes="mypackage/test/**"
|
||||||
|
excludes="**/Test.class"/></pre>
|
||||||
|
|
||||||
|
<h4>Multiple filesets</h4>
|
||||||
|
<p>Jar all files in the <samp>${build}/classes</samp> directory and also in
|
||||||
|
the <samp>${src}/resources</samp> directory together into a file called <samp>app.jar</samp> in
|
||||||
|
the <samp>${dist}/lib</samp> directory. Files with the name <samp>Test.class</samp> are excluded. If
|
||||||
|
there are files such as <samp>${build}/classes/mypackage/MyClass.class</samp>
|
||||||
|
and <samp>${src}/resources/mypackage/image.gif</samp>, they will appear in the same directory in the
|
||||||
|
jar (and thus be considered in the same package by Java).</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="${dist}/lib/app.jar">
|
||||||
|
<fileset dir="${build}/classes"
|
||||||
|
excludes="**/Test.class"/>
|
||||||
|
<fileset dir="${src}/resources"/>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
<h4>Merging archives</h4>
|
||||||
|
|
||||||
|
<p>Create an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and embed
|
||||||
|
all the classes from the jar <samp>lib/main/some.jar</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="build/main/checksites.jar">
|
||||||
|
<fileset dir="build/main/classes"/>
|
||||||
|
<zipfileset includes="**/*.class" src="lib/main/some.jar"/>
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class"
|
||||||
|
value="com.acme.checksites.Main"/>
|
||||||
|
</manifest>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
<p>Create an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and embed
|
||||||
|
all the classes from all the jars in <samp>lib/main</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="build/main/checksites.jar">
|
||||||
|
<fileset dir="build/main/classes"/>
|
||||||
|
<restrict>
|
||||||
|
<name name="**/*.class"/>
|
||||||
|
<archives>
|
||||||
|
<zips>
|
||||||
|
<fileset dir="lib/main" includes="**/*.jar"/>
|
||||||
|
</zips>
|
||||||
|
</archives>
|
||||||
|
</restrict>
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class"
|
||||||
|
value="com.acme.checksites.Main"/>
|
||||||
|
</manifest>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
<h4>Inline manifest</h4>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="test.jar" basedir=".">
|
||||||
|
<include name="build"/>
|
||||||
|
<manifest>
|
||||||
|
<!-- If this is an Applet or Web Start application, include
|
||||||
|
the proper attributes from <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html" target="_top">https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html</a> -->
|
||||||
|
<attribute name="Permissions" value="sandbox"/>
|
||||||
|
<attribute name="Codebase" value="example.com"/>
|
||||||
|
<!-- Who is building this jar? -->
|
||||||
|
<attribute name="Built-By" value="${user.name}"/>
|
||||||
|
<!-- Information about the program itself -->
|
||||||
|
<attribute name="Implementation-Vendor" value="ACME inc."/>
|
||||||
|
<attribute name="Implementation-Title" value="GreatProduct"/>
|
||||||
|
<attribute name="Implementation-Version" value="1.0.0beta2"/>
|
||||||
|
<!-- details -->
|
||||||
|
<section name="common/MyClass.class">
|
||||||
|
<attribute name="Sealed" value="false"/>
|
||||||
|
</section>
|
||||||
|
</manifest>
|
||||||
|
</jar></pre>
|
||||||
|
<p>This is an example of an inline manifest specification including the version of the build program
|
||||||
|
(<code>Implementation-Version</code>). Note that the <code>Built-By</code> attribute will take the
|
||||||
|
value of the Ant property <code>user.name</code>. The manifest produced by the above would look like
|
||||||
|
this:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Permissions: sandbox
|
||||||
|
Codebase: example.com
|
||||||
|
Built-By: conor
|
||||||
|
Implementation-Vendor: ACME inc.
|
||||||
|
Implementation-Title: GreatProduct
|
||||||
|
Implementation-Version: 1.0.0beta2
|
||||||
|
Created-By: Apache Ant 1.9.2
|
||||||
|
|
||||||
|
Name: common/MyClass.class
|
||||||
|
Sealed: false</pre>
|
||||||
|
|
||||||
|
<h4>Service Provider</h4>
|
||||||
|
|
||||||
|
<p>The following shows how to create a jar file specifying a service with an implementation of the
|
||||||
|
scripting interface:</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="pinky.jar">
|
||||||
|
<fileset dir="build/classes"/>
|
||||||
|
<service type="javax.script.ScriptEngineFactory"
|
||||||
|
provider="org.acme.PinkyLanguage"/>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
<p>The following shows how to create a jar file specifying a service with two implementations of the
|
||||||
|
scripting interface:</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="pinkyandbrain.jar">
|
||||||
|
<fileset dir="classes"/>
|
||||||
|
<service type="javax.script.ScriptEngineFactory">
|
||||||
|
<provider classname="org.acme.PinkyLanguage"/>
|
||||||
|
<provider classname="org.acme.BrainLanguage"/>
|
||||||
|
</service>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
<h4 id="jep238-example">JEP 238 example: a Multi-Release JAR Files</h4>
|
||||||
|
<p>Here we want to create a <em>Multi-Release JAR File</em> according the
|
||||||
|
specification <a href="https://openjdk.java.net/jeps/238" target="_top">JEP 238</a>. It defines on
|
||||||
|
top of a JAR the possibility to place additional or overwriting classes in a jar, which are
|
||||||
|
available according to the Java version you run.<br/>Basically it says, that you have to set the
|
||||||
|
manifest entry <code>Multi-Release: true</code> and place all additional or overwriting classes
|
||||||
|
in <samp>META-INF/versions/<i>number</i>/package-structure</samp>,
|
||||||
|
e.g. <samp>META-INF/versions/9/org/apache/ant/MyClass.class</samp></p>
|
||||||
|
<p>In this example we expect that the normal classes are compiled into <samp>${java.classes}</samp>
|
||||||
|
and the Java 9 classes are compiled into <samp>${java9.classes}</samp>.</p>
|
||||||
|
<pre>
|
||||||
|
<jar destfile="mrjar.jar">
|
||||||
|
<manifest>
|
||||||
|
<!-- special mf-entry according to the spec -->
|
||||||
|
<attribute name="Multi-Release" value="true"/>
|
||||||
|
</manifest>
|
||||||
|
<!-- directory structure according to the spec ... -->
|
||||||
|
<!-- ... default classes loadable by old (<Java 9) versions -->
|
||||||
|
<fileset dir="${java.classes}"/>
|
||||||
|
<!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader -->
|
||||||
|
<zipfileset prefix="META-INF/versions/9/" dir="${java9.classes}"/>
|
||||||
|
</jar></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,125 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>jarlib-available Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="jarlib-available">jarlib-available</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Check whether an extension is present in a <code>fileset</code> or an <code>extensionSet</code>.
|
||||||
|
If the extension is present then a property is set.</p>
|
||||||
|
|
||||||
|
<p>Note that this task works with extensions as defined by the "Optional Package" specification.
|
||||||
|
For more information about optional packages, see the document <em>Optional Package Versioning</em>
|
||||||
|
in the documentation bundle for your Java Standard Edition package, in
|
||||||
|
file <samp>guide/extensions/versioning.html</samp> or the
|
||||||
|
online <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"
|
||||||
|
target="_top">Extension and ExtensionSet documentation</a> for further details.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of property to set if extensions is available</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to check for extension</td>
|
||||||
|
<td>Yes, unless a nested
|
||||||
|
<code><extensionSet></code> or <code><fileset></code> is specified</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>extension</h4>
|
||||||
|
<p><a href="../Types/extension.html">Extension</a> the extension to search for.</p>
|
||||||
|
|
||||||
|
<h4>fileset</h4>
|
||||||
|
<p><a href="../Types/fileset.html">FileSet</a>s are used to select sets of files to check for
|
||||||
|
extension.</p>
|
||||||
|
|
||||||
|
<h4>extensionSet</h4>
|
||||||
|
<p><a href="../Types/extensionset.html">ExtensionSet</a>s is the set of extensions to search for
|
||||||
|
extension in.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Search for extension in single file</p>
|
||||||
|
<pre>
|
||||||
|
<jarlib-available property="myext.present" file="myfile.jar">
|
||||||
|
<extension extensionName="org.apache.tools.ant"
|
||||||
|
specificationVersion="1.4.9"
|
||||||
|
specificationVendor="Apache Software Foundation"/>
|
||||||
|
</jarlib-available>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Search for extension in single file referencing external Extension</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="myext"
|
||||||
|
extensionName="org.apache.tools.ant"
|
||||||
|
specificationVersion="1.4.9"
|
||||||
|
specificationVendor="Apache Software Foundation"/>
|
||||||
|
|
||||||
|
<jarlib-available property="myext.present" file="myfile.jar">
|
||||||
|
<extension refid="myext"/>
|
||||||
|
</jarlib-available></pre>
|
||||||
|
|
||||||
|
<p>Search for extension in fileset</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="myext"
|
||||||
|
extensionName="org.apache.tools.ant"
|
||||||
|
specificationVersion="1.4.9"
|
||||||
|
specificationVendor="Apache Software Foundation"/>
|
||||||
|
|
||||||
|
<jarlib-available property="myext.present">
|
||||||
|
<extension refid="myext"/>
|
||||||
|
<fileset dir="lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</jarlib-available></pre>
|
||||||
|
|
||||||
|
<p>Search for extension in extensionSet</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="myext"
|
||||||
|
extensionName="org.apache.tools.ant"
|
||||||
|
specificationVersion="1.4.9"
|
||||||
|
specificationVendor="Apache Software Foundation"/>
|
||||||
|
|
||||||
|
<jarlib-available property="myext.present">
|
||||||
|
<extension refid="myext"/>
|
||||||
|
<extensionSet id="exts3">
|
||||||
|
<libfileset includeUrl="false"
|
||||||
|
includeImpl="true"
|
||||||
|
dir="lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</libfileset>
|
||||||
|
</extensionSet>
|
||||||
|
</jarlib-available></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>jarlib-display Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="jarlib-display">jarlib-display</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Display the "Optional Package" and "Package Specification" information contained within the
|
||||||
|
specified jars.</p>
|
||||||
|
|
||||||
|
<p>Note that this task works with extensions as defined by the "Optional Package" specification.
|
||||||
|
For more information about optional packages, see the document <em>Optional Package Versioning</em>
|
||||||
|
in the documentation bundle for your Java Standard Edition package, in
|
||||||
|
file <samp>guide/extensions/versioning.html</samp> or the
|
||||||
|
online <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"
|
||||||
|
target="_top">Extension and ExtensionSet documentation</a> for further details.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The file to display extension information about</td>
|
||||||
|
<td>Yes, unless a nested <code><fileset></code> is specified</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>fileset</h4>
|
||||||
|
<p><a href="../Types/fileset.html">FileSet</a>s contain list of files to display Extension
|
||||||
|
information about.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Display Extension info for a single file</p>
|
||||||
|
<pre><jarlib-display file="myfile.jar"></pre>
|
||||||
|
|
||||||
|
<p>Display Extension info for a fileset</p>
|
||||||
|
<pre>
|
||||||
|
<jarlib-display>
|
||||||
|
<fileset dir="lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</jarlib-display></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,111 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>jarlib-manifest Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="jarlib-manifest">jarlib-manifest</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Task to generate a manifest that declares all the dependencies in manifest. The dependencies are
|
||||||
|
determined by looking in the specified path and searching for Extension / "Optional Package"
|
||||||
|
specifications in the manifests of the jars.</p>
|
||||||
|
|
||||||
|
<p>Note that this task works with extensions as defined by the "Optional Package" specification.
|
||||||
|
For more information about optional packages, see the document <em>Optional Package Versioning</em>
|
||||||
|
in the documentation bundle for your Java Standard Edition package, in
|
||||||
|
file <code>guide/extensions/versioning.html</code> or the
|
||||||
|
online <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"
|
||||||
|
target="_top">Extension and ExtensionSet documentation</a> for further details.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The file to generate Manifest into</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>extension</h4>
|
||||||
|
<p><a href="../Types/extension.html">Extension</a> the extension that this library implements.</p>
|
||||||
|
|
||||||
|
<h4>depends</h4>
|
||||||
|
<p><a href="../Types/extensionset.html">ExtensionSet</a>s containing all dependencies for jar.</p>
|
||||||
|
|
||||||
|
<h4>options</h4>
|
||||||
|
<p><a href="../Types/extensionset.html">ExtensionSet</a>s containing all optional dependencies for
|
||||||
|
jar. (Optional dependencies will be used if present else they will be ignored)</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Basic Manifest generated for single Extension</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="e1"
|
||||||
|
extensionName="MyExtensions"
|
||||||
|
specificationVersion="1.0"
|
||||||
|
specificationVendor="Peter Donald"
|
||||||
|
implementationVendorID="vv"
|
||||||
|
implementationVendor="Apache"
|
||||||
|
implementationVersion="2.0"
|
||||||
|
implementationURL="https://somewhere.com"/>
|
||||||
|
|
||||||
|
<jarlib-manifest destfile="myManifest.txt">
|
||||||
|
<extension refid="e1"/>
|
||||||
|
</jarlib-manifest></pre>
|
||||||
|
|
||||||
|
<p>Search for extension in fileset: a large example with required and optional dependencies</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="e1"
|
||||||
|
extensionName="MyExtensions"
|
||||||
|
specificationVersion="1.0"
|
||||||
|
specificationVendor="Peter Donald"
|
||||||
|
implementationVendorID="vv"
|
||||||
|
implementationVendor="Apache"
|
||||||
|
implementationVersion="2.0"
|
||||||
|
implementationURL="https://somewhere.com"/>
|
||||||
|
|
||||||
|
<extensionSet id="option.ext">
|
||||||
|
<libfileset dir="lib/option">
|
||||||
|
<include name="**/*.jar"/>
|
||||||
|
</libfileset>
|
||||||
|
</extensionSet>
|
||||||
|
|
||||||
|
<extensionSet id="depends.ext">
|
||||||
|
<libfileset dir="lib/required">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</libfileset>
|
||||||
|
</extensionSet>
|
||||||
|
|
||||||
|
<jarlib-manifest destfile="myManifest.txt">
|
||||||
|
<extension refid="e1"/>
|
||||||
|
<depends refid="depends.ext"/>
|
||||||
|
<options refid="option.ext"/>
|
||||||
|
</jarlib-manifest></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,195 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>jarlib-resolve Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="jarlib-resolve">jarlib-resolve</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Try to locate a jar to satisfy an extension and place location of jar into property. The task
|
||||||
|
allows you to add a number of resolvers that are capable of locating a library for a specific
|
||||||
|
extension. Each resolver will be attempted in specified order until library is found or no resolvers
|
||||||
|
are left. If no resolvers are left and <var>failOnError</var> is true then
|
||||||
|
a <code>BuildException</code> will be thrown.</p>
|
||||||
|
|
||||||
|
<p>Note that this task works with extensions as defined by the "Optional Package" specification.
|
||||||
|
For more information about optional packages, see the document <em>Optional Package Versioning</em>
|
||||||
|
in the documentation bundle for your Java Standard Edition package, in
|
||||||
|
file <code>guide/extensions/versioning.html</code> or the
|
||||||
|
online <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"
|
||||||
|
target="_top">Extension and ExtensionSet documentation</a> for further details.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>property</td>
|
||||||
|
<td>The name of property to set to library location.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failOnError</td>
|
||||||
|
<td><q>true</q> if failure to locate library should result in build exception.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>checkExtension</td>
|
||||||
|
<td><q>true</q> if libraries returned by nested resolvers should be checked to see if they
|
||||||
|
supply extension.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>extension</h4>
|
||||||
|
<p><a href="../Types/extension.html">Extension</a> the extension to resolve. Must be present</p>
|
||||||
|
|
||||||
|
<h4>location</h4>
|
||||||
|
<p>The <code>location</code> nested element allows you to look for a library in a location relative
|
||||||
|
to project directory.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>location</td>
|
||||||
|
<td>The pathname of library.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>url</h4>
|
||||||
|
<p>The <code>url</code> resolver allows you to download a library from a URL to a local file.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>url</td>
|
||||||
|
<td>The URL to download.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The file to download URL into.</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td class="left">The directory in which to place downloaded file.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>ant</h4>
|
||||||
|
<p>The <code>ant</code> resolver allows you to run an Apache Ant build file to generate a
|
||||||
|
library.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>antfile</td>
|
||||||
|
<td>The build file.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destfile</td>
|
||||||
|
<td>The file that the ant build creates.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>The target to run in build file.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Resolve Extension to file. If file does not exist or file does not implement extension then throw
|
||||||
|
an exception.</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="dve.ext"
|
||||||
|
extensionName="org.realityforge.dve"
|
||||||
|
specificationVersion="1.2"
|
||||||
|
specificationVendor="Peter Donald"/>
|
||||||
|
|
||||||
|
<jarlib-resolve property="dve.library">
|
||||||
|
<extension refid="dve.ext"/>
|
||||||
|
<location location="/opt/jars/dve.jar"/>
|
||||||
|
</jarlib-resolve></pre>
|
||||||
|
|
||||||
|
<p>Resolve Extension to URL. If URL does not exist or can not write to <var>destfile</var> or file
|
||||||
|
does not implement extension then throw an exception.</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="dve.ext"
|
||||||
|
extensionName="org.realityforge.dve"
|
||||||
|
specificationVersion="1.2"
|
||||||
|
specificationVendor="Peter Donald"/>
|
||||||
|
|
||||||
|
<jarlib-resolve property="dve.library">
|
||||||
|
<extension refid="dve.ext"/>
|
||||||
|
<url url="https://www.example.com/jars/dve.jar" destfile="lib/dve.jar"/>
|
||||||
|
</jarlib-resolve></pre>
|
||||||
|
|
||||||
|
<p>Resolve Extension to file produce by Ant build. If file does not get produced or Ant file is
|
||||||
|
missing or build fails then throw an exception. (<strong>Note</strong>: does not check that library
|
||||||
|
implements extension.)</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="dve.ext"
|
||||||
|
extensionName="org.realityforge.dve"
|
||||||
|
specificationVersion="1.2"
|
||||||
|
specificationVendor="Peter Donald"/>
|
||||||
|
|
||||||
|
<jarlib-resolve property="dve.library" checkExtension="false">
|
||||||
|
<extension refid="dve.ext"/>
|
||||||
|
<ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
|
||||||
|
</jarlib-resolve></pre>
|
||||||
|
|
||||||
|
<p>Resolve Extension via multiple methods. First check local file to see if it implements
|
||||||
|
extension. If it does not then try to build it from source in parallel directory. If that fails then
|
||||||
|
finally try to download it from a website. If all steps fail then throw a build exception.</p>
|
||||||
|
<pre>
|
||||||
|
<extension id="dve.ext"
|
||||||
|
extensionName="org.realityforge.dve"
|
||||||
|
specificationVersion="1.2"
|
||||||
|
specificationVendor="Peter Donald"/>
|
||||||
|
|
||||||
|
<jarlib-resolve property="dve.library">
|
||||||
|
<extension refid="dve.ext"/>
|
||||||
|
<location location="/opt/jars/dve.jar"/>
|
||||||
|
<ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
|
||||||
|
<url url="https://example.com/jars/dve.jar" destfile="lib/dve.jar"/>
|
||||||
|
</jarlib-resolve></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,435 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Java Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="java">Java</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Executes a Java class within the running (Apache Ant) JVM or forks another JVM if specified.</p>
|
||||||
|
<p>If odd things go wrong when you run this task, set <var>fork</var>=<q>true</q> to use a new
|
||||||
|
JVM.</p>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6.3</em>, you can interact with a forked JVM, as well as sending input to it via
|
||||||
|
the <var>input</var> and <var>inputstring</var> attributes.</p>
|
||||||
|
|
||||||
|
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4>
|
||||||
|
|
||||||
|
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use
|
||||||
|
the <code><java></code> task with <var>spawn</var> set to <q>false</q> and <var>fork</var>
|
||||||
|
to <q>true</q>, you must provide explicit input to the forked process or Ant will be suspended
|
||||||
|
because it tries to read from the standard input.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr id="classname">
|
||||||
|
<td>classname</td>
|
||||||
|
<td>the Java class to execute.</td>
|
||||||
|
<td rowspan="4">Exactly one of the four</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>jar</td>
|
||||||
|
<td class="left">the location of the jar file to execute (must have a <code>Main-Class</code>
|
||||||
|
entry in the manifest). <var>fork</var> must be set to <q>true</q> if this option is selected.
|
||||||
|
See notes <a href="#jar-execute">below</a> for more details.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>module</td>
|
||||||
|
<td class="left">The initial or main module to resolve (must have a <code>Main-Class</code>
|
||||||
|
entry in the manifest). <var>fork</var> must be set to <q>true</q> if this option is
|
||||||
|
selected. <em>since Ant 1.9.7</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcefile</td>
|
||||||
|
<td class="left">The location of a ".java" file or a file containing shebang with Java source code.
|
||||||
|
Set this attribute to run Java single file source programs, a feature introduced in Java 11.
|
||||||
|
<var>fork</var> must be set to <q>true</q> if this option is selected.
|
||||||
|
<em>since Ant 1.10.5</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>args</td>
|
||||||
|
<td>the arguments for the class that is executed. <em><u>Deprecated</u>, use
|
||||||
|
nested <code><arg></code> elements instead.</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>the classpath to use.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>the classpath to use, given as <a href="../using.html#references">reference</a> to
|
||||||
|
a <code>Path</code> defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepath</td>
|
||||||
|
<td>Specify where to find application modules. A list of directories of modules, module files or
|
||||||
|
exploded modules. <em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepathref</td>
|
||||||
|
<td>The modulepath to use, given as <a href="../using.html#references">reference</a> to
|
||||||
|
a <code>Path</code> defined elsewhere. <em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fork</td>
|
||||||
|
<td>if enabled triggers the class execution in another JVM.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>spawn</td>
|
||||||
|
<td>if enabled allows to start a process which will outlive Ant.<br/>Requires
|
||||||
|
that <var>fork</var> is <q>true</q>, and not compatible
|
||||||
|
with <var>timeout</var>, <var>input</var>, <var>output</var>, <var>error</var>, <var>result</var>
|
||||||
|
attributes</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>jvm</td>
|
||||||
|
<td>the command used to invoke JVM. The command is resolved
|
||||||
|
by <code>java.lang.Runtime.exec()</code>. Ignored if <var>fork</var> is <q>false</q>.
|
||||||
|
</td>
|
||||||
|
<td>No, default is <kbd>java</kbd></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>jvmargs</td>
|
||||||
|
<td>the arguments to pass to the forked JVM, ignored if <var>fork</var> is
|
||||||
|
disabled. <em><u>Deprecated</u>, use nested <code><jvmarg></code> elements
|
||||||
|
instead.</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxmemory</td>
|
||||||
|
<td>Max amount of memory to allocate to the forked JVM, ignored if <var>fork</var>
|
||||||
|
is <q>false</q></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No; default is <q>false</q> (see <a href="#failonerror">note</a>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resultproperty</td>
|
||||||
|
<td>The name of a property in which the return code of the command should be stored. Only of
|
||||||
|
interest if <var>failonerror</var> is <q>false</q> and if <var>fork</var> is <q>true</q>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>The directory to invoke the JVM in, ignored if <var>fork</var> is <q>false</q>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>output</td>
|
||||||
|
<td>Name of a file to which to write the output. If the error stream is not also redirected to a
|
||||||
|
file or property, it will appear in this output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>error</td>
|
||||||
|
<td>The file to which the standard error of the command should be redirected.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>logError</td>
|
||||||
|
<td>This attribute is used when you wish to see error output in Ant's log and you are
|
||||||
|
redirecting output to a file/property. The error output will not be included in the output
|
||||||
|
file/property. If you redirect error with the <var>error</var> or <var>errorProperty</var>
|
||||||
|
attributes, this will have no effect.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>append</td>
|
||||||
|
<td>Whether output and error files should be appended to or overwritten.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputproperty</td>
|
||||||
|
<td>The name of a property in which the output of the command should be stored. Unless the error
|
||||||
|
stream is redirected to a separate file or stream, this property will include the error
|
||||||
|
output.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorproperty</td>
|
||||||
|
<td>The name of a property in which the standard error of the command should be stored.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>input</td>
|
||||||
|
<td>A file from which the executed command's standard input is taken. This attribute is mutually
|
||||||
|
exclusive with the <var>inputstring</var> attribute</td>
|
||||||
|
<td>No; default is to take standard input from console
|
||||||
|
unless <var>spawn</var> is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>inputstring</td>
|
||||||
|
<td>A string which serves as the input stream for the executed command. This attribute is
|
||||||
|
mutually exclusive with the <var>input</var> attribute.</td>
|
||||||
|
<td>No; default is to take standard input from console unless <var>spawn</var>
|
||||||
|
is <q>true</q>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>newenvironment</td>
|
||||||
|
<td>Do not propagate old environment when new environment variables are specified.</td>
|
||||||
|
<td>No; default is <q>false</q>, ignored if <var>fork</var> is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>timeout</td>
|
||||||
|
<td>Stop the command if it doesn't finish within the specified time (given in
|
||||||
|
milliseconds). <strong>It is highly recommended to use this feature only if <var>fork</var>
|
||||||
|
is <q>true</q>.</strong></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clonevm</td>
|
||||||
|
<td>If set to <q>true</q>, then all system properties and the <var>bootclasspath</var> of the
|
||||||
|
forked JVM will be the same as those of the JVM running Ant. <em>since Ant 1.7</em></td>
|
||||||
|
<td>No; default is <q>false</q>, ignored if <var>fork</var> is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardOutput</td>
|
||||||
|
<td>Whether output should completely be discarded. This setting is
|
||||||
|
incompatible with any setting that redirects output to files or
|
||||||
|
properties.<br/>
|
||||||
|
If you set this to <q>true</q> error output will be discared as
|
||||||
|
well unless you redirect error output to files, properties or
|
||||||
|
enable <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>discardError</td>
|
||||||
|
<td>Whether error output should completely be discarded. This
|
||||||
|
setting is incompatible with any setting that redirects error
|
||||||
|
output to files or properties as well as <q>logError</q>.
|
||||||
|
<em>Since Ant 1.10.10</em>
|
||||||
|
</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<h4>arg and jvmarg</h4>
|
||||||
|
<p>Use nested <code><arg></code> and <code><jvmarg></code> elements to specify arguments
|
||||||
|
for the Java class and the forked JVM respectively. See <a href="../using.html#arg">Command line
|
||||||
|
arguments</a>.</p>
|
||||||
|
<h4>sysproperty</h4>
|
||||||
|
<p>Use nested <code><sysproperty></code> elements to specify system properties required by the
|
||||||
|
class. These properties will be made available to JVM during the execution of the class (either
|
||||||
|
Ant's JVM or the forked JVM). The attributes for this element are the same as
|
||||||
|
for <a href="exec.html#env">environment variables</a>.</p>
|
||||||
|
|
||||||
|
<h4>syspropertyset</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>You can specify a set of properties to be used as system properties
|
||||||
|
with <a href="../Types/propertyset.html">syspropertyset</a>s.</p>
|
||||||
|
|
||||||
|
<h4>classpath</h4>
|
||||||
|
<p><code>Java</code>'s <var>classpath</var> attribute is a <a href="../using.html#path">path-like
|
||||||
|
structure</a> and can also be set via a nested <code>classpath</code> element.</p>
|
||||||
|
|
||||||
|
<h4>bootclasspath</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>The location of bootstrap class files can be specified using
|
||||||
|
this <a href="../using.html#path">path-like structure</a>—will be ignored if <var>fork</var>
|
||||||
|
is not <q>true</q> or the target JVM doesn't support it (i.e. Java 1.1).</p>
|
||||||
|
|
||||||
|
<h4>env</h4>
|
||||||
|
<p>It is possible to specify environment variables to pass to the forked JVM via
|
||||||
|
nested <code>env</code> elements. See the description in the section
|
||||||
|
about <a href="exec.html#env">exec</a></p>
|
||||||
|
<p>Settings will be ignored if <var>fork</var> is <q>false</q>.</p>
|
||||||
|
|
||||||
|
<h4>permissions</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>Security permissions can be revoked and granted during the execution of the class via a
|
||||||
|
nested <code>permissions</code> element. For more information please
|
||||||
|
see <a href="../Types/permissions.html">permissions</a>.</p>
|
||||||
|
<p>When the permission <code>RuntimePermission exitVM</code> has not been granted (or has been
|
||||||
|
revoked) the <code>System.exit()</code> call will be intercepted and treated like indicated
|
||||||
|
in <var>failonerror</var>.</p>
|
||||||
|
<p><strong>Note</strong>:<br/> If you do not specify permissions, a set of default permissions will
|
||||||
|
be added to your Java invocation to make sure that the Ant run will continue or terminated as
|
||||||
|
indicated by <var>failonerror</var>. All permissions not granted per default will be checked by
|
||||||
|
whatever security manager was already in place. <code>exitVM</code> will be disallowed.</p>
|
||||||
|
<p>Settings will be ignored if <var>fork</var> is <q>true</q>.</p>
|
||||||
|
|
||||||
|
<h4>assertions</h4>
|
||||||
|
|
||||||
|
<p><em>Since Ant 1.6</em>.</p>
|
||||||
|
|
||||||
|
<p>You can control enablement of Java 1.4 assertions with
|
||||||
|
an <a href="../Types/assertions.html"><code><assertions></code></a> subelement.</p>
|
||||||
|
|
||||||
|
<p>Assertion statements are currently ignored in non-forked mode.</p>
|
||||||
|
|
||||||
|
<h4 id="redirector">redirector</h4>
|
||||||
|
<em>Since Ant 1.6.2</em>
|
||||||
|
<p>A nested <a href="../Types/redirector.html">I/O Redirector</a> can be specified. In general, the
|
||||||
|
attributes of the redirector behave as the corresponding attributes available at the task level.
|
||||||
|
The most notable peculiarity stems from the retention of the <code><java></code> attributes
|
||||||
|
for backwards compatibility. Any file mapping is done using a <code>null</code> sourcefile;
|
||||||
|
therefore not all <a href="../Types/mapper.html">Mapper</a> types will return results. When no
|
||||||
|
results are returned, redirection specifications will fall back to the task level attributes. In
|
||||||
|
practice this means that defaults can be specified for <var>input</var>, <var>output</var>,
|
||||||
|
and <var>error</var> output files.</p>
|
||||||
|
<h3 id="failonerror">Errors and return codes</h3>
|
||||||
|
<p>By default, the return code of a <code><java></code> is ignored. Alternatively, you can
|
||||||
|
set <var>resultproperty</var> to the name of a property and have it assigned to the result code
|
||||||
|
(barring immutability, of course). When you set <var>failonerror</var>=<q>true</q>, the only
|
||||||
|
possible value for <var>resultproperty</var> is <q>0</q>. Any non-zero response is treated as an
|
||||||
|
error and would mean the build exits.</p>
|
||||||
|
<p>Similarly, if <var>failonerror</var>=<q>false</q> and <var>fork</var>=<q>false</q>,
|
||||||
|
then <code><java></code> <em>must</em> return <q>0</q> otherwise the build will exit, as the
|
||||||
|
class was run by the build JVM.</p>
|
||||||
|
|
||||||
|
<h4 id="modulepath">modulepath</h4>
|
||||||
|
<em>Since Ant 1.9.7</em>
|
||||||
|
<p><code>Java</code>'s <var>modulepath</var> attribute is a <a href="../using.html#path">path-like
|
||||||
|
structure</a> and can also be set via a nested <code>modulepath</code> element.</p>
|
||||||
|
|
||||||
|
<h4 id="upgrademodulepath">upgrademodulepath</h4>
|
||||||
|
<em>Since Ant 1.9.7</em>
|
||||||
|
<p>The location of modules that replace upgradeable modules in the runtime image can be specified
|
||||||
|
using this <a href="../using.html#path">path-like structure</a>.</p>
|
||||||
|
|
||||||
|
<h3 id="jar-execute">JAR file execution</h3>
|
||||||
|
|
||||||
|
<p>The parameter of the <var>jar</var> attribute is of type <code>File</code>; that is, the
|
||||||
|
parameter is resolved to an absolute file relative to the base directory of the
|
||||||
|
project, <em>not</em> the directory in which the Java task is run. If you need to locate a JAR file
|
||||||
|
relative to the directory the task will be run in, you need to explicitly create the full path to
|
||||||
|
the JAR file.</p>
|
||||||
|
<p>When using the <var>jar</var> attribute, all classpath settings are ignored according
|
||||||
|
to <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html"
|
||||||
|
target="_top">Oracle's specification</a>.
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Run a class in this JVM with a new jar on the classpath</p>
|
||||||
|
<pre>
|
||||||
|
<java classname="test.Main">
|
||||||
|
<arg value="-h"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="dist/test.jar"/>
|
||||||
|
<pathelement path="${java.class.path}"/>
|
||||||
|
</classpath>
|
||||||
|
</java></pre>
|
||||||
|
|
||||||
|
<p>Run the JAR <samp>test.jar</samp> in this project's <samp>dist/lib</samp> directory, using the
|
||||||
|
manifest supplied entry point, forking (as required), and with a maximum memory of 128 MB. Any non
|
||||||
|
zero return code breaks the build.</p>
|
||||||
|
<pre>
|
||||||
|
<java jar="dist/test.jar"
|
||||||
|
fork="true"
|
||||||
|
failonerror="true"
|
||||||
|
maxmemory="128m">
|
||||||
|
<arg value="-h"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="dist/test.jar"/>
|
||||||
|
<pathelement path="${java.class.path}"/>
|
||||||
|
</classpath>
|
||||||
|
</java></pre>
|
||||||
|
|
||||||
|
<p>Run the JAR <samp>dist/test.jar</samp> relative to the directory <code>${exec.dir}</code>, this
|
||||||
|
being the same directory in which JVM is to start up.</p>
|
||||||
|
<pre>
|
||||||
|
<java dir="${exec.dir}"
|
||||||
|
jar="${exec.dir}/dist/test.jar"
|
||||||
|
fork="true"
|
||||||
|
failonerror="true"
|
||||||
|
maxmemory="128m">
|
||||||
|
<arg value="-h"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="dist/test.jar"/>
|
||||||
|
<pathelement path="${java.class.path}"/>
|
||||||
|
</classpath>
|
||||||
|
</java></pre>
|
||||||
|
|
||||||
|
<p>Run a given class with the current classpath.</p>
|
||||||
|
<pre><java classname="test.Main"/></pre>
|
||||||
|
|
||||||
|
<p>Add system properties and JVM properties to JVM as in <code>java
|
||||||
|
-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main</code>
|
||||||
|
<pre>
|
||||||
|
<java classname="test.Main"
|
||||||
|
fork="yes" >
|
||||||
|
<sysproperty key="DEBUG" value="true"/>
|
||||||
|
<arg value="-h"/>
|
||||||
|
<jvmarg value="-Xrunhprof:cpu=samples,file=log.txt,depth=3"/>
|
||||||
|
</java></pre>
|
||||||
|
|
||||||
|
<p>Use a given Java implementation (other than the one Ant is currently using) to run the class. For
|
||||||
|
documentation in the log <var>taskname</var> is used to change the <q>[java]</q> log-prefix
|
||||||
|
to <q>[java1.4]</q>.</p>
|
||||||
|
<pre>
|
||||||
|
<java classname="ShowJavaVersion" classpath="."
|
||||||
|
jvm="path-to-java14-home/bin/java" fork="true"
|
||||||
|
taskname="java1.4"/></pre>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: you can not specify the (highly deprecated) MS
|
||||||
|
JVM, <samp>jview.exe</samp>, as <var>jvm</var>, since it takes different parameters than other JVMs.
|
||||||
|
That JVM can be started from <code><exec></code> if required.</p>
|
||||||
|
|
||||||
|
<p>Run the module <samp>TestModule</samp> resolved on the modulepath <samp>lib/:dist/test.jar</samp>
|
||||||
|
with a maximum memory of 128 MB. Any non zero return code breaks the build.</p>
|
||||||
|
<pre>
|
||||||
|
<java fork="true"
|
||||||
|
failonerror="true"
|
||||||
|
maxmemory="128m"
|
||||||
|
module="TestModule"
|
||||||
|
modulepath="lib:dist/test.jar"/></pre>
|
||||||
|
|
||||||
|
<p>Run the class <samp>Main</samp> in module <samp>TestModule</samp> resolved on the
|
||||||
|
modulepath <samp>lib/:dist/test.jar</samp> with a maximum memory of 128 MB. Any non zero return code
|
||||||
|
breaks the build.</p>
|
||||||
|
<pre>
|
||||||
|
<java fork="true"
|
||||||
|
failonerror="true"
|
||||||
|
maxmemory="128m"
|
||||||
|
module="TestModule"
|
||||||
|
classname="Main">
|
||||||
|
<modulepath>
|
||||||
|
<pathelement location="lib"/>
|
||||||
|
<pathelement location="dist/test.jar"/>
|
||||||
|
</modulepath>
|
||||||
|
</java></pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,752 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Javac Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="javac">Javac</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Compiles a Java source tree.</p>
|
||||||
|
<p>The source and destination directory will be recursively scanned for Java source files to
|
||||||
|
compile. Only <code>.java</code> files that have no corresponding <samp>.class</samp> file or where
|
||||||
|
the <code>.class</code> file is older than the <samp>.java</samp> file will be compiled.</p>
|
||||||
|
<p><strong>Note</strong>: Apache Ant uses only the names of the source and class files to find the
|
||||||
|
classes that need a rebuild. It will not scan the source and therefore will have no knowledge about
|
||||||
|
nested classes, classes that are named differently from the source file, and so on. See
|
||||||
|
the <a href="../Tasks/depend.html"><code><depend></code></a> task for dependency checking
|
||||||
|
based on other than just existence/modification times.</p>
|
||||||
|
<p>When the source files are part of a package, the directory structure of the source tree should
|
||||||
|
follow the package hierarchy.</p>
|
||||||
|
<p>It is possible to refine the set of files that are being compiled. This can be done with
|
||||||
|
the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, and <var>excludesfile</var>
|
||||||
|
attributes. With the <var>includes</var> or <var>includesfile</var> attribute, you specify the files
|
||||||
|
you want to have included. The <var>exclude</var> or <var>excludesfile</var> attribute is used to
|
||||||
|
specify the files you want to have excluded. In both cases, the list of files can be specified by
|
||||||
|
either the filename, relative to the directory(s) specified in the <var>srcdir</var> attribute or
|
||||||
|
nested <code><src></code> element(s), or by using wildcard patterns. See the section
|
||||||
|
on <a href="../dirtasks.html#directorybasedtasks">directory-based tasks</a>, for information on how
|
||||||
|
the inclusion/exclusion of files works, and how to write wildcard patterns.</p>
|
||||||
|
<p id="compilervalues">It is possible to use different compilers. This can be specified by either
|
||||||
|
setting the global <code>build.compiler</code> property, which will affect
|
||||||
|
all <code><javac></code> tasks throughout the build, by setting the <var>compiler</var>
|
||||||
|
attribute, specific to the current <code><javac></code> task or by using a nested element of
|
||||||
|
any <a href="typedef.html">typedef</a>fed or <a href="componentdef.html">componentdef</a>fed type
|
||||||
|
that implements <code>org.apache.tools.ant.taskdefs.compilers.CompilerAdapter</code>. Valid values
|
||||||
|
for either the <code>build.compiler</code> property or the <var>compiler</var> attribute are:</p>
|
||||||
|
<ul>
|
||||||
|
<li><q>classic</q> (the standard compiler of JDK 1.1/1.2) – <q>javac1.1</q>
|
||||||
|
and <q>javac1.2</q> can be used as aliases.</li>
|
||||||
|
<li><q>modern</q> (the standard compiler of JDK 1.3 and later)
|
||||||
|
– <q>javac1.3</q>, <q>javac1.4</q>, <q>javac1.5</q> and <q>javac1.6</q>, <q>javac1.7</q>
|
||||||
|
(<em>since Ant 1.8.2</em>), <q>javac1.8</q> (<em>since Ant 1.8.3</em>), <q>javac1.9</q>
|
||||||
|
(<em>since Ant 1.9.5</em>), <q>javac9</q> (<em>since Ant 1.9.8</em>) and <q>javac10+</q>
|
||||||
|
(<em>since Ant 1.10.2</em>) can be used as aliases.</li>
|
||||||
|
<li><q>jikes</q> (the <a href="http://jikes.sourceforge.net/" target="_top">Jikes</a>
|
||||||
|
compiler).</li>
|
||||||
|
<li><q>jvc</q> (the Command-Line Compiler from Microsoft's SDK for Java / Visual J++)
|
||||||
|
– <q>microsoft</q> can be used as an alias.</li>
|
||||||
|
<li><q>kjc</q>
|
||||||
|
(the <a href="https://web.archive.org/web/20050212025507/http://www.dms.at/kopi/index.html"
|
||||||
|
target="_top">kopi</a> compiler).</li>
|
||||||
|
<li><q>gcj</q> (the <code>gcj</code> compiler
|
||||||
|
from <a href="https://gcc.gnu.org/gcc-7/changes.html#java" target="_top">GCC</a>).</li>
|
||||||
|
<li><q>sj</q> (Symantec Java compiler) – <q>symantec</q> can be used as an alias.</li>
|
||||||
|
<li><q>extJavac</q> (run either modern or classic in a JVM of its own).</li>
|
||||||
|
</ul>
|
||||||
|
<p>The default is <q>javacX</q> with <q>X</q> depending on the JDK version you use while you are
|
||||||
|
running Ant. If you wish to use a different compiler interface than those supplied, you can write a
|
||||||
|
class that implements the CompilerAdapter interface
|
||||||
|
(package <code>org.apache.tools.ant.taskdefs.compilers</code>). Supply the full classname in
|
||||||
|
the <code>build.compiler</code> property or the <var>compiler</var> attribute.</p>
|
||||||
|
<p>The <var>fork</var> attribute overrides the <code>build.compiler</code> property
|
||||||
|
or <var>compiler</var> attribute setting and expects a JDK 1.1 or higher to be set
|
||||||
|
in <code>JAVA_HOME</code>.</p>
|
||||||
|
<p>You can also use the <var>compiler</var> attribute to tell Ant which JDK version it shall assume
|
||||||
|
when it puts together the command line switches—even if you set <var>fork</var>=<q>true</q>.
|
||||||
|
This is useful if you want to run the compiler of JDK 1.1 while your current JDK is 1.2+. If you
|
||||||
|
use <var>compiler</var>=<q>javac1.1</q> and (for example) <var>depend</var>=<q>true</q>, Ant will
|
||||||
|
use the command line switch <kbd>-depend</kbd> instead of <kbd>-Xdepend</kbd>.</p>
|
||||||
|
<p>This task will drop all entries that point to non-existent files/directories from the classpath
|
||||||
|
it passes to the compiler.</p>
|
||||||
|
<p>The working directory for a forked executable (if any) is the project's base directory.</p>
|
||||||
|
<p><strong>Windows Note</strong>: When the modern compiler is used in unforked mode on Windows, it
|
||||||
|
locks up the files present in the classpath of the <code><javac></code> task, and does not
|
||||||
|
release them. The side effect of this is that you will not be able to delete or move those files
|
||||||
|
later on in the build. The workaround is to fork when invoking the compiler.</p>
|
||||||
|
<p>If your source contains native methods or fields annotated with
|
||||||
|
the <code>@Native</code> annotation you can set the <var>nativeheaderdir</var> attribute in order to
|
||||||
|
use the <kbd>-h</kbd> switch of <kbd>javac</kbd> to generate the native header files. Note that
|
||||||
|
the logic Ant uses to determine which files to compile does not take native headers into account,
|
||||||
|
i.e. if the <samp>.class</samp> is more recent than the corresponding <samp>.java</samp> file the
|
||||||
|
file will not get compiled even if a native header file generated for it would be outdated.</p>
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>srcdir</td>
|
||||||
|
<td>Location of the java files. (See the <a href="#srcdirnote">note</a> below.)</td>
|
||||||
|
<td>Yes, unless nested <code><src></code> elements or <var>modulesourcepath</var>
|
||||||
|
attribute or corresponding elements are present</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td>Location to store the class files.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includes</td>
|
||||||
|
<td>Comma- or space-separated list of patterns of files that must be included.</td>
|
||||||
|
<td>No; defaults to all <samp>.java</samp> files</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includesfile</td>
|
||||||
|
<td>Name of a file. Each line of this file is taken to be an include pattern.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludes</td>
|
||||||
|
<td>Comma- or space-separated list of patterns of files that must be excluded.</td>
|
||||||
|
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludesfile</td>
|
||||||
|
<td>Name of a file. Each line of this file is taken to be an exclude pattern.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>Indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>The classpath to use.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcepath</td>
|
||||||
|
<td>The sourcepath to use. To suppress the <code>sourcepath</code> switch,
|
||||||
|
use <var>sourcepath</var>=<q></q>.</td>
|
||||||
|
<td>No; defaults to <var>srcdir</var> unless nested <code><src></code> elements are
|
||||||
|
specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bootclasspath</td>
|
||||||
|
<td>Location of bootstrap class files. (See <a href="#bootstrap">below</a> for using
|
||||||
|
the <kbd>-X</kbd> and <kbd>-J-X</kbd> parameters for specifying the bootstrap
|
||||||
|
classpath).</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>The <var>classpath</var> to use, given as a <a href="../using.html#references">reference</a>
|
||||||
|
to a path defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcepathref</td>
|
||||||
|
<td>The <var>sourcepath</var> to use, given as
|
||||||
|
a <a href="../using.html#references">reference</a> to a path defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bootclasspathref</td>
|
||||||
|
<td>The <var>bootstrapclasspath</var> to use, given as
|
||||||
|
a <a href="../using.html#references">reference</a> to a path defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>extdirs</td>
|
||||||
|
<td>Location of installed extensions.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>encoding</td>
|
||||||
|
<td>Encoding of source files. (<strong>Note</strong>: <code>gcj</code> doesn't support this
|
||||||
|
option yet.)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nowarn</td>
|
||||||
|
<td>Indicates whether the <kbd>-nowarn</kbd> switch should be passed to the compiler.</td>
|
||||||
|
<td>No; defaults to <q>off</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debug</td>
|
||||||
|
<td>Indicates whether source should be compiled with debug information. If set
|
||||||
|
to <q>off</q>, <kbd>-g:none</kbd> will be passed on the command line for compilers that
|
||||||
|
support it (for other compilers, no command line argument will be used). If set
|
||||||
|
to <q>true</q>, the value of the <var>debuglevel</var> attribute determines the command line
|
||||||
|
argument.</td>
|
||||||
|
<td>No; defaults to <q>off</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debuglevel</td>
|
||||||
|
<td>Keyword list to be appended to the <kbd>-g</kbd> command-line switch. Legal values
|
||||||
|
are <q>none</q> or a comma-separated list of the following
|
||||||
|
keywords: <q>lines</q>, <q>vars</q>, and <q>source</q>.</td>
|
||||||
|
<td>No; ignored when <var>debug</var> is <q>false</q> or any implementation other
|
||||||
|
than <q>modern</q>, <q>javac1.2</q> and <q>jikes</q>; by default, nothing will be appended
|
||||||
|
to <kbd>-g</kbd></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>optimize</td>
|
||||||
|
<td>Indicates whether source should be compiled with optimization. <strong>Note</strong> that
|
||||||
|
this flag is just ignored by Sun's <kbd>javac</kbd> since JDK 1.3 (because compile-time
|
||||||
|
optimization is unnecessary).</td>
|
||||||
|
<td>No; defaults to <q>off</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>deprecation</td>
|
||||||
|
<td>Indicates whether source should be compiled with deprecation information.</td>
|
||||||
|
<td>No; defaults to <code>off</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>Asks the compiler for verbose output.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>depend</td>
|
||||||
|
<td>Enables dependency tracking for compilers that support this (<q>jikes</q>
|
||||||
|
and <q>classic</q>).</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includeAntRuntime</td>
|
||||||
|
<td>Whether to include the Ant run-time libraries in the classpath. <em>It is usually best</em>
|
||||||
|
to set this to <q>false</q> so the script's behavior is not sensitive to the environment in
|
||||||
|
which it is run.</td>
|
||||||
|
<td>No; defaults to <q>yes</q>,
|
||||||
|
unless <a href="../sysclasspath.html"><code>build.sysclasspath</code></a> property is set</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includeJavaRuntime</td>
|
||||||
|
<td>Whether to include the default run-time libraries from the executing JVM in the
|
||||||
|
classpath.<br/><strong>Note</strong>: In some setups the run-time libraries may be part of the
|
||||||
|
"Ant run-time libraries" so you may need to explicitly set <var>includeAntRuntime</var>
|
||||||
|
to <q>false</q> to ensure that the Java run-time libraries are not included.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fork</td>
|
||||||
|
<td>Whether to execute <code>javac</code> using the JDK compiler externally.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>executable</td>
|
||||||
|
<td>Complete path to the <kbd>javac</kbd> executable to use in case of <var>fork</var>
|
||||||
|
is <q>yes</q>.<br/><em>Since Ant 1.6</em> this attribute can also be used to specify the path
|
||||||
|
to the executable when using <q>jikes</q>, <q>jvc</q>, <q>gcj</q> or <q>sj</q>.</td>
|
||||||
|
<td>No; defaults to the compiler of current JDK, ignored if <var>fork</var> is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>memoryInitialSize</td>
|
||||||
|
<td>The initial size of the memory for the underlying JVM, if <kbd>javac</kbd> is run
|
||||||
|
externally. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td>
|
||||||
|
<td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var>
|
||||||
|
is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>memoryMaximumSize</td>
|
||||||
|
<td>The maximum size of the memory for the underlying JVM, if <kbd>javac</kbd> is run
|
||||||
|
externally; ignored otherwise. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td>
|
||||||
|
<td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var>
|
||||||
|
is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Indicates whether compilation errors will fail the build>.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorProperty</td>
|
||||||
|
<td>The property to set to <q>true</q> if compilation fails. <em>Since Ant 1.7.1</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>source</td>
|
||||||
|
<td>Java language features accepted by compiler, as specified by the <kbd>-source</kbd>
|
||||||
|
command-line switch. Valid feature versions are <q>1.3</q>, <q>1.4</q>, <q>1.5</q>
|
||||||
|
or <q>5</q>, etc. The attribute will be ignored by all implementations prior
|
||||||
|
to <q>javac1.4</q> (or <q>modern</q> when Ant is not running in a JVM 1.3), <q>gcj</q>
|
||||||
|
and <q>jikes</q>.<br/> If you use this attribute together with <q>gcj</q> or <q>jikes</q>, you
|
||||||
|
must make sure that your version supports the <kbd>-source</kbd> (or <kbd>-fsource</kbd>
|
||||||
|
for <kbd>gcj</kbd>) switch.</td>
|
||||||
|
<td>No; by default, no <kbd>-source</kbd> argument will be used at all unless the magic
|
||||||
|
<a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property is
|
||||||
|
set<br/><strong>Note that the default value depends on JDK that is running Ant. We highly
|
||||||
|
recommend to always specify this attribute.</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>Generate class files for specific JVM version (cross-compile).</td>
|
||||||
|
<td>No; by default, no <kbd>-target</kbd> argument will be used at all unless the
|
||||||
|
magic <a href="../javacprops.html#target"><code>ant.build.javac.target</code></a> property is
|
||||||
|
set<br/><strong>Note that the default value depends on JDK that is running Ant and
|
||||||
|
on <var>source</var>
|
||||||
|
(see <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCJDCID"
|
||||||
|
target="_top">Cross-Compilation Options</a>). We highly recommend to always specify this
|
||||||
|
attribute.</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compiler</td>
|
||||||
|
<td>The compiler implementation to use. See the above <a href="#compilervalues">list</a> of
|
||||||
|
valid compilers.</td>
|
||||||
|
<td>No; defaults to the value of the <code>build.compiler</code> property, if set, or default
|
||||||
|
compiler for the current JDK otherwise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>listfiles</td>
|
||||||
|
<td>Indicates whether the source files to be compiled will be listed.</td>
|
||||||
|
<td>No; defaults to <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tempdir</td>
|
||||||
|
<td>Where Ant should place temporary files. This is only used if the task is forked and the
|
||||||
|
command line args length exceeds 4 kB. <em>Since Ant 1.6</em>.</td>
|
||||||
|
<td>No; default is <code>java.io.tmpdir</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>updatedProperty</td>
|
||||||
|
<td>The property to set to <q>true</q> if compilation has taken place and has been
|
||||||
|
successful. <em>Since Ant 1.7.1</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includeDestClasses</td>
|
||||||
|
<td>This attribute controls whether to include the destination classes directory in the
|
||||||
|
classpath given to the compiler. If set to <q>true</q> (default), previously compiled classes
|
||||||
|
are on the classpath for the compiler. This means that "greedy" compilers will not recompile
|
||||||
|
dependent classes that are already compiled. In general this is a good thing as it stops the
|
||||||
|
compiler for doing unnecessary work. However, for some edge cases, involving generics,
|
||||||
|
the <kbd>javac</kbd> compiler needs to compile the dependent classes to get the generics
|
||||||
|
information. One example is documented in the bug
|
||||||
|
report: <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=40776" target="_top">Bug
|
||||||
|
40776 - a problem compiling a Java 5 project with generics</a>. Setting the attribute
|
||||||
|
to <q>false</q> will cause the compiler to recompile dependent classes. <em>Since Ant
|
||||||
|
1.7.1</em>.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>createMissingPackageInfoClass</td>
|
||||||
|
<td>Some package level annotations in <samp>package-info.java</samp> files don't create
|
||||||
|
any <samp>package-info.class</samp> files so Ant would recompile the same file every
|
||||||
|
time.<br/><em>Since Ant 1.8</em>, an empty <samp>package-info.class</samp> is created for
|
||||||
|
each <samp>package-info.java</samp> if there isn't one created by the compiler.<br/>In some
|
||||||
|
setups this additional class causes problems and it can be suppressed by setting this
|
||||||
|
attribute to <q>false</q>. <em>Since Ant 1.8.3</em>.</td>
|
||||||
|
<td>No; default is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepath</td>
|
||||||
|
<td>Specify where to find application modules. A list of directories of modules, module files or
|
||||||
|
exploded modules. <em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepathref</td>
|
||||||
|
<td>The <var>modulepath</var> to use, given as <a href="../using.html#references">reference</a>
|
||||||
|
to a path defined elsewhere. <em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulesourcepath</td>
|
||||||
|
<td>Specify where to find input source files for multiple module compilation. <em>since Ant
|
||||||
|
1.9.7</em></td>
|
||||||
|
<td>Yes, unless <var>srcdir</var> attribute or nested <code><src></code> elements are
|
||||||
|
present</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulesourcepathref</td>
|
||||||
|
<td>The <var>modulesourcepath</var> to use, given
|
||||||
|
as <a href="../using.html#references">reference</a> to a path defined elsewhere. <em>since
|
||||||
|
Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>upgrademodulepath</td>
|
||||||
|
<td>Specify the location of modules that replace upgradeable modules in the runtime
|
||||||
|
image. <em>since Ant 1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>upgrademodulepathref</td>
|
||||||
|
<td>The <var>upgrademodulepath</var> to use, given
|
||||||
|
as <a href="../using.html#references">reference</a> to a path defined elsewhere. <em>since Ant
|
||||||
|
1.9.7</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nativeheaderdir</td>
|
||||||
|
<td>Specify where to place generated native header files. <em>Since Ant 1.9.8</em>.
|
||||||
|
<td>No, ignored when compiling on JDK 7 or earlier</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>release</td>
|
||||||
|
<td>Specify the value for the <kbd>--release</kbd> switch.<br/>When set and running on JDK 9+
|
||||||
|
the <var>source</var> and <var>target</var> attributes as well as the <var>bootclasspath</var>
|
||||||
|
will be ignored. <em>Since Ant 1.9.8</em>.
|
||||||
|
<td>No, ignored when compiling on JDK 8 or earlier</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
|
||||||
|
attributes of <code><fileset></code> (<var>dir</var> becomes <var>srcdir</var>) as well as the
|
||||||
|
nested <code><include></code>, <code><exclude></code>
|
||||||
|
and <code><patternset></code> elements.</p>
|
||||||
|
<h4><code>srcdir</code>, <code>classpath</code>, <code>sourcepath</code>, <code>bootclasspath</code>,
|
||||||
|
<code>modulepath</code>, <code>modulesourcepath</code>, <code>upgrademodulepath</code> and <code>extdirs</code></h4>
|
||||||
|
<p><code><javac></code>'s <var>srcdir</var>, <var>classpath</var>, <var>sourcepath</var>,
|
||||||
|
<var>bootclasspath</var>, <var>extdirs</var>, <var>modulepath</var>, <var>modulesourcepath</var>,
|
||||||
|
and <var>upgrademodulepath</var> attributes are <a href="../using.html#path">path-like
|
||||||
|
structures</a> and can also be set via nested <code><src></code> (note the different
|
||||||
|
name!), <code><classpath></code>, <code><sourcepath></code>, <code><bootclasspath></code>,
|
||||||
|
<code><extdirs></code>, <code><modulepath></code>, <code><modulesourcepath></code>
|
||||||
|
and <code><upgrademodulepath></code> elements, respectively.</p>
|
||||||
|
|
||||||
|
<h4>compilerarg</h4>
|
||||||
|
|
||||||
|
<p>You can specify additional command line arguments for the compiler with
|
||||||
|
nested <code><compilerarg></code> elements. These elements are specified
|
||||||
|
like <a href="../using.html#arg">Command-line Arguments</a> but have an additional attribute that
|
||||||
|
can be used to enable arguments only if a given compiler implementation will be used.</p>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td rowspan="4">See <a href="../using.html#arg">Command-line Arguments</a>.</td>
|
||||||
|
<td rowspan="4">Exactly one of these</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">line</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">path</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td rowspan="2">See <a href="../using.html#arg">Command-line Arguments</a>. <em>Since Ant
|
||||||
|
1.8</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>compiler</td>
|
||||||
|
<td>Only pass the specified argument if the chosen compiler implementation matches the value of
|
||||||
|
this attribute. Legal values are the same as those in the
|
||||||
|
above <a href="#compilervalues">list</a> of valid compilers.)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>compilerclasspath</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>A <a href="../using.html#path">path-like structure</a> holding the classpath to use when loading
|
||||||
|
the compiler implementation if a custom class has been specified. Doesn't have any effect when
|
||||||
|
using one of the built-in compilers.</p>
|
||||||
|
|
||||||
|
<h4>Any nested element of a type that implements <code>CompilerAdapter</code></h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>If a defined type implements the <code>CompilerAdapter</code> interface a nested element of that
|
||||||
|
type can be used as an alternative to the <var>compiler</var> attribute.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
|
||||||
|
<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
|
||||||
|
the <samp>.class</samp> files in the <samp>${build}</samp> directory. The classpath used
|
||||||
|
includes <samp>xyz.jar</samp>, and compiling with debug information is on. The source level
|
||||||
|
is <q>1.4</q>, so you can use <code>assert</code> statements.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
classpath="xyz.jar"
|
||||||
|
debug="on"
|
||||||
|
source="1.4"/></pre>
|
||||||
|
|
||||||
|
<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
|
||||||
|
the <samp>.class</samp> files in the <samp>${build}</samp> directory. Java compiler is forked using
|
||||||
|
the default <kbd>javac</kbd> executable. The source level is <q>1.2</q> (similar to <q>1.1</q>
|
||||||
|
or <q>1.3</q>) and the class files should be runnable under JDK 1.2+ as well.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
fork="true"
|
||||||
|
source="1.2"
|
||||||
|
target="1.2"/></pre>
|
||||||
|
|
||||||
|
<p>Compile all <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
|
||||||
|
the <samp>.class</samp> files in the <samp>${build}</samp> directory. Java compiler is forked using
|
||||||
|
the executable named <kbd>java$javac.exe</kbd>. Note that the <q>$</q> sign needs to be escaped by a
|
||||||
|
second one. The source level is <q>1.5</q>, so you can use generics.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
fork="java$$javac.exe"
|
||||||
|
source="1.5"/></pre>
|
||||||
|
|
||||||
|
<p>Compile <samp>.java</samp> files under the <samp>${src}</samp> directory, and store
|
||||||
|
the <samp>.class</samp> files in the <code>${build}</code> directory. The classpath used
|
||||||
|
includes <samp>xyz.jar</samp>, and debug information is on. Only files
|
||||||
|
under <samp>mypackage/p1</samp> and <samp>mypackage/p2</samp> are used. All files in and below
|
||||||
|
the <samp>mypackage/p1/testpackage</samp> directory are excluded from compilation. You didn't
|
||||||
|
specify a source or target level, so the actual values used will depend on which JDK you ran Ant
|
||||||
|
with.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
includes="mypackage/p1/**,mypackage/p2/**"
|
||||||
|
excludes="mypackage/p1/testpackage/**"
|
||||||
|
classpath="xyz.jar"
|
||||||
|
debug="on"/></pre>
|
||||||
|
|
||||||
|
<p>This is the same as the previous example, with the addition of a second source path, defined by
|
||||||
|
the property <samp>src2</samp>. This can also be represented using nested <code><src></code>
|
||||||
|
elements as follows:</p>
|
||||||
|
<pre>
|
||||||
|
<javac destdir="${build}"
|
||||||
|
classpath="xyz.jar"
|
||||||
|
debug="on">
|
||||||
|
<src path="${src}"/>
|
||||||
|
<src path="${src2}"/>
|
||||||
|
<include name="mypackage/p1/**"/>
|
||||||
|
<include name="mypackage/p2/**"/>
|
||||||
|
<exclude name="mypackage/p1/testpackage/**"/>
|
||||||
|
</javac></pre>
|
||||||
|
|
||||||
|
<p>If you want to run the <kbd>javac</kbd> compiler of a different JDK, you should tell Ant where to
|
||||||
|
find the compiler and which version of JDK you will be using so it can choose the correct command
|
||||||
|
line switches. The following example executes a JDK 1.1 <kbd>javac</kbd> in a new process and uses
|
||||||
|
the correct command line switches even when Ant is running in a JVM of a different version:</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
fork="yes"
|
||||||
|
executable="/opt/java/jdk1.1/bin/javac"
|
||||||
|
compiler="javac1.1"/></pre>
|
||||||
|
|
||||||
|
<p id="srcdirnote"><strong>Note</strong>: If you wish to compile only source files located in
|
||||||
|
certain packages below a common root, use the <var>include</var>/<var>exclude</var> attributes
|
||||||
|
or <code><include></code>/<code><exclude></code> nested elements to filter for these
|
||||||
|
packages. Do not include part of your package structure in the <var>srcdir</var> attribute (or
|
||||||
|
nested <code><src></code> elements), or Ant will recompile your source files every time you
|
||||||
|
run your compile target. See the <a href="https://ant.apache.org/faq.html#always-recompiles"
|
||||||
|
target="_top">Ant FAQ</a> for additional information.</p>
|
||||||
|
|
||||||
|
<p>If you wish to compile only files explicitly specified and disable <code>javac</code>'s default
|
||||||
|
searching mechanism then you can unset the <var>sourcepath</var> attribute:</p>
|
||||||
|
<pre>
|
||||||
|
<javac sourcepath="" srcdir="${src}"
|
||||||
|
destdir="${build}" >
|
||||||
|
<include name="**/*.java"/>
|
||||||
|
<exclude name="**/Example.java"/>
|
||||||
|
</javac></pre>
|
||||||
|
|
||||||
|
<p>That way the <code>javac</code> will compile all Java source files under <samp>${src}</samp>
|
||||||
|
directory but skip the examples. The compiler will even produce errors if some of the non-example
|
||||||
|
files refers to them.</p>
|
||||||
|
|
||||||
|
<p>If you wish to compile with a special JDK (another than the one Ant is currently using), set
|
||||||
|
the <var>executable</var> and <var>fork</var> attribute. Using <var>taskname</var> could show in the
|
||||||
|
log, that these settings are fix.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir=""
|
||||||
|
destdir=""
|
||||||
|
executable="path-to-java14-home/bin/javac"
|
||||||
|
fork="true"
|
||||||
|
taskname="javac1.4"/></pre>
|
||||||
|
|
||||||
|
<p>If you want to activate other compiler options like <code>lint</code> you could use
|
||||||
|
the <code><compilerarg></code> element:</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src.dir}"
|
||||||
|
destdir="${classes.dir}"
|
||||||
|
classpathref="libraries">
|
||||||
|
<compilerarg value="-Xlint"/>
|
||||||
|
</javac></pre>
|
||||||
|
|
||||||
|
<p>If you want to use a custom CompilerAdapter <code>org.example.MyAdapter</code> you can either use
|
||||||
|
the <var>compiler</var> attribute:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src.dir}"
|
||||||
|
destdir="${classes.dir}"
|
||||||
|
compiler="org.example.MyAdapter"/></pre>
|
||||||
|
|
||||||
|
<p>or a define a type and nest this into the task like in:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<componentdef classname="org.example.MyAdapter"
|
||||||
|
name="myadapter"/>
|
||||||
|
<javac srcdir="${src.dir}"
|
||||||
|
destdir="${classes.dir}">
|
||||||
|
<myadapter/>
|
||||||
|
</javac></pre>
|
||||||
|
|
||||||
|
<p>in which case your compiler adapter can support attributes and nested elements of its own.</p>
|
||||||
|
|
||||||
|
<p>The following examples demonstrate the use of Java 9+ modules.</p>
|
||||||
|
|
||||||
|
<p>Compile all <samp>.java</samp> files in a single module under the <samp>${src}</samp> directory,
|
||||||
|
and store the <samp>.class</samp> files in the <code>${build}</code> directory. The compilation uses
|
||||||
|
application modules located in <samp>modules</samp> folder. The source level is <q>9</q> to enable
|
||||||
|
modules.</p>
|
||||||
|
<pre>
|
||||||
|
<javac srcdir="${src}"
|
||||||
|
destdir="${build}"
|
||||||
|
includeantruntime="false"
|
||||||
|
modulepath="modules"
|
||||||
|
source="9"/></pre>
|
||||||
|
|
||||||
|
<p>Compile all <samp>.java</samp> files in <samp>gen/classes</samp>, <samp>lin32/classes</samp>
|
||||||
|
and <code>lin64/classes</code> in all source modules under the <code>${src}</code>
|
||||||
|
directory. Generate module directories in the <samp>${build}</samp> directory. Each generated module
|
||||||
|
directory under the <samp>${build}</samp> directory contains <code>.class</code> files from
|
||||||
|
corresponding source module. The <samp>*</samp> is a token representing the name of any of the
|
||||||
|
modules in the compilation module set. The <code>{ ... , ... }</code> express alternates for
|
||||||
|
expansion. The compilation uses application modules located in <code>modules</code> folder. The
|
||||||
|
source level is <q>9</q> to enable modules.</p>
|
||||||
|
<pre>
|
||||||
|
<javac modulesourcepath="${src}/*/{gen,lin{32,64}}/classes"
|
||||||
|
destdir="${build}"
|
||||||
|
includeantruntime="false"
|
||||||
|
modulepath="modules"
|
||||||
|
source="9"/></pre>
|
||||||
|
|
||||||
|
<h3 id="jikes">Jikes notes</h3>
|
||||||
|
|
||||||
|
<p>You need Jikes 1.15 or later.</p>
|
||||||
|
|
||||||
|
<p>Jikes supports some extra options, which can be set be defining the properties shown below prior
|
||||||
|
to invoking the task. The setting for each property will be in effect for
|
||||||
|
all <code><javac></code> tasks throughout the build. The Ant developers are aware that this
|
||||||
|
is ugly and inflexible – expect a better solution in the future. All the options are boolean,
|
||||||
|
and must be set to <q>true</q> or <q>yes</q> to be interpreted as anything other
|
||||||
|
than <q>false</q>. By default, <code>build.compiler.warnings</code> is <q>true</q>, while all others
|
||||||
|
are <q>false</q>.</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Property</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Default</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>build.compiler.emacs</code></td>
|
||||||
|
<td>Enable emacs-compatible error messages.</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>build.compiler.fulldepend</code></td>
|
||||||
|
<td>Enable full dependency checking; see<br/> the <code>+F</code> switch in the Jikes
|
||||||
|
manual.</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>build.compiler.pedantic</code></td>
|
||||||
|
<td>Enable pedantic warnings.</td>
|
||||||
|
<td><q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>build.compiler.warnings</code><br/><em><u>Deprecated</u></em>.
|
||||||
|
Use <code><javac></code>'s <var>nowarn</var> attribute instead.</td>
|
||||||
|
<td>Don't disable warning messages.</td>
|
||||||
|
<td><q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3 id="jvc">Jvc notes</h3>
|
||||||
|
|
||||||
|
<p><q>Jvc</q> will enable Microsoft extensions unless you set the
|
||||||
|
property <code>build.compiler.jvc.extensions</code> to <q>false</q> before
|
||||||
|
invoking <code><javac></code>.</p>
|
||||||
|
|
||||||
|
<h3 id="bootstrap">Bootstrap options</h3>
|
||||||
|
<p>The Sun <kbd>javac</kbd> compiler has a <kbd>-bootclasspath</kbd> command line
|
||||||
|
option—this corresponds to the <var>bootclasspath</var> attribute/element of
|
||||||
|
the <code><javac></code> task. The Sun compiler also allows more control over the boot
|
||||||
|
classpath using the <kbd>-X</kbd> and <kbd>-J-X</kbd> attributes. One can set these by using
|
||||||
|
the <code><compilerarg></code>. <em>Since Ant 1.6.0</em>, there is a shortcut to convert path
|
||||||
|
references to strings that can by used in an OS independent fashion
|
||||||
|
(see <a href="../using.html#pathshortcut">pathshortcut</a>). For example:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<path id="lib.path.ref">
|
||||||
|
<fileset dir="lib" includes="*.jar"/>
|
||||||
|
</path>
|
||||||
|
<javac srcdir="src" destdir="classes">
|
||||||
|
<compilerarg arg="-Xbootclasspath/p:${toString:lib.path.ref}"/>
|
||||||
|
</javac></pre>
|
||||||
|
|
||||||
|
<h3>OpenJDK notes</h3>
|
||||||
|
<p>The <a href="https://openjdk.java.net/" target="_top">OpenJDK</a> project has provided
|
||||||
|
the <code>javac</code> <a href="https://openjdk.java.net/groups/compiler/" target="_top">compiler</a>
|
||||||
|
as an open source project. The output of this project is a <code>javac.jar</code> which contains
|
||||||
|
the <kbd>javac</kbd> compiler. This compiler may be used with the <code><javac></code> task
|
||||||
|
with the use of a <kbd>-Xbootclasspath/p</kbd> Java argument. The argument needs to be given to the
|
||||||
|
runtime system of the <kbd>javac</kbd> executable, so it needs to be prepended with a <kbd>-J</kbd>,
|
||||||
|
for example:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<property name="patched.javac.jar"
|
||||||
|
location="${my.patched.compiler}/dist/lib/javac.jar"/>
|
||||||
|
|
||||||
|
<presetdef name="patched.javac">
|
||||||
|
<javac fork="yes">
|
||||||
|
<compilerarg value="-J-Xbootclasspath/p:${patched.javac.jar}"/>
|
||||||
|
</javac>
|
||||||
|
</presetdef>
|
||||||
|
|
||||||
|
|
||||||
|
<patched.javac srcdir="src/java" destdir="build/classes"
|
||||||
|
debug="yes"/></pre>
|
||||||
|
|
||||||
|
<h3>Note on package-info.java</h3>
|
||||||
|
<p><samp>package-info.java</samp> files were introduced in Java 5 to allow package level
|
||||||
|
annotations. On compilation, if the <code>.java</code> file does not contain runtime annotations,
|
||||||
|
there will be no corresponding <code>.class</code> file. Prior to Ant 1.7.1, when
|
||||||
|
the <code><javac></code> task is run again, the task will try to compile
|
||||||
|
the <samp>package-info.java</samp> files again.</p>
|
||||||
|
<p>With Ant 1.7.1, a different kind of logic was introduced that involved the timestamp of the
|
||||||
|
directory that would normally contain the <samp>.class</samp> file. This logic turned out to lead
|
||||||
|
to Ant not recompiling <samp>package-info.java</samp> in certain setup.</p>
|
||||||
|
<p><em>Since Ant 1.8.0</em>, an "empty" <samp>package-info.class</samp> file is created if Ant
|
||||||
|
compiles a <samp>package-info.java</samp> and no <samp>package-info.class</samp> file has been
|
||||||
|
created by the compiler itself.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,192 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>JavaCC Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="javacc">JavaCC</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Invokes the <a href="https://javacc.org/" target="_top">JavaCC</a> compiler compiler on a grammar
|
||||||
|
file.</p>
|
||||||
|
<p>To use the <code>javacc</code> task, set the <var>target</var> attribute to the name of the
|
||||||
|
grammar file to process. You also need to specify the directory containing the JavaCC installation
|
||||||
|
using the <var>javacchome</var> attribute, so that Apache Ant can find the JavaCC classes.
|
||||||
|
Optionally, you can also set the <var>outputdirectory</var> to write the generated file to a
|
||||||
|
specific directory. Otherwise JavaCC writes the generated files to the directory containing the
|
||||||
|
grammar file.</p>
|
||||||
|
<p>This task only invokes JavaCC if the grammar file is newer than the generated <samp>.java</samp>
|
||||||
|
files. JavaCC assumes that the Java class name of the generated parser is the same as the name of
|
||||||
|
the grammar file, ignoring the <samp>.jj</samp>. If this is not the case, the <code>javacc</code>
|
||||||
|
task will still work, but it will always generate the output files.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target</td>
|
||||||
|
<td>The grammar file to process.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>javacchome</td>
|
||||||
|
<td>The directory containing the JavaCC distribution.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputdirectory</td>
|
||||||
|
<td>The directory to write the generated files to. If not set, the files are written to the
|
||||||
|
directory containing the grammar file.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buildparser</td>
|
||||||
|
<td>Sets the BUILD_PARSER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buildtokenmanager</td>
|
||||||
|
<td>Sets the BUILD_TOKEN_MANAGER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>cachetokens</td>
|
||||||
|
<td>Sets the CACHE_TOKENS grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>choiceambiguitycheck</td>
|
||||||
|
<td>Sets the CHOICE_AMBIGUITY_CHECK grammar option. This is an integer option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>commontokenaction</td>
|
||||||
|
<td>Sets the COMMON_TOKEN_ACTION grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debuglookahead</td>
|
||||||
|
<td>Sets the DEBUG_LOOKAHEAD grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debugparser</td>
|
||||||
|
<td>Sets the DEBUG_PARSER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>debugtokenmanager</td>
|
||||||
|
<td>Sets the DEBUG_TOKEN_MANAGER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>errorreporting</td>
|
||||||
|
<td>Sets the ERROR_REPORTING grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>forcelacheck</td>
|
||||||
|
<td>Sets the FORCE_LA_CHECK grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ignorecase</td>
|
||||||
|
<td>Sets the IGNORE_CASE grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>javaunicodeescape</td>
|
||||||
|
<td>Sets the JAVA_UNICODE_ESCAPE grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>jdkversion</td>
|
||||||
|
<td>Sets the JDK_VERSION option. This is a string option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>keeplinecolumn</td>
|
||||||
|
<td>Sets the KEEP_LINE_COLUMN grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>lookahead</td>
|
||||||
|
<td>Sets the LOOKAHEAD grammar option. This is an integer option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>optimizetokenmanager</td>
|
||||||
|
<td>Sets the OPTIMIZE_TOKEN_MANAGER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>otherambiguitycheck</td>
|
||||||
|
<td>Sets the OTHER_AMBIGUITY_CHECK grammar option. This is an integer option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sanitycheck</td>
|
||||||
|
<td>Sets the SANITY_CHECK grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>static</td>
|
||||||
|
<td>Sets the STATIC grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>unicodeinput</td>
|
||||||
|
<td>Sets the UNICODE_INPUT grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>usercharstream</td>
|
||||||
|
<td>Sets the USER_CHAR_STREAM grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>usertokenmanager</td>
|
||||||
|
<td>Sets the USER_TOKEN_MANAGER grammar option. This is a boolean option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxmemory</td>
|
||||||
|
<td>Max amount of memory to allocate to the forked JVM. <em>since Ant 1.8.3</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h3>Example</h3>
|
||||||
|
|
||||||
|
<p>Invoke JavaCC on grammar file <samp>src/Parser.jj</samp>, writing the generated files
|
||||||
|
to <samp>build/src</samp>. The grammar option STATIC is set to <q>true</q> when invoking JavaCC.</p>
|
||||||
|
<pre>
|
||||||
|
<javacc target="src/Parser.jj"
|
||||||
|
outputdirectory="build/src"
|
||||||
|
javacchome="c:/program files/JavaCC"
|
||||||
|
static="true"/></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,852 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Javadoc Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="javadoc">Javadoc/<em>Javadoc2</em></h2>
|
||||||
|
<p><em><u>Deprecation</u>: the <code>javadoc2</code> task simply points to the <code>javadoc</code>
|
||||||
|
task and it's there for backwards compatibility reasons. Since this task will be removed in future
|
||||||
|
versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a> instead.</em></p>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates code documentation using the <kbd>javadoc</kbd> tool.</p>
|
||||||
|
<p>The source directory will be recursively scanned for Java source files to process but only those
|
||||||
|
matching the inclusion rules, and not matching the exclusions rules will be passed to
|
||||||
|
the <kbd>javadoc</kbd> tool. This allows wildcards to be used to choose between package names,
|
||||||
|
reducing verbosity and management costs over time. This task, however, has no notion of
|
||||||
|
"changed" files, unlike the <a href="javac.html">javac</a> task. This means all packages
|
||||||
|
will be processed each time this task is run. In general, however, this task is used much less
|
||||||
|
frequently.</p>
|
||||||
|
<p><strong>Note</strong>: since <kbd>javadoc</kbd>
|
||||||
|
calls <code class="code">System.exit()</code>, <kbd>javadoc</kbd> cannot be run inside the same
|
||||||
|
JVM as Apache Ant without breaking functionality. For this reason, this task always forks JVM. This
|
||||||
|
overhead is not significant since <kbd>javadoc</kbd> is normally a heavy application and will be
|
||||||
|
called infrequently.</p>
|
||||||
|
<p><strong>Note</strong>: the <var>packagelist</var> attribute allows you to specify the list of
|
||||||
|
packages to document outside of the Ant file. It's a much better practice to include everything
|
||||||
|
inside the <code>build.xml</code> file. This option was added in order to make it easier to migrate
|
||||||
|
from regular makefiles, where you would use this option of <kbd>javadoc</kbd>. The packages
|
||||||
|
listed in <var>packagelist</var> are not checked, so the task performs even if some packages are
|
||||||
|
missing or broken. Use this option if you wish to convert from an existing makefile. Once things are
|
||||||
|
running you should then switch to the regular notation.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: When generating the JavaDocs for classes which contains annotations you
|
||||||
|
maybe get a <code class="output">java.lang.ClassCastException:
|
||||||
|
com.sun.tools.javadoc.ClassDocImpl</code>. This is
|
||||||
|
due <a href="https://bugs.openjdk.java.net/browse/JDK-6442982" target="_top">bug 6442982</a>. The
|
||||||
|
cause is that <kbd>javadoc</kbd> cannot find the implementations of used annotations. The
|
||||||
|
workaround is providing the jars with these implementations (like
|
||||||
|
JAXBs <code class="code">@XmlType</code>, ...) to <code><javadoc></code>
|
||||||
|
using <var>classpath</var>, <var>classpathref</var> attributes or
|
||||||
|
nested <code><classpath></code> element.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: many problems with running <kbd>javadoc</kbd> stem from command lines
|
||||||
|
that have become too long—even though the error message doesn't give the slightest hint this
|
||||||
|
may be the problem. If you encounter problems with the task, try to set
|
||||||
|
the <var>useexternalfile</var> attribute to <q>true</q> first.</p>
|
||||||
|
|
||||||
|
<p>If you use multiple ways to specify where <kbd>javadoc</kbd> should be looking for sources, your
|
||||||
|
result will be the union of all specified documentations. If you, e.g., specify
|
||||||
|
a <var>sourcepath</var> attribute and also a nested <code>packageset</code> both pointing at the
|
||||||
|
same directory your <var>excludepackagenames</var> attribute won't have any effect unless it agrees
|
||||||
|
with the <var>exclude</var> patterns of the <code>packageset</code> (and vice versa).</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcepath</td>
|
||||||
|
<td>Specify where to find source files</td>
|
||||||
|
<td rowspan="4">At least one of the four or
|
||||||
|
nested <code><sourcepath></code>, <code><fileset></code>,
|
||||||
|
<code>module</code> or <code><packageset></code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcepathref</td>
|
||||||
|
<td>Specify where to find source files by <a href="../using.html#references">reference</a> to a
|
||||||
|
<var>sourcepath</var> defined elsewhere.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>sourcefiles</td>
|
||||||
|
<td>Comma separated list of source files—see also the nested <code>source</code>
|
||||||
|
element.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulenames</td>
|
||||||
|
<td>Comma separated list of module names -- see also
|
||||||
|
the nested <code>module</code> element. <em>since Ant 1.10.6</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td>Destination directory for output files</td>
|
||||||
|
<td>Yes, unless a <var>doclet</var> has been specified.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maxmemory</td>
|
||||||
|
<td>Max amount of memory to allocate to the <kbd>javadoc</kbd> JVM</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>packagenames</td>
|
||||||
|
<td>Comma separated list of package files (with terminating wildcard)—see also the
|
||||||
|
nested <code>package</code> element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>packageList</td>
|
||||||
|
<td>The name of a file containing the packages to process</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>Specify where to find user class files</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bootclasspath</td>
|
||||||
|
<td>Override location of class files loaded by the bootstrap class loader</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpathref</td>
|
||||||
|
<td>Specify where to find user class files by <a href="../using.html#references">reference</a>
|
||||||
|
to a <var>classpath</var> defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bootclasspathref</td>
|
||||||
|
<td>Override location of class files loaded by the bootstrap class loader
|
||||||
|
by <a href="../using.html#references">reference</a> to a <var>bootclasspath</var> defined
|
||||||
|
elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Extdirs</td>
|
||||||
|
<td>Override location of installed extensions</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Overview</td>
|
||||||
|
<td>Read overview documentation from HTML file</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>access</td>
|
||||||
|
<td>Access mode: one of <q>public</q>, <q>protected</q>, <q>package</q>, or <q>private</q></td>
|
||||||
|
<td>No; default is <q>protected</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Public</td>
|
||||||
|
<td>Show only public classes and members</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Protected</td>
|
||||||
|
<td>Show protected/public classes and members (default)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Package</td>
|
||||||
|
<td>Show package/protected/public classes and members</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Private</td>
|
||||||
|
<td>Show all classes and members</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Old</td>
|
||||||
|
<td>Generate output using JDK 1.1 emulating doclet.<br/><strong>Note</strong>:
|
||||||
|
This attribute has no effect unless you're using an pre jdk 1.4 external <kbd>javadoc</kbd>
|
||||||
|
</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Verbose</td>
|
||||||
|
<td>Output messages about what <kbd>javadoc</kbd> is doing</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Locale</td>
|
||||||
|
<td>Locale to be used, e.g. <q>en_US</q> or <q>en_US_WIN</q></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Encoding</td>
|
||||||
|
<td>Source file encoding name</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Version</td>
|
||||||
|
<td>Include <code>@version</code> paragraphs</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Use</td>
|
||||||
|
<td>Create class and package usage pages</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Author</td>
|
||||||
|
<td>Include <code>@author</code> paragraphs</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Splitindex</td>
|
||||||
|
<td>Split index into one file per letter</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Windowtitle</td>
|
||||||
|
<td>Browser window title for the documentation (text)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Doctitle</td>
|
||||||
|
<td>Include title for the package index (first) page (HTML code)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Header</td>
|
||||||
|
<td>Include header text for each page (HTML code)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Footer</td>
|
||||||
|
<td>Include footer text for each page (HTML code)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bottom</td>
|
||||||
|
<td>Include bottom text for each page (HTML code)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>link</td>
|
||||||
|
<td>Create links to <code>javadoc</code> output at the given URL—see also the
|
||||||
|
nested <code>link</code> element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>linkoffline</td>
|
||||||
|
<td>Link to docs at <samp><em>url</em></samp> using package list
|
||||||
|
at <samp><em>alt-url</em></samp> by specifying a
|
||||||
|
value <q><em>url</em> <em>alt-url</em></q> (space as separator). A shorthand for the
|
||||||
|
nested <code>link</code> element with <var>offline</var>=<q>true</q>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>group</td>
|
||||||
|
<td>Group specified packages together in overview page. The format is as
|
||||||
|
described <a href="#groupattribute">below</a>—see also the nested <code>group</code>
|
||||||
|
element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nodeprecated</td>
|
||||||
|
<td>Do not include <code>@deprecated</code> information</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nodeprecatedlist</td>
|
||||||
|
<td>Do not generate deprecated list</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>notree</td>
|
||||||
|
<td>Do not generate class hierarchy</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>noindex</td>
|
||||||
|
<td>Do not generate index</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nohelp</td>
|
||||||
|
<td>Do not generate help link</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nonavbar</td>
|
||||||
|
<td>Do not generate navigation bar</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>serialwarn</td>
|
||||||
|
<td>Generate warning about <code>@serial</code> tag</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>helpfile</td>
|
||||||
|
<td>Specifies the HTML help file to use</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>stylesheetfile</td>
|
||||||
|
<td>Specifies the CSS stylesheet to use</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>charset</td>
|
||||||
|
<td>Charset for cross-platform viewing of generated documentation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>docencoding</td>
|
||||||
|
<td>Output file encoding name</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>doclet</td>
|
||||||
|
<td>Specifies the class file that starts the doclet used in generating the
|
||||||
|
documentation—see also the nested <code>doclet</code> element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>docletpath</td>
|
||||||
|
<td>Specifies the path to the doclet class file that is specified with the <kbd>-doclet</kbd>
|
||||||
|
option.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>docletpathref</td>
|
||||||
|
<td>Specifies the path to the doclet class file that is specified with the <kbd>-doclet</kbd>
|
||||||
|
option by <a href="../using.html#references">reference</a> to a path defined elsewhere.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>additionalparam</td>
|
||||||
|
<td>Lets you add additional parameters to the <kbd>javadoc</kbd> command line. Useful for
|
||||||
|
doclets. Parameters containing spaces need to be quoted using &quot;—see also the
|
||||||
|
nested <code>arg</code> element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonerror</td>
|
||||||
|
<td>Stop the build process if the command exits with a return code other than <q>0</q>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>failonwarning</td>
|
||||||
|
<td>Stop the build process if a warning is emitted—i.e. if <kbd>javadoc</kbd>'s output
|
||||||
|
contains the word <q>warning</q>. <em>since Ant 1.9.4</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludepackagenames</td>
|
||||||
|
<td>comma separated list of packages you don't want docs for—see also the
|
||||||
|
nested <code>excludepackage</code> element.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaultexcludes</td>
|
||||||
|
<td>indicates whether default excludes should be used (<q>yes|no</q>).</td>
|
||||||
|
<td>No; defaults to <q>yes</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>useexternalfile</td>
|
||||||
|
<td>indicates whether the source file names specified in <var>srcfiles</var> or as
|
||||||
|
nested <code>source</code> elements should be written to a temporary file to make the command
|
||||||
|
line shorter. Also applies to the package names specified via the <var>packagenames</var>
|
||||||
|
attribute or nested <code>package</code> elements. <em>Since Ant 1.7.0</em>, also applies to
|
||||||
|
all the other command line options. (<q>yes|no</q>).<br/>
|
||||||
|
If enabled, the file will be written to
|
||||||
|
the <a href="../running.html#tmpdir">temporary
|
||||||
|
directory</a>.</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>source</td>
|
||||||
|
<td>Enable <kbd>javadoc</kbd> to handle Java language features. Set this to <q>1.4</q> to
|
||||||
|
document code that compiles using <kbd>javac -source 1.4</kbd>, etc.</td>
|
||||||
|
<td>No; default can be provided using the magic
|
||||||
|
<a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>linksource</td>
|
||||||
|
<td>Generate hyperlinks to source files. <em>since Ant 1.6</em>. (<q>yes|no</q>).</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>breakiterator</td>
|
||||||
|
<td>Use the new break iterator algorithm. <em>since Ant 1.6</em>. (<q>yes|no</q>).</td>
|
||||||
|
<td>No; default is <q>no</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>noqualifier</td>
|
||||||
|
<td>Enables the <kbd>-noqualifier</kbd> argument—must be <q>all</q> or a colon separated
|
||||||
|
list of packages. <em>since Ant 1.6</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>includenosourcepackages</td>
|
||||||
|
<td>If set to <q>true</q>, packages that don't contain Java source but
|
||||||
|
a <samp>package.html</samp> will get documented as well. <em>since Ant 1.6.3</em>.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>executable</td>
|
||||||
|
<td>Specify a particular <kbd>javadoc</kbd> executable to use in place of the default binary
|
||||||
|
(found in the same JDK as Ant is running in). <em>since Ant 1.6.3</em>. <b>Note:</b>
|
||||||
|
<em>It is up to you to ensure that this command supports the attributes you wish to use.</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>docfilessubdirs</td>
|
||||||
|
<td>Enables deep-copying of <samp>doc-files</samp> subdirectories. <em>since Ant
|
||||||
|
1.8.0</em>.</td>
|
||||||
|
<td>No; defaults to <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>excludedocfilessubdir</td>
|
||||||
|
<td>Colon-separated list of <samp>doc-files</samp> subdirectories to exclude
|
||||||
|
if <var>docfilessubdirs</var> is true. <em>since Ant 1.8.0</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>postProcessGeneratedJavadocs</td>
|
||||||
|
<td>Whether to post-process the generated javadocs in order to mitigate
|
||||||
|
CVE-2013-1571. <em>Since Ant 1.9.2</em><br/> There is a frame injection attack possible in
|
||||||
|
javadocs generated by Oracle JDKs prior to Java 7 update 25
|
||||||
|
(<a href="https://www.oracle.com/technetwork/java/javase/7u25-relnotes-1955741.html#jpi-upt"
|
||||||
|
target="_top">details</a>). When this flag is set to <q>true</q>, Ant will check whether the
|
||||||
|
docs are vulnerable and will try to fix them.</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulesourcepath</td>
|
||||||
|
<td>Specify where to find module source files
|
||||||
|
<em>since Ant 1.10.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulesourcepathref</td>
|
||||||
|
<td>Specify where to find module source files by <a
|
||||||
|
href="../using.html#references">reference</a> to a PATH defined elsewhere.
|
||||||
|
<em>since Ant 1.10.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepath</td>
|
||||||
|
<td>Specify where to find module files
|
||||||
|
<em>since Ant 1.10.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modulepathref</td>
|
||||||
|
<td>Specify where to find module files by <a
|
||||||
|
href="../using.html#references">reference</a> to a PATH defined elsewhere.
|
||||||
|
<em>since Ant 1.10.6</em></td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="groupattribute">Format of the group attribute</h4>
|
||||||
|
<p>The arguments are comma-delimited. Each single argument is 2 space-delimited strings, where the
|
||||||
|
first one is the group's title and the second one a colon delimited list of packages.</p>
|
||||||
|
<p>If you need to specify more than one group, or a group whose title contains a comma or a space
|
||||||
|
character, using <a href="#groupelement">nested <code>group</code> elements</a> is highly
|
||||||
|
recommended.</p>
|
||||||
|
<p>E.g.:</p>
|
||||||
|
<pre>group="XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*"</pre>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>packageset</h4>
|
||||||
|
|
||||||
|
<p>A <a href="../Types/dirset.html">DirSet</a>. All matched directories that contain Java source
|
||||||
|
files will be passed to <kbd>javadoc</kbd> as package names. Package names are created from the
|
||||||
|
directory names by translating the directory separator into dots. Ant assumes the base directory of
|
||||||
|
the <code>packageset</code> points to the root of a package hierarchy.</p>
|
||||||
|
|
||||||
|
<p>The <var>packagenames</var>, <var>excludepackagenames</var> and <var>defaultexcludes</var>
|
||||||
|
attributes of the task have no effect on the nested <code><packageset></code> elements.</p>
|
||||||
|
|
||||||
|
<h4>fileset</h4>
|
||||||
|
|
||||||
|
<p>A <a href="../Types/fileset.html">FileSet</a>. All matched files will be passed
|
||||||
|
to <kbd>javadoc</kbd> as source files. Ant will automatically add the include
|
||||||
|
pattern <samp>**/*.java</samp> (and <samp>**/package.html</samp>
|
||||||
|
if <var>includenosourcepackages</var> is <q>true</q>) to these filesets.</p>
|
||||||
|
|
||||||
|
<p>Nested filesets can be used to document sources that are in the default package or if you want to
|
||||||
|
exclude certain files from documentation. If you want to document all source files and don't use
|
||||||
|
the default package, <code>packageset</code>s should be used instead as this increases performance
|
||||||
|
of <kbd>javadoc</kbd>.</p>
|
||||||
|
|
||||||
|
<p>The <var>packagenames</var>, <var>excludepackagenames</var> and <var>defaultexcludes</var>
|
||||||
|
attributes of the task have no effect on the nested <code><fileset></code> elements.</p>
|
||||||
|
|
||||||
|
<h4>sourcefiles</h4>
|
||||||
|
|
||||||
|
<p>A container for arbitrary file system based <a href="../Types/resources.html#collection">resource
|
||||||
|
collections</a>. All files contained in any of the nested collections (this includes nested
|
||||||
|
filesets, filelists or paths) will be passed to javadoc as source files.</p>
|
||||||
|
|
||||||
|
<h4>package</h4>
|
||||||
|
<p>Same as one entry in the list given by <var>packagenames</var>.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The package name (may be a wildcard)</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>excludepackage</h4>
|
||||||
|
<p>Same as one entry in the list given by <var>excludepackagenames</var>.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
Same as for <code>package</code>.
|
||||||
|
|
||||||
|
<h4>module</h4>
|
||||||
|
<p><em>since Ant 1.10.6</em></p>
|
||||||
|
<p>Same as one entry in the list given by <code>modulenames</code>.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The module name</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>source</h4>
|
||||||
|
<p>Same as one entry in the list given by <var>sourcefiles</var>.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>file</td>
|
||||||
|
<td>The source file to document</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>doctitle</h4>
|
||||||
|
|
||||||
|
<p>Same as the <var>doctitle</var> attribute, but you can nest text inside the element this way.</p>
|
||||||
|
|
||||||
|
<p>If the nested text contains line breaks, you must use the <var>useexternalfile</var> attribute
|
||||||
|
and set it to <q>true</q>.</p>
|
||||||
|
|
||||||
|
<h4>header</h4>
|
||||||
|
|
||||||
|
<p>Similar to <code><doctitle></code>.</p>
|
||||||
|
|
||||||
|
<h4>footer</h4>
|
||||||
|
|
||||||
|
<p>Similar to <code><doctitle></code>.</p>
|
||||||
|
|
||||||
|
<h4>bottom</h4>
|
||||||
|
|
||||||
|
<p>Similar to <code><doctitle></code>.</p>
|
||||||
|
|
||||||
|
<h4>link</h4>
|
||||||
|
<p>Create link to <kbd>javadoc</kbd> output at the given URL. This performs the same role as
|
||||||
|
the <var>link</var> and <var>linkoffline</var> attributes. You can use either syntax (or both at
|
||||||
|
once), but with the nested elements you can easily specify multiple occurrences of the
|
||||||
|
arguments.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>href</td>
|
||||||
|
<td>The URL for the external documentation you wish to link to. This can be an absolute URL, or
|
||||||
|
a relative file name.</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>offline</td>
|
||||||
|
<td><q>true</q> if this link is not available online at the time of generating the
|
||||||
|
documentation</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>packagelistLoc</td>
|
||||||
|
<td>The location to the directory containing the package-list file for the external
|
||||||
|
documentation</td>
|
||||||
|
<td rowspan="2">One of the two if the <var>offline</var> attribute is <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>packagelistURL</td>
|
||||||
|
<td class="left">The URL of the the directory containing the package-list file for the external
|
||||||
|
documentation</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>resolveLink</td>
|
||||||
|
<td>If the <var>link</var> attribute is a relative file name, Ant will first try to locate the
|
||||||
|
file relative to the current project's <var>basedir</var> and if it finds a file there use an
|
||||||
|
absolute URL for the <var>link</var> attribute, otherwise it will pass the file name verbatim
|
||||||
|
to the <kbd>javadoc</kbd> command.</td>
|
||||||
|
<td>No; default is <q>false</q></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="groupelement">group</h4>
|
||||||
|
<p>Separates packages on the overview page into whatever groups you specify, one group per
|
||||||
|
table. This performs the same role as the <var>group</var> attribute. You can use either syntax (or
|
||||||
|
both at once), but with the nested elements you can easily specify multiple occurrences of the
|
||||||
|
arguments.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>title</td>
|
||||||
|
<td>Title of the group</td>
|
||||||
|
<td>Yes, unless nested <code><title></code> given</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>packages</td>
|
||||||
|
<td>List of packages to include in that group. Multiple packages are separated with <q>:</q>.</td>
|
||||||
|
<td>Yes, unless nested <code><package></code>s given</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>The title may be specified as a nested <code><title></code> element with text contents, and
|
||||||
|
the packages may be listed with nested <code><package></code> elements as for the main
|
||||||
|
task.</p>
|
||||||
|
|
||||||
|
<h4>doclet</h4>
|
||||||
|
<p>The doclet nested element is used to specify
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html"
|
||||||
|
target="_top">doclet</a> that <kbd>javadoc</kbd> will use to process the input source files. A
|
||||||
|
number of the standard <kbd>javadoc</kbd> arguments are actually arguments of the standard
|
||||||
|
doclet. If these are specified in the <code>javadoc</code> task's attributes, they will be passed to
|
||||||
|
the doclet specified in the <code><doclet></code> nested element. Such attributes should only
|
||||||
|
be specified, therefore, if they can be interpreted by the doclet in use.</p>
|
||||||
|
|
||||||
|
<p>If the doclet requires additional parameters, these can be specified
|
||||||
|
with <code><param></code> elements within the <code><doclet></code> element. These
|
||||||
|
parameters are restricted to simple strings. An example usage of the <code>doclet</code> element is
|
||||||
|
shown below:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<javadoc ... >
|
||||||
|
<doclet name="theDoclet"
|
||||||
|
path="path/to/theDoclet">
|
||||||
|
<param name="-foo" value="foovalue"/>
|
||||||
|
<param name="-bar" value="barvalue"/>
|
||||||
|
</doclet>
|
||||||
|
</javadoc></pre>
|
||||||
|
|
||||||
|
<h4 id="tagelement">tag</h4>
|
||||||
|
|
||||||
|
<p>If you want to specify a standard tag using a nested <code>tag</code> element because you want to
|
||||||
|
determine the order the tags are output, you must not set the <var>description</var> attribute for
|
||||||
|
those tags.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>Name of the tag (e.g. <q>todo</q>)</td>
|
||||||
|
<td>Yes, unless the <var>dir</var> attribute is specified</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>description</td>
|
||||||
|
<td>Description for tag (e.g. <q>To do:</q>)</td>
|
||||||
|
<td>
|
||||||
|
No, the <kbd>javadoc</kbd> executable will pick a default if this is not specified
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enabled</td>
|
||||||
|
<td>Whether or not the tag is enabled</td>
|
||||||
|
<td>No; defaults to <q>true</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>scope</td>
|
||||||
|
<td>Scope for the tag—the elements in which it can be used. This is a comma separated list
|
||||||
|
of some of the
|
||||||
|
elements: <q>overview</q>, <q>packages</q>, <q>types</q>, <q>constructors</q>, <q>methods</q>, <q>fields</q>
|
||||||
|
or the default, <q>all</q>.</td>
|
||||||
|
<td>No; defaults to <q>all</q></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dir</td>
|
||||||
|
<td>If this attribute is specified, this element will behave as an
|
||||||
|
implicit <a href="../Types/fileset.html">fileset</a>. The files included by this fileset
|
||||||
|
should contain each tag definition on a separate line, as described in
|
||||||
|
the <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html#javadoctags"
|
||||||
|
target="_top">Javadoc reference guide</a>:
|
||||||
|
<pre>ejb.bean:t:XDoclet EJB Tag
|
||||||
|
todo:a:To Do</pre>
|
||||||
|
<strong>Note</strong>: The Javadoc reference quide has double quotes around the description
|
||||||
|
part of the definition. This will not work when used in a file, as the definition is quoted
|
||||||
|
again when given to the <kbd>javadoc</kbd> program.<br/>
|
||||||
|
<strong>Note</strong>: If this attribute is specified, all the other attributes in this
|
||||||
|
element will be ignored.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4 id="tagletelement">taglet</h4>
|
||||||
|
<p>The taglet nested element is used to specify
|
||||||
|
custom <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/taglet/overview.html"
|
||||||
|
target="_top">taglets</a>
|
||||||
|
beyond <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html#javadoctags"
|
||||||
|
target="_top">the default taglets</a>.</p>
|
||||||
|
|
||||||
|
<h5>Parameters</h5>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>name</td>
|
||||||
|
<td>The name of the taglet class
|
||||||
|
(e.g. <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/taglet/ToDoTaglet.java"
|
||||||
|
target="_top"><code>com.sun.tools.doclets.ToDoTaglet</code></a>)</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>path</td>
|
||||||
|
<td>A path specifying the search path for the taglet class (e.g. <samp>/home/taglets</samp>).
|
||||||
|
The path may also be specified by a nested <code><path></code> element</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>sourcepath, classpath, bootclasspath, modulepath, modulesourcepath</h4>
|
||||||
|
<p><code>Javadoc</code>'s <i>sourcepath</i>, <i>classpath</i>,
|
||||||
|
<i>bootclasspath</i>, <i>modulepath</i>, and <i>modulesourcepath</i>
|
||||||
|
attributes are <a href="../using.html#path">PATH like structure</a>
|
||||||
|
and can also be set via nested <i>sourcepath</i>,
|
||||||
|
<i>classpath</i>, <i>bootclasspath</i>, <i>modulepath</i>,
|
||||||
|
and <i>modulesourcepath</i> elements respectively.</p>
|
||||||
|
|
||||||
|
<h4>arg</h4>
|
||||||
|
<p><em>Since Ant 1.6</em></p>
|
||||||
|
<p>Use nested <code><arg></code> to specify additional arguments.
|
||||||
|
See <a href="../using.html#arg">Command line arguments</a>.</p>
|
||||||
|
|
||||||
|
<h3>Example</h3>
|
||||||
|
<pre>
|
||||||
|
<javadoc packagenames="com.dummy.test.*"
|
||||||
|
sourcepath="src"
|
||||||
|
excludepackagenames="com.dummy.test.doc-files.*"
|
||||||
|
defaultexcludes="yes"
|
||||||
|
destdir="docs/api"
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
use="true"
|
||||||
|
windowtitle="Test API">
|
||||||
|
<doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
|
||||||
|
<bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
|
||||||
|
<tag name="todo" scope="all" description="To do:"/>
|
||||||
|
<group title="Group 1 Packages" packages="com.dummy.test.a*"/>
|
||||||
|
<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
|
||||||
|
<link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
|
||||||
|
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
|
</javadoc></pre>
|
||||||
|
|
||||||
|
<p>is the same as</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<javadoc destdir="docs/api"
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
use="true"
|
||||||
|
windowtitle="Test API">
|
||||||
|
|
||||||
|
<packageset dir="src" defaultexcludes="yes">
|
||||||
|
<include name="com/dummy/test/**"/>
|
||||||
|
<exclude name="com/dummy/test/doc-files/**"/>
|
||||||
|
</packageset>
|
||||||
|
|
||||||
|
<doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
|
||||||
|
<bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
|
||||||
|
<tag name="todo" scope="all" description="To do:"/>
|
||||||
|
<group title="Group 1 Packages" packages="com.dummy.test.a*"/>
|
||||||
|
<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
|
||||||
|
<link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
|
||||||
|
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
|
</javadoc></pre>
|
||||||
|
|
||||||
|
<p>or</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<javadoc destdir="docs/api"
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
use="true"
|
||||||
|
windowtitle="Test API">
|
||||||
|
|
||||||
|
<fileset dir="src" defaultexcludes="yes">
|
||||||
|
<include name="com/dummy/test/**"/>
|
||||||
|
<exclude name="com/dummy/test/doc-files/**"/>
|
||||||
|
</fileset>
|
||||||
|
|
||||||
|
<doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
|
||||||
|
<bottom><![CDATA[<i>Copyright &#169; 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
|
||||||
|
<tag name="todo" scope="all" description="To do:"/>
|
||||||
|
<group title="Group 1 Packages" packages="com.dummy.test.a*"/>
|
||||||
|
<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
|
||||||
|
<link offline="true" href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="C:\tmp"/>
|
||||||
|
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
|
||||||
|
</javadoc></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,243 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
||||||
|
<title>Javah Task</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2 id="javah">Javah</h2>
|
||||||
|
<h3>Description</h3>
|
||||||
|
<p>Generates JNI headers from a Java class.</p>
|
||||||
|
<p>When this task executes, it will generate the C header and source files that are needed to
|
||||||
|
implement native methods.
|
||||||
|
|
||||||
|
<p>If you are building with Java 8 or above consider
|
||||||
|
using <a href="javac.html"><code>javac</code></a>'s <var>nativeheaderdir</var> attribute instead
|
||||||
|
which allows you to compile the classes and generate the native header files in a single step.</p>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: <code>javah</code> has been deprecated in Java 9 and removed in Java
|
||||||
|
10. Attempts to use it with Java 10 will fail.</p>
|
||||||
|
|
||||||
|
<p id="implementationvalues">It is possible to use different compilers. This can be selected with
|
||||||
|
the <var>implementation</var> attribute or a nested element. Here are the choices of the
|
||||||
|
attribute:</p>
|
||||||
|
<ul>
|
||||||
|
<li><q>default</q>—the default compiler for the platform.</li>
|
||||||
|
<li><q>sun</q>—the standard compiler of the JDK.</li>
|
||||||
|
<li><q>kaffeh</q>—the native standard compiler of <a href="https://github.com/kaffe/kaffe"
|
||||||
|
target="_top">Kaffe</a>.</li>
|
||||||
|
<li><q>gcjh</q>—the native standard compiler
|
||||||
|
of <a href="https://gcc.gnu.org/gcc-7/changes.html#java" target="_top">gcj and
|
||||||
|
gij</a>. <em>Since Apache Ant 1.8.2</em></li>
|
||||||
|
<li><q>forking</q>—runs the <kbd>javah</kbd> executable via its command line interface in
|
||||||
|
a separate process. Default when not running on Kaffe or gcj/gij <em>since Ant 1.9.8</em></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><strong>Note</strong>: if you are using this task to work on multiple files the command line may
|
||||||
|
become too long on some operating systems. Unfortunately the <kbd>javah</kbd> command doesn't
|
||||||
|
support command argument files the way <kbd>javac</kbd> (for example) does, so all that can be
|
||||||
|
done is breaking the amount of classes to compile into smaller chunks.</p>
|
||||||
|
|
||||||
|
<h3>Parameters</h3>
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>class</td>
|
||||||
|
<td>the fully-qualified name of the class (or classes, separated by commas)</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>outputFile</td>
|
||||||
|
<td>concatenates the resulting header or source files for all the classes listed into this
|
||||||
|
file</td>
|
||||||
|
<td rowspan="2">Exactly one of the two</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>destdir</td>
|
||||||
|
<td class="left">sets the directory where <kbd>javah</kbd> saves the header files or the stub
|
||||||
|
files.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>force</td>
|
||||||
|
<td>specifies that output files should always be written
|
||||||
|
(only when using an external javah of JDK 1.2)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>old</td>
|
||||||
|
<td>specifies that old JDK 1.0-style header files should be generated (otherwise output file
|
||||||
|
contain JNI-style native method function prototypes)
|
||||||
|
(only when using an external javah of JDK 1.2)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>stubs</td>
|
||||||
|
<td>generate C declarations from the Java object file (used with <var>old</var>)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>verbose</td>
|
||||||
|
<td>causes <kbd>javah</kbd> to print a message concerning the status of the generated files</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classpath</td>
|
||||||
|
<td>the classpath to use</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bootclasspath</td>
|
||||||
|
<td>location of bootstrap class files</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>extdirs</td>
|
||||||
|
<td>location of installed extensions</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>implementation</td>
|
||||||
|
<td>The compiler implementation to use. (See the above <a href="#implementationvalues">list</a>
|
||||||
|
of valid compilers.)</td>
|
||||||
|
<td>No; defaults to default compiler for the current JDK</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Parameters specified as nested elements</h3>
|
||||||
|
|
||||||
|
<h4>arg</h4>
|
||||||
|
|
||||||
|
<p>You can specify additional command line arguments for the compiler with
|
||||||
|
nested <code><arg></code> elements. These elements are specified
|
||||||
|
like <a href="../using.html#arg">Command-line Arguments</a> but have an additional attribute that
|
||||||
|
can be used to enable arguments only if a given compiler implementation will be used.</p>
|
||||||
|
|
||||||
|
<table class="attr">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Attribute</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
<th scope="col">Required</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>value</td>
|
||||||
|
<td rowspan="4">See <a href="../using.html#arg">Command-line Arguments</a>.</td>
|
||||||
|
<td rowspan="4">Exactly one of these</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">line</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="var">path</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prefix</td>
|
||||||
|
<td rowspan="2">See <a href="../using.html#arg">Command-line Arguments</a>. <em>Since Ant
|
||||||
|
1.8</em>.</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>suffix</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>implementation</td>
|
||||||
|
<td>Only pass the specified argument if the chosen compiler implementation matches the value of
|
||||||
|
this attribute. Legal values are the same as those in the
|
||||||
|
above <a href="#implementationvalues">list</a> of valid compilers.)</td>
|
||||||
|
<td>No</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>implementationclasspath</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>A <a href="../using.html#path">path-like structure</a> holding the classpath to use when loading
|
||||||
|
the compiler implementation if a custom class has been specified. Doesn't have any effect when
|
||||||
|
using one of the built-in compilers.</p>
|
||||||
|
|
||||||
|
<h4>Any nested element of a type that implements JavahAdapter</h4>
|
||||||
|
<p><em>Since Ant 1.8.0</em></p>
|
||||||
|
<p>If a defined type implements the <code class="code">JavahAdapter</code> interface a nested
|
||||||
|
element of that type can be used as an alternative to the <var>implementation</var> attribute.</p>
|
||||||
|
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<p>Make a JNI header of the named class, using the JDK 1.2 JNI model. Assuming the
|
||||||
|
directory <samp>c</samp> already exists, the file <samp>org_foo_bar_Wibble.h</samp> is created
|
||||||
|
there. If this file already exists, it is left unchanged.</p>
|
||||||
|
<pre><javah destdir="c" class="org.foo.bar.Wibble"/></pre>
|
||||||
|
|
||||||
|
<p>This is similar to the previous example, except the output is written to a file
|
||||||
|
called <samp>wibble.h</samp> in the current directory.</p>
|
||||||
|
<pre>
|
||||||
|
<javah outputFile="wibble.h">
|
||||||
|
<class name="org.foo.bar.Wibble,org.foo.bar.Bobble"/>
|
||||||
|
</javah></pre>
|
||||||
|
|
||||||
|
<p>Write three header files, one for each of the classes named. Because the <var>force</var> option
|
||||||
|
is set, these header files are always written when the <code>Javah</code> task is invoked, even if
|
||||||
|
they already exist.</p>
|
||||||
|
<pre>
|
||||||
|
<javah destdir="c" force="yes">
|
||||||
|
<class name="org.foo.bar.Wibble"/>
|
||||||
|
<class name="org.foo.bar.Bobble"/>
|
||||||
|
<class name="org.foo.bar.Tribble"/>
|
||||||
|
</javah></pre>
|
||||||
|
|
||||||
|
<p>Write the headers for the three classes using the 'old' JNI format, then write the
|
||||||
|
corresponding <samp>.c</samp> stubs. The <var>verbose</var> option will cause <code>Javah</code> to
|
||||||
|
describe its progress.</p>
|
||||||
|
<pre>
|
||||||
|
<javah destdir="c" verbose="yes" old="yes" force="yes">
|
||||||
|
<class name="org.foo.bar.Wibble"/>
|
||||||
|
<class name="org.foo.bar.Bobble"/>
|
||||||
|
<class name="org.foo.bar.Tribble"/>
|
||||||
|
</javah>
|
||||||
|
<javah destdir="c" verbose="yes" stubs="yes" old="yes" force="yes">
|
||||||
|
<class name="org.foo.bar.Wibble"/>
|
||||||
|
<class name="org.foo.bar.Bobble"/>
|
||||||
|
<class name="org.foo.bar.Tribble"/>
|
||||||
|
</javah></pre>
|
||||||
|
|
||||||
|
<p>If you want to use a
|
||||||
|
custom <code class="code">JavahAdapter</code> <code>org.example.MyAdapter</code> you can either use
|
||||||
|
the <var>implementation</var> attribute:</p>
|
||||||
|
<pre>
|
||||||
|
<javah destdir="c" class="org.foo.bar.Wibble"
|
||||||
|
implementation="org.example.MyAdapter"/></pre>
|
||||||
|
<p>or a define a type and nest this into the task like in:</p>
|
||||||
|
<pre>
|
||||||
|
<componentdef classname="org.example.MyAdapter"
|
||||||
|
name="myadapter"/>
|
||||||
|
<javah destdir="c" class="org.foo.bar.Wibble">
|
||||||
|
<myadapter/>
|
||||||
|
</javah></pre>
|
||||||
|
<p>in which case your <code>javah</code> adapter can support attributes and nested elements of its
|
||||||
|
own.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue