From 0c66c5a55079310a1808534b65d5031ce68d2d72 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Tue, 7 Aug 2001 13:49:49 +0000 Subject: [PATCH] Move xdocs to top level git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269494 13f79535-47bb-0310-9956-ffa450edef68 --- xdocs/antnews.xml | 101 ++++++ xdocs/external.xml | 351 ++++++++++++++++++++ xdocs/faq.xml | 581 +++++++++++++++++++++++++++++++++ xdocs/index.xml | 115 +++++++ xdocs/logos.xml | 174 ++++++++++ xdocs/problems.xml | 164 ++++++++++ xdocs/resources.xml | 257 +++++++++++++++ xdocs/stylesheets/faq.vsl | 118 +++++++ xdocs/stylesheets/project.xml | 50 +++ xdocs/stylesheets/site.vsl | 81 +++++ xdocs/stylesheets/templates.vm | 196 +++++++++++ xdocs/velocity.properties | 2 + 12 files changed, 2190 insertions(+) create mode 100644 xdocs/antnews.xml create mode 100644 xdocs/external.xml create mode 100644 xdocs/faq.xml create mode 100644 xdocs/index.xml create mode 100644 xdocs/logos.xml create mode 100644 xdocs/problems.xml create mode 100644 xdocs/resources.xml create mode 100644 xdocs/stylesheets/faq.vsl create mode 100644 xdocs/stylesheets/project.xml create mode 100644 xdocs/stylesheets/site.vsl create mode 100644 xdocs/stylesheets/templates.vm create mode 100644 xdocs/velocity.properties diff --git a/xdocs/antnews.xml b/xdocs/antnews.xml new file mode 100644 index 000000000..92a90c92e --- /dev/null +++ b/xdocs/antnews.xml @@ -0,0 +1,101 @@ + + + + + Conor MacNeill + Stefan Bodewig + Ant News + + + + +
+

Ant still doesn't have a Logo, but it sure deserves one. We've + put together a page with proposed + logos, please take a look at them and tell us what you + think. If you have a nice logo idea yourself, just submit it to + the mailing lists.

+
+ +
+

A commented version of the collected user requirements is now + available here - it is not + complete as some details still have to be defined, but it should + give you an idea of what Ant2 is going to look like.

+ +

