org.apache.maven.model.converter
Class Maven1Converter
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.model.converter.Maven1Converter
- All Implemented Interfaces:
- org.codehaus.plexus.logging.LogEnabled
public class Maven1Converter
- extends org.codehaus.plexus.logging.AbstractLogEnabled
Converts a Maven 1 project.xml (v3 pom) to a Maven 2 pom.xml (v4 pom).
- Version:
- $Id: Maven1Converter.java 567438 2007-08-19 17:29:20Z dennisl $
- Author:
- Fabrizio Giustina, Dennis Lundberg
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
converters
private java.util.List converters
- Available converters for specific plugin configurations
pluginRelocatorManager
private PluginRelocatorManager pluginRelocatorManager
- Plexus component that manages plugin relocators
basedir
private java.io.File basedir
outputdir
private java.io.File outputdir
fileName
private java.lang.String fileName
listeners
private java.util.List listeners
Maven1Converter
public Maven1Converter()
execute
public void execute()
throws ProjectConverterException
- Throws:
ProjectConverterException
isEmpty
private boolean isEmpty(java.lang.String value)
loadProperties
private void loadProperties(java.util.Properties properties,
java.io.File propertiesFile)
loadV3Pom
private org.apache.maven.model.v3_0_0.Model loadV3Pom(java.io.File inputFile)
throws java.lang.Exception
- Throws:
java.lang.Exception
removeDistributionManagementStatus
private void removeDistributionManagementStatus(org.apache.maven.model.Model v4Model)
- The status element of the distributionManagement section must not be
set in local projects. This method removes that element from the model.
writeV4Pom
private void writeV4Pom(org.apache.maven.model.Model v4Model)
throws ProjectConverterException,
java.io.IOException
- Write the pom to
${basedir}/pom.xml
. If the file exists it
will be overwritten.
- Parameters:
v4Model
-
- Throws:
ProjectConverterException
java.io.IOException
getBasedir
public java.io.File getBasedir()
setBasedir
public void setBasedir(java.io.File basedir)
getProjectFileName
public java.lang.String getProjectFileName()
setProjectFileName
public void setProjectFileName(java.lang.String projectFileName)
setProjectFile
public void setProjectFile(java.io.File projectFile)
getOutputdir
public java.io.File getOutputdir()
setOutputdir
public void setOutputdir(java.io.File outputdir)
addListener
public void addListener(ConverterListener listener)
sendInfoMessage
private void sendInfoMessage(java.lang.String message)
sendWarnMessage
private void sendWarnMessage(java.lang.String message)
fireSavePomEvent
private void fireSavePomEvent(java.io.File pomFile,
boolean alreadyExist)