org.apache.maven
Class XmlPomFormatter

java.lang.Object
  extended byorg.apache.maven.XmlPomFormatter

public class XmlPomFormatter
extends Object

A little XML document formatter. Used to format a POM in XML format after it has been transformed.

Version:
$Id: XmlPomFormatter.java 170200 2005-05-15 06:24:19Z brett $
Author:
James Strachan, Jason van Zyl

Constructor Summary
XmlPomFormatter()
           
 
Method Summary
protected  org.dom4j.Document createDocument()
          Description of the Method
 void execute()
          Format the project descriptor.
 File getInput()
          Get input file.
 File getOutput()
          Get output file.
static void main(String[] args)
          Left over testing method - to be removed
 void setInput(File input)
          Set input file.
 void setOutput(File output)
          Set output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlPomFormatter

public XmlPomFormatter()
Method Detail

setInput

public void setInput(File input)
Set input file.

Parameters:
input - the File to read the unformatted project object model from

getInput

public File getInput()
Get input file.

Returns:
the file the unformatted project object model will read from

setOutput

public void setOutput(File output)
Set output file.

Parameters:
output - the File to write the formatted project object object model to

getOutput

public File getOutput()
Get output file.

Returns:
the file the formatted project object model will be written to

execute

public void execute()
             throws Exception
Format the project descriptor.

Throws:
Exception - when any error occurs

createDocument

protected org.dom4j.Document createDocument()
                                     throws Exception
Description of the Method

Returns:
a Document from parsing the input file
Throws:
Exception - when any error occurs

main

public static void main(String[] args)
                 throws Exception
Left over testing method - to be removed

Parameters:
args - command line arguments
Throws:
Exception - when any error occurs


Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.