diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java index 5a9cb5ae6..be7dbe859 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java @@ -55,7 +55,6 @@ package org.apache.ant.antcore.modelparser; import java.util.Iterator; import org.apache.ant.common.model.BuildElement; -import org.apache.ant.antcore.xml.ElementHandler; import org.xml.sax.Attributes; import org.xml.sax.SAXParseException; @@ -66,7 +65,7 @@ import org.xml.sax.SAXParseException; * @author Conor MacNeill * @created 9 January 2002 */ -public class BuildElementHandler extends ElementHandler { +public class BuildElementHandler extends ModelElementHandler { /** The task element being parsed by this handler. */ private BuildElement buildElement; @@ -87,7 +86,8 @@ public class BuildElementHandler extends ElementHandler { public void processElement(String elementName) { buildElement = new BuildElement(getLocation(), elementName); - + setModelElement(buildElement); + for (Iterator i = getAttributes(); i.hasNext(); ) { String attributeName = (String)i.next(); buildElement.addAttribute(attributeName, diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ModelElementHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ModelElementHandler.java new file mode 100644 index 000000000..b1cea5861 --- /dev/null +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ModelElementHandler.java @@ -0,0 +1,88 @@ +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Ant", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + */ +package org.apache.ant.antcore.modelparser; +import org.apache.ant.antcore.xml.ElementHandler; + +import org.apache.ant.common.model.ModelElement; + +/** + * A BuildElementHandler parses the task elements of a build. Task elements + * include tasks themselves plus all their nested elements to any depth. + * + * @author Conor MacNeill + * @created 9 January 2002 + */ +public abstract class ModelElementHandler extends ElementHandler { + /** The model element being parsed by this handler. */ + private ModelElement modelElement; + + + /** + * Set the model element being handled by this handler + * + * @param modelElement The new modelElement value + */ + protected void setModelElement(ModelElement modelElement) { + this.modelElement = modelElement; + } + + + /** Set the end location of the element. */ + protected void finish() { + if (modelElement != null) { + modelElement.setEndLocation(getLocation()); + } + } +} + diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java index be8a372f2..1addd9b41 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/ProjectHandler.java @@ -54,7 +54,6 @@ package org.apache.ant.antcore.modelparser; import org.apache.ant.common.model.ModelException; import org.apache.ant.common.model.Project; -import org.apache.ant.antcore.xml.ElementHandler; import org.xml.sax.Attributes; import org.xml.sax.SAXParseException; @@ -66,7 +65,7 @@ import org.xml.sax.SAXParseException; * @author Conor MacNeill * @created 9 January 2002 */ -public class ProjectHandler extends ElementHandler { +public class ProjectHandler extends ModelElementHandler { /** The basedir attribute tag */ public static final String BASEDIR_ATTR = "basedir"; @@ -129,7 +128,8 @@ public class ProjectHandler extends ElementHandler { throws SAXParseException { if (project == null) { project = new Project(getElementSource(), getLocation()); - + setModelElement(project); + project.setDefaultTarget(getAttribute(DEFAULT_ATTR)); project.setBase(getAttribute(BASEDIR_ATTR)); project.setName(getAttribute(NAME_ATTR)); diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/TargetHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/TargetHandler.java index 7b7032cb8..2f98316c6 100644 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/TargetHandler.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/TargetHandler.java @@ -55,7 +55,6 @@ package org.apache.ant.antcore.modelparser; import java.util.StringTokenizer; import org.apache.ant.common.model.Target; -import org.apache.ant.antcore.xml.ElementHandler; import org.xml.sax.Attributes; import org.xml.sax.SAXParseException; @@ -65,7 +64,7 @@ import org.xml.sax.SAXParseException; * @author Conor MacNeill * @created 9 January 2002 */ -public class TargetHandler extends ElementHandler { +public class TargetHandler extends ModelElementHandler { /** The name attribute */ public static final String NAME_ATTR = "name"; @@ -104,6 +103,7 @@ public class TargetHandler extends ElementHandler { public void processElement(String elementName) throws SAXParseException { target = new Target(getLocation(), getAttribute(NAME_ATTR)); + setModelElement(target); target.setDescription(getAttribute(DESC_ATTR)); target.setAspects(getAspects()); diff --git a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/xml/RootHandler.java b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/xml/RootHandler.java index 17c1716d6..e671f2b87 100755 --- a/proposal/mutant/src/java/antcore/org/apache/ant/antcore/xml/RootHandler.java +++ b/proposal/mutant/src/java/antcore/org/apache/ant/antcore/xml/RootHandler.java @@ -122,8 +122,8 @@ public class RootHandler extends DefaultHandler { /** - * Start a new element in the root. This must be a project element All - * other elements are invalid. + * Start a new element in the root. This must be an allowed root element. + * All other elements are invalid. * * @param uri The Namespace URI. * @param localName The local name (without prefix). diff --git a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java index 0b50abea5..b00b5c4a8 100644 --- a/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java +++ b/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java @@ -131,7 +131,7 @@ public class Ant extends Task { } /** - * XXX Sets the output of the Ant + * Set the output file in which Ant stores output * * @param s name of the file to store output. */ @@ -158,7 +158,8 @@ public class Ant extends Task { /** * Do the execution. * - * @exception BuildException XXX Description of Exception + * @exception BuildException if the execution of the sub-build has a + * problem */ public void execute() throws BuildException { for (Iterator i = properties.iterator(); i.hasNext(); ) { diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java b/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java index fb5bbd1cd..83f86cb2e 100644 --- a/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java +++ b/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java @@ -70,8 +70,11 @@ public abstract class ModelElement { /** The aspects defined for this element. */ private Map aspectMaps; - /** The location of this element */ - private Location location; + /** The starting location of this element */ + private Location location = Location.UNKNOWN_LOCATION; + + /** The ending location of this element */ + private Location endLocation = Location.UNKNOWN_LOCATION; /** A comment associated with this element, if any */ private String comment; @@ -94,6 +97,15 @@ public abstract class ModelElement { this.comment = comment; } + /** + * Set the end location of this element + * + * @param endLocation the location where this element's definition ends + */ + public void setEndLocation(Location endLocation) { + this.endLocation = endLocation; + } + /** * Set the aspects of this element * @@ -128,6 +140,15 @@ public abstract class ModelElement { return location; } + /** + * Get the location of the source where this element's definition fiunishes + * + * @return the element's end location + */ + public Location getEndLocation() { + return endLocation; + } + /** * Get the comment associated with this element. * diff --git a/proposal/mutant/src/java/common/org/apache/ant/common/util/Location.java b/proposal/mutant/src/java/common/org/apache/ant/common/util/Location.java index d00a1b874..11ac8f082 100755 --- a/proposal/mutant/src/java/common/org/apache/ant/common/util/Location.java +++ b/proposal/mutant/src/java/common/org/apache/ant/common/util/Location.java @@ -63,6 +63,7 @@ public class Location { /** Standard unknown location constant; */ public static final Location UNKNOWN_LOCATION = new Location(); + /** The source URL to which this location relates. */ private String source; diff --git a/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java b/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java index a6d5f4f83..b21299164 100755 --- a/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java +++ b/proposal/mutant/src/java/init/org/apache/ant/init/InitConfig.java @@ -114,9 +114,9 @@ public class InitConfig { private File userConfigArea; /** - * XXX Constructor for the InitConfig object + * Constructor for the Initialization configuration * - * @exception InitException XXX Description of Exception + * @exception InitException if the configuration cannot be initialized */ public InitConfig() throws InitException { try { diff --git a/proposal/mutant/src/java/start/org/apache/ant/start/Main.java b/proposal/mutant/src/java/start/org/apache/ant/start/Main.java index e526f6ef5..4c0e60732 100755 --- a/proposal/mutant/src/java/start/org/apache/ant/start/Main.java +++ b/proposal/mutant/src/java/start/org/apache/ant/start/Main.java @@ -1,55 +1,55 @@ /* - * The Apache Software License, Version 1.1 + * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. * - * 4. The names "The Jakarta Project", "Ant", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The names "The Jakarta Project", "Ant", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . */ package org.apache.ant.start; @@ -57,93 +57,151 @@ import java.io.IOException; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; -import java.util.jar.Manifest; import java.util.jar.Attributes; import java.util.jar.JarInputStream; +import java.util.jar.Manifest; import org.apache.ant.init.InitConfig; +import org.apache.ant.init.InitException; +import java.io.File; /** - * This is the main startup class for the command line interface of Ant. It - * establishes the classloaders used by the other components of Ant. + * This is the main startup class for the command line interface of Ant. It + * establishes the classloaders used by the other components of Ant. * - * @author Conor MacNeill - * @created 9 January 2002 + * @author Conor MacNeill + * @created 9 January 2002 */ public class Main { - /** The actual class that implements the command line front end. */ + /** The actual class that implements the command line front end. */ public static final String DEFAULT_COMMANDLINE_CLASS = "org.apache.ant.cli.Commandline"; - - /** The default front end name */ + + /** The default front end name */ public static final String DEFAULT_FRONTEND = "cli"; - + + /** - * Entry point for starting command line Ant + * Entry point for starting command line Ant * - * @param args commandline arguments + * @param args commandline arguments + * @exception Exception if there is a problem running Ant */ - public static void main(String[] args) { + public static void main(String[] args) throws Exception { Main main = new Main(); - main.start(DEFAULT_FRONTEND, args); + int frontendIndex = -1; + String frontend = DEFAULT_FRONTEND; + + for (int i = 0; i < args.length; ++i) { + if (args[i].equals("-frontend")) { + frontendIndex = i; + break; + } + } + + if (frontendIndex != -1) { + try { + frontend = args[frontendIndex + 1]; + } catch (IndexOutOfBoundsException e) { + throw new InitException("You must specify a value for the " + + "-frontend argument"); + } + + String[] newArgs = new String[args.length - 2]; + + System.arraycopy(args, 0, newArgs, 0, frontendIndex); + if (args.length > (frontendIndex + 2)) { + System.arraycopy(args, frontendIndex + 2, newArgs, + frontendIndex, args.length - frontendIndex - 2); + } + args = newArgs; + } + + String defaultClass = frontend.equals(DEFAULT_FRONTEND) + ? DEFAULT_COMMANDLINE_CLASS : null; + + main.start(frontend, defaultClass, args); } + /** - * Internal start method used to initialise front end + * Internal start method used to initialise front end * - * @param frontend the frontend jar to launch - * @param args commandline arguments + * @param frontend the frontend jar to launch + * @param args commandline arguments + * @param defaultClass the default class to use if it cannot be determined + * from the jar itself + * @exception InitException if the front end cannot be started */ - public void start(String frontend, String[] args) { - try { + public void start(String frontend, String defaultClass, String[] args) + throws InitException { + try { InitConfig config = new InitConfig(); - - URL frontendJar = new URL(config.getLibraryURL(), + + URL frontendJar = new URL(config.getLibraryURL(), "frontend/" + frontend + ".jar"); URL[] frontendJars = new URL[]{frontendJar}; - ClassLoader frontEndLoader - = new URLClassLoader(frontendJars, config.getCoreLoader()); - + ClassLoader frontEndLoader + = new URLClassLoader(frontendJars, config.getCoreLoader()); + //System.out.println("Front End Loader config"); //LoaderUtils.dumpLoader(System.out, frontEndLoader); + if (frontendJar.getProtocol().equals("file")) { + File jarFile = new File(frontendJar.getFile()); + if (!jarFile.exists()) { + throw new InitException("Could not jar for frontend \"" + + frontend + "\""); + } + } String mainClass = getMainClass(frontendJar); - System.out.println("Front end main class = " + mainClass); + if (mainClass == null) { - mainClass = DEFAULT_COMMANDLINE_CLASS; + mainClass = defaultClass; } - + + if (mainClass == null) { + throw new InitException("Unable to determine main class " + + " for \"" + frontend + "\" frontend"); + } + // Now start the front end by reflection. - Class commandLineClass = Class.forName(mainClass, true, + Class frontendClass = Class.forName(mainClass, true, frontEndLoader); - + final Class[] param = {Class.forName("[Ljava.lang.String;"), InitConfig.class}; final Method startMethod - = commandLineClass.getMethod("start", param); + = frontendClass.getMethod("start", param); final Object[] argument = {args, config}; + startMethod.invoke(null, argument); } catch (Exception e) { - e.printStackTrace(); + throw new InitException(e); } } - + + /** - * Pick up the main class from a jar's manifest + * Pick up the main class from a jar's manifest * - * @param jarURL the URL to the jar - * @return the jar's main-class or null if it is not specified or cannot be - * determined. + * @param jarURL the URL to the jar + * @return the jar's main-class or null if it is not specified or + * cannot be determined. */ private String getMainClass(URL jarURL) { try { JarInputStream stream = null; + try { stream = new JarInputStream(jarURL.openStream()); + Manifest manifest = stream.getManifest(); + if (manifest == null) { return null; } Attributes mainAttributes = manifest.getMainAttributes(); + return mainAttributes.getValue("Main-Class"); } finally { if (stream != null) { @@ -151,7 +209,7 @@ public class Main { } } } catch (IOException e) { - // ignore + // ignore return null; } } diff --git a/proposal/mutant/src/java/start/org/apache/tools/ant/Main.java b/proposal/mutant/src/java/start/org/apache/tools/ant/Main.java index 334a6de58..592905ff6 100755 --- a/proposal/mutant/src/java/start/org/apache/tools/ant/Main.java +++ b/proposal/mutant/src/java/start/org/apache/tools/ant/Main.java @@ -1,70 +1,72 @@ /* - * The Apache Software License, Version 1.1 + * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 The Apache Software Foundation. All rights + * reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. * - * 4. The names "The Jakarta Project", "Ant", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The names "The Jakarta Project", "Ant", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . */ package org.apache.tools.ant; /** - * Old Ant1 entry point + * Old Ant1 entry point * - * @author Conor MacNeill + * @author Conor MacNeill + * @created 4 April 2002 */ public class Main { - /** - * Entry point for starting command line Ant + /** + * Entry point for starting command line Ant * - * @param args commandline arguments + * @param args commandline arguments + * @exception Exception if there is a problem running Ant */ - public static void main(String[] args) { + public static void main(String[] args) throws Exception { org.apache.ant.start.Main.main(args); } }