Several details can only be decided in the light of real code + and prototypes. Several people are working on prototypes (that + can be found in Ant's CVS module in the proposals directory) and + discussion is going on on the Ant-Dev mailing list.

+
+ +
+

Sun has released an introductory article on Ant on their + Dot-Com Builder site on May 30 2001. See http://dcb.sun.com/practices/profiles/ant.jsp

+
+ +
+

Ant has been in use for quite some time and has been used in ways never conceived when it + was originally written. While Ant 1.x has continued to sucessfully evolve and grow, there + are a number of limitations and inconsistencies that are now apparent and which need to + be addressed. +

+ +

+ As we continue to evolve and enhance Ant 1.x, it is now time to define what Ant 2.0 will + encompass. Ant 2.0 will be a major rearchitecting of Ant. It has a number of goals including: +

    +
  • Define the "contract" with build file writers to which Ant will be bound.
  • +
  • Define the "contract" between the Ant core and Task writers.
  • +
  • Make Ant more easily extendable by allowing additional tasks to be "dropped" in.
  • +
  • Allow Ant to function as a component to simplify integration with GUIs and IDEs.
  • +
  • Make Ant more regular and logical.
  • +
+ + It is expected that Ant 2.0 will break Ant 1.x based build files. The intention is to + make this the last time that will happen. +

+ +

+ To advance the definition of Ant, user requirements are now being accepted on the + Ant-Dev mailing list. Any requirement will be accepted for consideration. The + requirements are being collected into a document which is available + on-line. New features will be excepted + until March 21st, 2001. At that time, each requirement will be discussed + for inclusion in an Ant 2.0 requirement document. +

+ +

+ For your reference some of the goals which have shaped the development of Ant 1.x are + available here. These continue to be + relevant to Ant 2.0. +

+ +

+ If you want to shape the future of Ant, join the + Ant-Dev mailing list and contribute + your ideas. +

+
+ +
+ +

+ Ant 1.3 has been released after going through three betas. Thanks to everyone who + took the time to test the beta and report bugs and enhancements. +

+ +

You can download the release from + here. + Both source and binary releases are available in zip, tarball and RPM formats. +

+

Please report all bugs using the + Apache Bugzilla +

+ +
+ + +
+ diff --git a/xdocs/external.xml b/xdocs/external.xml new file mode 100644 index 000000000..a13957027 --- /dev/null +++ b/xdocs/external.xml @@ -0,0 +1,351 @@ + + + + + Stefan Bodewig + External Tools and Tasks + + + + +
+ +

This page lists external resources for Ant: tasks, IDE + integration tools, loggers, you name it. If you've written + something that should be included, please post all relevant + information to one of the mailing lists.

+ +

Nothing listed here is directly supported by the Ant + developers, if you encounter any problems with them, please use + the contact information.

+ +
+ +
+ + +

AspectJ is an + aspect-oriented extension to Java. This task compiles a + source tree using the AspectJ compiler -- AJC.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.3
URL:http://aspectj.org/dl
Contact:support@aspectj.org
License:Apache Software License
+
+ + + +

Actually, Anakia is more than just an Ant task, it is a an + XML transformation tool based on JDOM, Velocity and Ant.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://jakarta.apache.org/velocity/anakia.html
Contact:Velocity mailing lists
License:Apache Software License
+
+ + + +

Checkstyle is a development tool to help programmers write + Java code that adheres to a coding standard. Its purpose is to + automate the process of checking Java code, and to spare + humans of this boring (but important) task.

+ +

Checkstyle can be run via an ANT task or a command line + utility.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://www.puppycrawl.com/checkstyle
Contact:Oliver Burn
License:GNU General Public License
+
+ + + +

Recursive build support (call ant on every package level, + and only build files in that package or in that package and + everything below) with seperation of source and output.

+ +

The task generates build files in any subdirectory (except + for CVS-directories) for you. Only place one build.xml file in + the top and call target 'setup' or + 'rescan'.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://www.dsdelft.nl/~lemval/ant/
Contact:M.J.P. van Leeuwen
License:License derived from Apache Software License
+
+ + + +

There are two different sets of tasks to help build Java 2 Platform, Micro + Edition (J2ME) applications.

+ +

This set supports CLDC and the K Virtual Machine (KVM):

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.3
URL:http://www.dribin.org/dave/j2me_ant/
Contact:Dave Dribin
License:Apache Software License
+ +

And this set works with the J2ME Wireless Toolkit and MIDP + for PalmOS:

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.3
URL:http://www.stampysoft.com/ant/
Contact:Josh Eckels
License:MIT License
+ +
+ + + +

TiniAnt is an Ant task to support building applications for + the TINI.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://tiniant.sourceforge.net/
Contact:Sean Kelly
License:BSD-like license
+
+ + + +

Venus Application Publisher's (Vamp) Ant Task Suite allows + you to sign and package your applications into relocatable Web + Archives that you can drop into your web server for + single-click launching using Java Web Start or into single + Java Archive installers that serve up their content through a + built-in, multi-threaded, ultra light-weight web server.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://www.geocities.com/vamp201/ant.html
Contact:Gerald Bauer
License:GNU General Public License
+
+ +
+ +
+ + + +

An OpenTool that integrates Ant into the JBuilder IDE.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://www.dieter-bogdoll.de/java/AntRunner/
Contact:Dieter Bogdoll
License:GNU General Public License
+
+ + + +

A plugin that integrates Ant into the Jext editor.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:ftp://jext.sourceforge.net/pub/jext/plugins/AntWork.zip
Contact:Klaus Hartlage
License:GNU General Public License
+
+ + + +

A module that integrates Ant into the NetBeans or Forte for Java IDEs.

+ + + + + + + + + + + + + + + + + + +
Compatibility:bundles Ant 1.3
URL:http://ant.netbeans.org/
Contact:nbdev@netbeans.org
License:Sun Public License
+
+
+ +
+ +

CruiseControl is a tool for setting up a continuous build + process. CruiseControl provides an Ant wrapper and a set of + tasks to automate the checkout/build/test cycle. CruiseControl + also comes bundled with a servlet for viewing the status of + the current build, as well as previous build results.

+ + + + + + + + + + + + + + + + + + +
Compatibility:Ant 1.2 and 1.3
URL:http://cruisecontrol.sourceforge.net/
Contact:Project Mailing Lists and Administrators
License:Release 1.0 has been licensed under the GNU General Public + License. Starting with release 1.1 the license has been + changed to a BSD-like license.
+
+
+ + +
\ No newline at end of file diff --git a/xdocs/faq.xml b/xdocs/faq.xml new file mode 100644 index 000000000..932b30aeb --- /dev/null +++ b/xdocs/faq.xml @@ -0,0 +1,581 @@ + + + + + Stefan Bodewig + Frequently Asked Questions + + + + + What is Ant? + +

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 do you call it Ant? + + +

According to Ant's original author James Duncan + Davidson, the name is an acronym for "Another Neat + Tool".

+ +

Later explanations go along the lines of "Ants are + doing an extremely good job at building things" or + "Ants are very small and can carry a weight a dozen times + of their own" - describing what Ant is intended to + be.

+
+
+ + + Tell us a little bit about Ant's history. + + +

Initially Ant was part of the Tomcat code base when it was + donated to the Apache Software Foundation - it has been + created by James Duncan Davidson, who also is the original + author of Tomcat. Ant was there to build Tomcat, nothing + else.

+ +

Soon thereafter several open source Java projects realized + that Ant could solve the problems they had with makefiles. + Starting with the projects hosted at Jakarta and the old Java + Apache project, Ant spread like a virus and now is the build + tool of choice for a lot of projects.

+ +

In January 2000 Ant was moved to a separate CVS module and + was promoted to a project of its own, independent of + Tomcat.

+ +

The first version of Ant that was exposed a lager audience + was the one that shipped with Tomcat's 3.1 release on 19 April + 2000. This version has later been referenced to as Ant + 0.3.1.

+ +

The first official release of Ant as a stand alone product was + Ant 1.1 released on 19 July 2000. The complete release + history:

+ + + + + + + + + + + + + + + + + + + + + +
Ant VersionRelease Date
1.119 July 2000
1.224 October 2000
1.33 March 2001
+
+
+ +
+ + + + I get checksum errors when I try to extract the + tar.gz distribution file. Why? + +

Ant's distribution contains file names that are longer + than 100 characters, which is not supported by the standard + tar file format. Several different implementations of tar use + different and incompatible ways to work around this + restriction.

+ +

Ant's <tar> task can create tar archives that use + the GNU tar extension, and this has been used when putting + together the distribution. If you are using a different + version of tar (for example, the one shipping with Solaris), + you cannot use it to extract the archive.

+ +

The solution is to either install GNU tar, which can be + found here + or use the zip archive instead (you can extract it using + jar xf).

+
+
+
+ + + + Why does Ant always recompile all my Java files? + + +

In order to find out which files should be compiled, Ant + compares the timestamps of the source files to those of the + resulting .class files. Opening all source files + to find out which package they belong to would be very + inefficient - instead of this, Ant expects you to place your + source files in a directory hierarchy that mirrors your + package hierarchy and to point Ant to the root of this + directory tree with the srcdir attribute.

+ +

Say you have <javac srcdir="src" + destdir="dest" />. If Ant finds a file + src/a/b/C.java it expects it to be in package + a.b so that the resulting .class + file is going to be dest/a/b/C.class.

+ +

If your setup is different, Ant's heuristic won't work and + it will recompile classes that are up to date. Ant is not the + only tool, that expects a source tree layout like this.

+ +
+
+ + + How do I pass parameters from the command line to my + build file? + + +

Use properties: ant + -D<name>=<value> lets you define values for + properties. These can then be used within your build file as + any normal property: ${<name>} will put in + <value>.

+ +
+
+ + + How can I use Jikes specific command line + switches? + + + +

A couple of switches are supported via magic + properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
switchpropertydefault
+Ebuild.compiler.emacsfalse == not set
-nowarnbuild.compiler.warningstrue == not set
+Pbuild.compiler.pedanticfalse == not set
+Fbuild.compiler.fulldependfalse == not set
+ +
+
+ + + How do I include a < character in my command line arguments? + +

The short answer is "Use &lt;".

+ +

The long answer is, that this probably won't do what you + want anyway, see the next + section.

+
+
+ + + How do I redirect standard input or standard output + in the <exec> task? + +

Say you want to redirect the standard input stream of the + cat command to read from a file, something + like

+ + cat < foo +]]> + +

