diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Attribute.java b/proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java similarity index 98% rename from proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Attribute.java rename to proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java index b0b5fa7c1..2d543de0a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Attribute.java +++ b/proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java @@ -5,7 +5,7 @@ * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ -package org.apache.tools.ant.taskdefs.manifest; +package org.apache.aut.manifest; import java.io.PrintWriter; import java.io.IOException; @@ -14,9 +14,9 @@ import java.util.jar.Attributes; /** * Class to hold manifest attributes * + * @author Peter Donald * @author Conor MacNeill * @author Stefan Bodewig - * @author Peter Donald * @version $Revision$ $Date$ */ public class Attribute diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestException.java b/proposal/myrmidon/src/java/org/apache/aut/manifest/ManifestException.java similarity index 96% rename from proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestException.java rename to proposal/myrmidon/src/java/org/apache/aut/manifest/ManifestException.java index a2aab55ae..77d32db32 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestException.java +++ b/proposal/myrmidon/src/java/org/apache/aut/manifest/ManifestException.java @@ -5,7 +5,7 @@ * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ -package org.apache.tools.ant.taskdefs.manifest; +package org.apache.aut.manifest; import org.apache.avalon.framework.CascadingException; diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java index 14cde3ac2..7cf4dfbdd 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java @@ -22,7 +22,7 @@ import java.util.zip.ZipFile; import org.apache.aut.zip.ZipOutputStream; import org.apache.myrmidon.api.TaskException; import org.apache.tools.ant.taskdefs.manifest.Manifest; -import org.apache.tools.ant.taskdefs.manifest.ManifestException; +import org.apache.aut.manifest.ManifestException; import org.apache.tools.ant.taskdefs.manifest.ManifestUtil; import org.apache.tools.ant.types.FileScanner; diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java index 39fc5a113..81a49c6b3 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java @@ -13,6 +13,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Set; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to manage Manifest information diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java index 400fd87dd..723678de0 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java @@ -17,6 +17,8 @@ import java.util.Iterator; import org.apache.avalon.excalibur.io.IOUtil; import org.apache.myrmidon.api.AbstractTask; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to manage Manifest information diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java index a06825694..764f54ac1 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java @@ -16,6 +16,8 @@ import java.io.UnsupportedEncodingException; import java.io.BufferedReader; import java.util.jar.Attributes; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Utility methods for manifest stuff. diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java index 2213a6b71..c6cb3e170 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java @@ -14,6 +14,8 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to represent an individual section in the Manifest. A section diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java index 14cde3ac2..7cf4dfbdd 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java @@ -22,7 +22,7 @@ import java.util.zip.ZipFile; import org.apache.aut.zip.ZipOutputStream; import org.apache.myrmidon.api.TaskException; import org.apache.tools.ant.taskdefs.manifest.Manifest; -import org.apache.tools.ant.taskdefs.manifest.ManifestException; +import org.apache.aut.manifest.ManifestException; import org.apache.tools.ant.taskdefs.manifest.ManifestUtil; import org.apache.tools.ant.types.FileScanner; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Attribute.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Attribute.java deleted file mode 100644 index b0b5fa7c1..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Attribute.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE.txt file. - */ -package org.apache.tools.ant.taskdefs.manifest; - -import java.io.PrintWriter; -import java.io.IOException; -import java.util.jar.Attributes; - -/** - * Class to hold manifest attributes - * - * @author Conor MacNeill - * @author Stefan Bodewig - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public class Attribute -{ - /** - * The attribute's name - */ - private String m_name; - - /** - * The attribute's value - */ - private String m_value; - - /** - * Construct an empty attribute - */ - public Attribute() - { - } - - /** - * Construct a manifest by specifying its name and value - * - * @param name the attribute's name - * @param value the Attribute's value - */ - public Attribute( final String name, final String value ) - { - m_name = name; - m_value = value; - } - - /** - * Set the Attribute's name - * - * @param name the attribute's name - */ - public void setName( final String name ) - { - m_name = name; - } - - /** - * Set the Attribute's value - * - * @param value the attribute's value - */ - public void setValue( final String value ) - { - m_value = value; - } - - /** - * Get the Attribute's name - * - * @return the attribute's name. - */ - public String getName() - { - return m_name; - } - - /** - * Get the Attribute's value - * - * @return the attribute's value. - */ - public String getValue() - { - return m_value; - } - - /** - * Add a continuation line from the Manifest file When lines are too - * long in a manifest, they are continued on the next line by starting - * with a space. This method adds the continuation data to the attribute - * value by skipping the first character. - * - * @param line The feature to be added to the Continuation attribute - */ - public void addContinuation( final String line ) - { - m_value += line.substring( 1 ); - } - - public boolean equals( Object object ) - { - if( !( object instanceof Attribute ) ) - { - return false; - } - - final Attribute other = (Attribute)object; - final String name = other.m_name; - return - ( null != m_name && null != name && - m_name.toLowerCase().equals( name.toLowerCase() ) && - null != m_value && m_value.equals( other.m_value ) ); - } - -} diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java index 39fc5a113..81a49c6b3 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java @@ -13,6 +13,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Set; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to manage Manifest information diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestException.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestException.java deleted file mode 100644 index a2aab55ae..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestException.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE.txt file. - */ -package org.apache.tools.ant.taskdefs.manifest; - -import org.apache.avalon.framework.CascadingException; - -/** - * ManifestException is thrown when there is a problem parsing, generating or - * handling a Manifest. - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public class ManifestException - extends CascadingException -{ - /** - * Basic constructor for exception that does not specify a message - */ - public ManifestException() - { - this( "", null ); - } - - /** - * Basic constructor with a message - * - * @param message the message - */ - public ManifestException( final String message ) - { - this( message, null ); - } - - /** - * Constructor that builds cascade so that other exception information can be retained. - * - * @param message the message - * @param throwable the throwable - */ - public ManifestException( final String message, final Throwable throwable ) - { - super( message, throwable ); - } -} diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java index 400fd87dd..723678de0 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java @@ -17,6 +17,8 @@ import java.util.Iterator; import org.apache.avalon.excalibur.io.IOUtil; import org.apache.myrmidon.api.AbstractTask; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to manage Manifest information diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java index a06825694..764f54ac1 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java @@ -16,6 +16,8 @@ import java.io.UnsupportedEncodingException; import java.io.BufferedReader; import java.util.jar.Attributes; import org.apache.myrmidon.api.TaskException; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Utility methods for manifest stuff. diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java index 2213a6b71..c6cb3e170 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java @@ -14,6 +14,8 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; +import org.apache.aut.manifest.Attribute; +import org.apache.aut.manifest.ManifestException; /** * Class to represent an individual section in the Manifest. A section