org.apache.maven.surefire.booter
Class ManifestJarWriter

java.lang.Object
  extended by org.apache.maven.surefire.booter.ManifestJarWriter

public class ManifestJarWriter
extends Object

Constructs a jar containing only a META-INF/MANIFEST.MF with specified attributes.


Field Summary
static String EOL
          The End-Of-Line marker in manifests
static int MAX_LINE_LENGTH
          The max length of a line in a Manifest
static int MAX_SECTION_LENGTH
          Max length of a line section which is continued.
 
Constructor Summary
ManifestJarWriter(File jarFile)
           
 
Method Summary
 void close()
           
 void writeValue(String name, String value)
          Write a single attribute value out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LINE_LENGTH

public static final int MAX_LINE_LENGTH
The max length of a line in a Manifest

See Also:
Constant Field Values

MAX_SECTION_LENGTH

public static final int MAX_SECTION_LENGTH
Max length of a line section which is continued. Need to allow for the CRLF.

See Also:
Constant Field Values

EOL

public static final String EOL
The End-Of-Line marker in manifests

See Also:
Constant Field Values
Constructor Detail

ManifestJarWriter

public ManifestJarWriter(File jarFile)
                  throws IOException
Throws:
IOException
Method Detail

writeValue

public void writeValue(String name,
                       String value)
                throws IOException
Write a single attribute value out. Should handle multiple lines of attribute value.

Parameters:
name - the attribute name, e.g. "Main-Class"
value - the attribute value
Throws:
IOException - if the attribute value cannot be written

close

public void close()


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.