and try to translate it into

+ + + + + +]]> + +

This will not do what you expect. The input-redirection is + performed by your shell, not the command itself, so this + should read:

+ + + + + +]]> + +

Note, that you must use the value attribute of + <arg> in the last element.

+ +
+
+ +
+ + + + Is Ant supported by my IDE/Editor? + +

See the section + on IDE integration on our external tools page.

+
+
+ + + Why doesn't (X)Emacs/vi/MacOS X's project builder + parse the error messages generated by Ant correctly? + + +

Ant adds a "banner" with the name of the current + task in front of all messages - and there are no built-in + regular expressions in your Editor that would account for + this.

+ +

You can disable this banner by invoking Ant with the + -emacs switch. Alternatively you can add the + following snippet to your .emacs to make Emacs + understand Ant's output.

+ + + +

Yet another alternative that preserves most of Ant's + formatting is to pipe Ant's output through the following Perl + script by Dirk-Willem van Gulik:

+ + ) { + if (s/^(\s+)\[(\w+)\]//) { + if ($2 ne $last) { + print "$1\[$2\]"; + $s = ' ' x length($2); + } else { + print "$1 $s "; + }; + $last = $2; + }; + print; +}; +]]> + +
+
+
+ + + + Is there a DTD that I can use to validate my build + files? + + + +

An incomplete DTD can be created by the + <antstructure> task - but this one + has a few problems:

+ +
    +
  • It doesn't know about required attributes. Only + manual tweaking of this file can help here.
  • + +
  • It is not complete - if you add new tasks via + <taskdef> it won't know about it. See + this + page by Michel Casabianca for a solution to this + problem. Note that the DTD you can download at this page + is based on Ant 0.3.1.
  • + +
  • It may even be an invalid DTD. As Ant allows tasks + writers to define arbitrary elements, name collisions will + happen quite frequently - if your version of Ant contains + the optional <test> and + <junit> tasks, there are two XML + elements named test (the task and the nested child element + of <junit>) with different attribute + lists. This problem cannot be solved, DTDs don't give a + syntax rich enough to support this.
  • +
+
+
+ + + How do I include an XML snippet in my build file? + +

You can use XML's way of including external files and let + the parser do the job for Ant:

+ + + + +]> + + + + + ... + + + &common; + + ... + + +]]> + +

