Browse Source

STart to move the ant-indepenet manifest stuff into aut

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271244 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
9592a7bdbb
14 changed files with 21 additions and 176 deletions
  1. +2
    -2
      proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java
  2. +1
    -1
      proposal/myrmidon/src/java/org/apache/aut/manifest/ManifestException.java
  3. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java
  4. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java
  5. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java
  6. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java
  7. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java
  8. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java
  9. +0
    -121
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Attribute.java
  10. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java
  11. +0
    -50
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestException.java
  12. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java
  13. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java
  14. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java

proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Attribute.java → proposal/myrmidon/src/java/org/apache/aut/manifest/Attribute.java View File

@@ -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 <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class Attribute

proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestException.java → proposal/myrmidon/src/java/org/apache/aut/manifest/ManifestException.java View File

@@ -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;


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Jar.java View File

@@ -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;



+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Manifest.java View File

@@ -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


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java View File

@@ -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


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java View File

@@ -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.


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/manifest/Section.java View File

@@ -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


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Jar.java View File

@@ -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;



+ 0
- 121
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Attribute.java View File

@@ -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 <a href="mailto:conor@apache.org">Conor MacNeill</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @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 ) );
}

}

+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Manifest.java View File

@@ -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


+ 0
- 50
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestException.java View File

@@ -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 <a href="mailto:peter@apache.org">Peter Donald</a>
* @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 );
}
}

+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestTask.java View File

@@ -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


+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/ManifestUtil.java View File

@@ -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.


+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/manifest/Section.java View File

@@ -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


Loading…
Cancel
Save