org.apache.maven.artifact.ant
Class WritePomTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.maven.artifact.ant.WritePomTask
All Implemented Interfaces:
Cloneable

public class WritePomTask
extends org.apache.tools.ant.Task

Write a POM to a file.

Since:
2.1.0

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
WritePomTask()
           
 
Method Summary
 void execute()
           
 File getFile()
           
 String getPomRefId()
           
 boolean isTrim()
           
 void setFile(File file)
           
 void setPomRefId(String pomRefId)
           
 void setTrim(boolean trim)
           
 void trimModel(org.apache.maven.model.Model model)
          Removes a lot of unnecessary information from the POM.
 void writeModel(org.apache.maven.model.Model model, File outputFile)
          Write a POM model to a file
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritePomTask

public WritePomTask()
Method Detail

execute

public void execute()
Overrides:
execute in class org.apache.tools.ant.Task

trimModel

public void trimModel(org.apache.maven.model.Model model)
Removes a lot of unnecessary information from the POM. This includes the build section, reporting, repositories, etc.


writeModel

public void writeModel(org.apache.maven.model.Model model,
                       File outputFile)
                throws org.apache.tools.ant.BuildException
Write a POM model to a file

Parameters:
model -
Throws:
MojoExecutionException
org.apache.tools.ant.BuildException

setPomRefId

public void setPomRefId(String pomRefId)

getPomRefId

public String getPomRefId()

setFile

public void setFile(File file)

getFile

public File getFile()

setTrim

public void setTrim(boolean trim)

isTrim

public boolean isTrim()


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.