will literally include the contents of common.xml where + you've placed the &common; entity.

+ +

In combination with a DTD, this would look like this:

+ + +]> +]]> +
+
+ + + How do I send an email with the result of my build + process? + + + +

You can use a custom BuildListener, that sends out an email + in the buildFinished() method. Will Glozer + <will.glozer@jda.com> has written such a listener based + on JavaMail, + the source is

+ + + +

With a monitor.properties like this

+ + +mail.from=Will Glozer + +build.log=build.log + +build.failed.notify=true +build.failed.email.to=will.glozer@jda.com +build.failed.email.subject=Nightly build failed! + +build.succeeded.notify=true +build.succeeded.email.to=will.glozer@jda.com +build.succeeded.email.subject=Nightly build succeeded! +]]> + +

monitor.properties should be placed right next + to your compiled BuildMonitor.class. To use it, + invoke Ant like

+ + + +

Make sure that mail.jar from JavaMail and + activation.jar from the + Java + Beans Activation Framework in your CLASSPATH.

+ +
+
+ +
+ + + + <chmod> or <exec> don't work in Ant + 1.3 on Unix + + +

The antRun script in ANT_HOME/bin + has DOS instead of Unix line endings, you must remove the + carriage return characters from this file. This can be done by + using Ant's <fixcrlf> task or something like:

+ + /tmp/foo +mv /tmp/foo $ANT_HOME/bin/antRun +]]> +
+
+ + + JavaDoc failed: java.io.IOException: javadoc: cannot execute + +

There is a bug in the Solaris reference implementation of + the JDK, see http://developer.java.sun.com/developer/bugParade/bugs/4230399.html. + This also appears to be true under Linux, moving the JDK to + the front of the PATH fixes the problem.

+
+
+
+ +
diff --git a/xdocs/index.xml b/xdocs/index.xml new file mode 100644 index 000000000..7bfc2d852 --- /dev/null +++ b/xdocs/index.xml @@ -0,0 +1,115 @@ + + + + + Conor MacNeill + Stefan Bodewig + Ant + + + + +
+ +

+Ant is a Java based build tool. In theory it is kind of like make without +make's wrinkles. +

+ +

+Why another build tool when there is already make, gnumake, nmake, jam, and +others? Because all of those tools have limitations that Ant's 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 of 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. +

+ +
+ +
+ +

+You can view the documentation for the most recent release +online +

+ +

+Comprehensive documentation is included in the source and binary distribtions. +

+ +
+ +
+

+ You can download the latest release: +

+ +
+ +
+

+ If you wish to use the latest Ant features, you can try downloading a nightly + build from here +

+ +
+ +
+

+ We are currently hashing out design details for Ant2. Please + read the latest Ant news for more details. +

+
+ +
+ + + + +
+ + +
+ diff --git a/xdocs/logos.xml b/xdocs/logos.xml new file mode 100644 index 000000000..7c1816c4f --- /dev/null +++ b/xdocs/logos.xml @@ -0,0 +1,174 @@ + + + + + Stefan Bodewig + Ant Logo Proposals + + + + +
+

One of the requirements for Ant2 is, that Ant should have a + logo. You can find the logos that have been proposed to the Ant + mailing lists on this page.

+ +

Tell us what you think of them (yes, Powered by should + better be Built by).

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Author
Bill J. Fellows (Bill.J.Fellows at mail.sprint.com)
Bill J. Fellows (Bill.J.Fellows at mail.sprint.com)
Christoph Wilhelms (Christoph.Wilhelms at t-online.de)
Christoph Wilhelms (Christoph.Wilhelms at t-online.de)
Warner Onstine (warner at warneronstine.com)
Chris Coleman (chris.coleman at csfb.com)
Stefan Lecho (Stefan.Lecho at iconmedialab.com)
David Trogdon (DTrogdon at orgtek.com)
Mirko Klemm (Mirko.Klemm at t-online.de)
Ryan P Ripley (ryan.ripley at bms.com)
Christoph Wilhelms (Christoph.Wilhelms at t-online.de)
Shane Petroff (shane at hayward.ca)
Jim Cheesman (jchees at msl.es)
Kevin Duggins (Kevin.Duggins at definityhealth.com)
Kevin Duggins (Kevin.Duggins at definityhealth.com)
Justin Ransom (Justin.Ransom at rubus.com)
Justin Ransom (Justin.Ransom at rubus.com)
Martin Schlömer (martin.schloemer at phase26.de)
Martin Schlömer (martin.schloemer at phase26.de)
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Design Services Team at Hewlett Packard (blair_hughes at hp.com>
Alicia Kolesnikova
+
+ +
\ No newline at end of file diff --git a/xdocs/problems.xml b/xdocs/problems.xml new file mode 100644 index 000000000..34a4897dd --- /dev/null +++ b/xdocs/problems.xml @@ -0,0 +1,164 @@ + + + + + Conor MacNeill + Having Problems? + + + +
+

If you are having problems with Ant, this page details some steps you can take + to try and resolve the problem. If you can't resolve the problem then this page will help + you collect some of the relevant information to provide a bug report. This information will help + the Ant developers understand and resolve the problem. Of course, not all of the steps here will + make sense for every problem you encounter. These are just some suggestions to + point you in the right direction. +

+ + +

The first step to take when you have a problem is to read the + manual entry for the task or concept that is giving you trouble. Check particularly the meaning of + attributes and nested elements. Perhaps an attribute would provide the behavior you require. If you + have problems with the manual, then you can submit a documentation bug report (see below) to help us + improve the Ant documentation. +

+
+ +

The first step when you have a problem is to see what Ant is doing. Try running Ant with + The verbose flag

+ ant -verbose

+ or

+ ant -v

+ + This will produce something which starts like the following:

+ +Ant version 1.4alpha compiled on August 6 2001 +Buildfile: build.xml +Detected Java version: 1.3 in: f:\jdk1.3\jre +Detected OS: Windows NT +parsing buildfile \jakarta-ant\build.xml with +URI = file:/jakarta-ant/build.xml +Project base dir set to: \jakarta-ant + [property] Loading \jakarta-ant\.ant.properties + [property] Unable to find property file: \jakarta-ant\.ant.properties + [property] Loading \conor\.ant.properties + [property] Override ignored for debug + +prepare: + +check_for_optional_packages: +... + +

+ You may be able to see in this trace what ant is doing and why it takes a particular + course of action. If you need even more information you can use the -debug + flag rather than -verbose. This will generally produce so much output that + you may want to save the output and analyze it in an editor. +

+ +

So, once you have all this debug information, how can you use it to solve your problem. + That will depend on the task in question and the nature of your problem. Each task logs + different aspects of its operation, but it will give you an idea of what is going on. For + example, the <javac> task logs the reasons why it chooses to compile particular + classes and the equivalent command it is using. The following trace (which has been edited + and reformatted for clarity) shows javac adding one class but skipping another. This is followed + by the compiler arguments and a summary of all the classes to be compiled. +

+ + [javac] org\apache\tools\ant\listener\Log4jListener.java added as + \build\classes\org\apache\tools\ant\listener\Log4jListener.class + is outdated. + [javac] org\apache\tools\ant\Location.java omitted as + \build\classes\org\apache\tools\ant\Location.class is up to date. + ... + [javac] Compiling 1 source file to \jakarta-ant\build\classes + [javac] Using modern compiler + [javac] Compilation args: -d \jakarta-ant\build\classes -classpath + \jakarta-ant\build\classes;F:\jdk1.3\lib\tools.jar; + \Ant\lib\optional.jar;\Ant\lib\log4j.jar; + \Ant\lib\junit.jar;\Ant\lib\jaxp.jar; + \Ant\lib\crimson.jar;\Ant\lib\ant.jar + -sourcepath \jakarta-ant\src\main -g:none -O + [javac] File to be compiled: + \src\main\org\apache\tools\ant\listener\Log4jListener.java + + +

+ In many cases Ant tasks are wrappers around OS commands or other java classes. In debug mode, many + of these tasks will print out the equivalent command line, as the <javac> task above does. If + you are having a problem, it is often useful to run the command directly in the same way Ant is doing + and see if the problem persists. The problem may lie in the command being run by Ant, or in the way + the Ant task is running the command. You can also see the effect of changing attribute values on the + generated command line. This can help you to understand whether you are using the correct attributes + and values. +

+
+ + +

+ After examining the debug output, you still believe that the problem you are having may be caused by Ant. + Chances are that someone else may have already encountered this problem and perhaps it has been + fixed. The next step, therefore, may be to try a nightly build of Ant to see if the + problem has been fixed. Nightly builds for Ant are available from the + Jakarta web site. While Ant nightly + builds are typically quite stable and are used by + Gump to build many other Jakarta projects, these builds should be treated as experimental. You can + install and verify whether your problem has been fixed. Note that nightly builds do not build many of the + optional tasks the come with Ant. A snapshot of these optional tasks is occasionally uploaded to the nightly + download area. Note that even + this snapshot does not contain every optional task. +

+
+ + +

+ If the current nightly build doesn't resolve your problem, it is possible that someone else has reported + the issue. It is time to look at the Apache Bug Database. + This system is easy to use and it will let you search the currently open and resolved bugs to see if your + problem has already been reported. If it has, you can see whether any of the developers have commented, + suggesting workarounds or the reason for the bug, etc. You may have more information to add (see about + creating bug reports below), in which case, go right ahead and add it. If you can't add more information + you may just want to vote for this bug, and perhaps add yourself to the CC list to follow the progress of + this bug. +

+
+ + +

By this time you may have decided that there is a bug in Ant. You have a few choices at this + point. You can send an email to the ant-user mailing list to see if others have encountered your issue + and how they may have worked around it. If after some discussion, you still feel you have a bug, it + is time to create a bug report. This is a simple operation in the Bug Database. Please try to provide + as much information as possible to assist the developers in resolving the bug. Please try to enter correct + values for the various inputs when creating the bug. Once the bug is created you can add attachments to + the bug report. +

+ +

What information should you include in your bug report? The easiest bugs to fix are those which are most + easily reproducible, so if you can, it is really helpful to produce a small test case that exhibits the + problem. In this case, you would attach the build file and other files necessary to reproduce the problem + probably packed together in an archive. If you can't produce a test case, you should try to include a + snippet from your build file and the relevant sections from the debug out from Ant. Try to include the + header information where Ant states the version, the OS and VM information etc. As the debug output is + likely to be very large, you should try to remove the output which is not relevant. Once the bug is + entered into the Bug Database, you will be kept informed about progress on the bug. If you receive email + asking for further information, please try to respond as it will aid in the resolution of your bug. +

+
+ + +

If you aren't satisfied just filing a bug report, you can try to find and fix the problem yourself. The + best way to do that is by working against the latest code from CVS. Alternatively, you can work with the + source code from the source distributions available on the Jakarta website. If you are going to tackle the + issues at this level, you may want to discuss details on the ant-dev mailing list. Once you have a fix + for the problem, you may either submit the patch to the ant-dev mailing list or enter into the Bug + Database as described above, attaching the patch. Using the Bug database has the advantage of tracking + the progress of your bug. +

+
+ + +
+ + +
diff --git a/xdocs/resources.xml b/xdocs/resources.xml new file mode 100644 index 000000000..beb399588 --- /dev/null +++ b/xdocs/resources.xml @@ -0,0 +1,257 @@ + + + + + Stefan Bodewig + Resources + + + + +
+ +

This page lists articles and presentations written about Ant. If + you've written something that should be included, please post it to one + of the mailing lists.

+ +
+ +
+ + +

This document describes strategies and some basic examples of how to + use Ant in larger team development projects.

+ + + + + + + + + + +
Author:Steve Loughran
URL:http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/ant_in_anger.html?content-type=text/html
+
+ + +

This document describes how to write custom Ant tasks, and how to submit + them to potentially be included in Ant.

+ + + + + + + + + + +
Author:Steve Loughran
URL:http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/ant_task_guidelines.html?content-type=text/html
+
+ + +

This article explores the benefits of unit testing with Ant and + JUnit, detailing how to develop automated unit tests and integrate them + into your build process.

+ + + + + + + + + + +
Author:Malcolm Davis
URL:http://www-106.ibm.com/developerworks/library/j-ant/?dwzone=java
+
+ + +

This article provides an introduction to using Ant with some basic + examples and by highlighting some of the important tasks.

+ + + + + + + + + + +
Author:Michael Cymerman
URL:http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-ant.html
+
+ + +

There is a short tutorial on how to use Ant in Cactus' + documentation. It has a slant towards build files that will be used + with Cactus.

+ + + + + + + + + + +
Author:Cactus development team
URL:http://jakarta.apache.org/commons/cactus/ant.html
+
+ + +

This article outlines how to integrate Ant into VisualAge for Java, + and how to write and debug custom tasks using the IDE and the + integrated debugger.

+ + + + + + + + + + +
Author:Glenn McAllister
URL:http://www7.software.ibm.com/vad.nsf/data/document2366?OpenDocument&p=1&BCT=1&Footer=1
+
+ + +

This article shows how you can perform command line builds with a + VisualAge for Java repository.

+ + + + + + + + + + +
Author:Glenn McAllister
URL:http://www7.software.ibm.com/vad.nsf/Data/Document4366?OpenDocument&p=1&BCT=3&Footer=1
+
+ + +

This article is from the "Best Practices" section of + Sun's Dot-Com Builder Site.

+ + + + + + + + + + +
Author:Laura Geele Wang
URL:http://dcb.sun.com/practices/profiles/ant.jsp
+
+ + +

This article is from the June 2001 issue of the Java Developer' + Journal. You need to be a registered JDJ subscriber to view this + article.

+ + + + + + + + + + +
Author:Neal Ford
URL:http://www.sys-con.com/java/archivesa.cfm?volume=06&issue=06
+
+ + +

This article describes how to use Ant to create Weblogic EJBs, and + some workarounds for issues you may encounter.

+ + + + + + + + + + +
Author:Jesse E. Tilly
URL:http://www.onjava.com/pub/a/onjava/2001/06/25/antejb.html
+
+ + +

This article is a short introduction into the basic + concepts of Ant.

+ + + + + + + + + + +
Author:Jayakrishnan Nair
URL:http://varnam.org/articles/ant.html
+
+ +
+ +
+ +

A PowerPoint presentation on Ant 1.2. It provides a basic overview + of Ant's capabilities.

+ + + + + + + + + + +
Author:Patrick Chanezon
URL:http://people.netscape.com/chanezon/tech/ant/ant_preso.ppt
+
+ + +

A detailed Ant 1.3 PowerPoint presentation, made at the St. Louis Java Users Group + meeting in March 2001. Includes a detailed build file and basic + descriptions of all the built in and optional tasks.

+ + + + + + + + + + +
Author:Mark Volkmann
URL:http://www.ociweb.com/javasig/knowledgebase/March2001/index.html
+
+ + +

This presentation is an overview of the current state of software + development today. There are a couple of slides that briefly cover + Ant.

+ + + + + + + + + + +
Author:Steve Loughran
URL:http://www.iseran.com/Steve/modern_development_processes.html
+
+
+ +
diff --git a/xdocs/stylesheets/faq.vsl b/xdocs/stylesheets/faq.vsl new file mode 100644 index 000000000..fd4c8cfa6 --- /dev/null +++ b/xdocs/stylesheets/faq.vsl @@ -0,0 +1,118 @@ + + + + + ## Defined variables + #set ($bodybg = "#ffffff") + #set ($bodyfg = "#000000") + #set ($bodylink = "#525D76") + #set ($bannerbg = "#525D76") + #set ($bannerfg = "#ffffff") + #set ($subbannerbg = "#828DA6") + #set ($subbannerfg = "#ffffff") + #set ($tablethbg = "#039acc") + #set ($tabletdbg = "#a0ddf0") + #set ($pound = "#" ) + + +#faqs() + + +## This is where the FAQ specific macro's live + +#macro (toc $section) + + + +
+ + $section.getAttributeValue("title") + +
+
+
    + #foreach ($faq in $section.getChildren("faq") ) + #subtoc ($faq) + #end +
+
+
+#end + +#macro (subtoc $faq) + #set ($id = $faq.getAttributeValue("id")) +
  • + $xmlout.outputString($faq.getChild("question"), true) +
  • +#end + +#macro (answers $section) + #foreach ($faq in $section.getChildren("faq") ) + #faq ($faq) + #end +#end + +#macro (faq $faq) + #set ($id = $faq.getAttributeValue("id")) + + + + +
    + + + $xmlout.outputString($faq.getChild("question"), true) + + +
    +
    + #foreach ($item in $faq.getChild("answer").getChildren()) + #if ($item.getName().equals("img")) + #image ($item) + #elseif ($item.getName().equals("source")) + #source ($item) + #elseif ($item.getName().equals("table")) + #table ($item) + #else + $xmlout.outputString($item) + #end + #end +
    +
    +
    +#end + +#macro (faqs) + #header() + + + +
    + + Questions + +
    +
    + #set ($allFaqSections = $root.getChildren("faqsection")) + #foreach ( $faqSection in $allFaqSections ) + #toc ($faqSection) + #end +
    +
    + + + + +
    + + Answers + +
    +
    + #foreach ( $faqSection in $allFaqSections ) + #answers ($faqSection) + #end +
    +
    + #footer() +#end diff --git a/xdocs/stylesheets/project.xml b/xdocs/stylesheets/project.xml new file mode 100644 index 000000000..e330b5e6f --- /dev/null +++ b/xdocs/stylesheets/project.xml @@ -0,0 +1,50 @@ + + + + The Jakarta Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xdocs/stylesheets/site.vsl b/xdocs/stylesheets/site.vsl new file mode 100644 index 000000000..925e8c9c8 --- /dev/null +++ b/xdocs/stylesheets/site.vsl @@ -0,0 +1,81 @@ + + + + + ## Defined variables + #set ($bodybg = "#ffffff") + #set ($bodyfg = "#000000") + #set ($bodylink = "#525D76") + #set ($bannerbg = "#525D76") + #set ($bannerfg = "#ffffff") + #set ($subbannerbg = "#828DA6") + #set ($subbannerfg = "#ffffff") + #set ($tablethbg = "#039acc") + #set ($tabletdbg = "#a0ddf0") + + +#document() + + +## This is where the common page macro's live + +#macro ( subsection $subsection) + + + +
    + + $subsection.getAttributeValue("name") + +
    +
    + #foreach ( $items in $subsection.getChildren() ) + #if ($items.getName().equals("img")) + #image ($items) + #elseif ($items.getName().equals("source")) + #source ($items) + #elseif ($items.getName().equals("table")) + #table ($items) + #else + $xmlout.outputString($items) + #end + #end +
    +
    +#end + +#macro ( section $section) + + + +
    + + $section.getAttributeValue("name") + +
    +
    + #foreach ( $items in $section.getChildren() ) + #if ($items.getName().equals("img")) + #image ($items) + #elseif ($items.getName().equals("source")) + #source ($items) + #elseif ($items.getName().equals("table")) + #table ($items) + #elseif ($items.getName().equals("subsection")) + #subsection ($items) + #else + $xmlout.outputString($items) + #end + #end +
    +
    +#end + +#macro (document) + #header() + #set ($allSections = $root.getChild("body").getChildren("section")) + #foreach ( $section in $allSections ) + #section ($section) + #end + #footer() +#end diff --git a/xdocs/stylesheets/templates.vm b/xdocs/stylesheets/templates.vm new file mode 100644 index 000000000..fdfb11b4e --- /dev/null +++ b/xdocs/stylesheets/templates.vm @@ -0,0 +1,196 @@ +## This is where the common macro's live + +#macro ( table $table) + + #foreach ( $items in $table.getChildren() ) + #if ($items.getName().equals("tr")) + #tr ($items) + #end + #end +
    +#end + +#macro ( tr $tr) + + #foreach ( $items in $tr.getChildren() ) + #if ($items.getName().equals("td")) + #td ($items) + #elseif ($items.getName().equals("th")) + #th ($items) + #end + #end + +#end + +#macro ( td $value) + #if ($value.getAttributeValue("colspan")) + #set ($colspan = $value.getAttributeValue("colspan")) + #end + #if ($value.getAttributeValue("rowspan")) + #set ($rowspan = $value.getAttributeValue("rowspan")) + #end + + + #if ($value.getText().length() != 0 || $value.hasChildren()) + $xmlout.outputString($value, true) + #else +   + #end + + +#end + +#macro ( th $value) + #if ($value.getAttributeValue("colspan")) + #set ($colspan = $value.getAttributeValue("colspan")) + #end + #if ($value.getAttributeValue("rowspan")) + #set ($rowspan = $value.getAttributeValue("rowspan")) + #end + + + #if ($value.getText().length() != 0 || $value.hasChildren()) + $xmlout.outputString($value, true) + #else +   + #end + + +#end + +#macro ( projectanchor $name $value ) + #if ($value.startsWith("http://")) + $name + #elseif ($value.startsWith("/site")) + $name + #else + $name + #end +#end + +#macro ( metaauthor $author $email ) + + +#end + +#macro ( image $value ) + #if ($value.getAttributeValue("width")) + #set ($width=$value.getAttributeValue("width")) + #end + #if ($value.getAttributeValue("height")) + #set ($height=$value.getAttributeValue("height")) + #end + #if ($value.getAttributeValue("align")) + #set ($align=$value.getAttributeValue("align")) + #end + +#end + +#macro ( source $value) +
    + + + + + + + + + + + + + + + + +
    $escape.getText($value.getText())
    +
    +#end + +#macro ( makeProject ) + #set ($menus = $project.getChild("body").getChildren("menu")) + #foreach ( $menu in $menus ) +

    $menu.getAttributeValue("name")

    + + #end +#end + +#macro (getProjectImage) + #if ($project.getChild("logo")) + + + + + #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) + #if ( $logoString.startsWith("/") ) + $project.getChild( + #else + $project.getChild( + #end + + #else + + + + #end +#end + +#macro (header) + + + + + #set ($authors = $root.getChild("properties").getChildren("author")) + #foreach ( $au in $authors ) + #metaauthor ( $au.getText() $au.getAttributeValue("email") ) + #end + + $project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText() + + + + + + + #getProjectImage() + +
    + + + + + + + + + + + + +
    +
    +
    + #makeProject() + +#end + +#macro (footer) +
    +
    +
    +
    + Copyright © 1999-2001, Apache Software Foundation +
    +
    + + +#end diff --git a/xdocs/velocity.properties b/xdocs/velocity.properties new file mode 100644 index 000000000..7327d96fb --- /dev/null +++ b/xdocs/velocity.properties @@ -0,0 +1,2 @@ +file.resource.loader.path=xdocs/stylesheets +velocimacro.library=templates.vm