org.apache.maven.model.converter.relocators
Class AbstractPluginRelocator

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.model.converter.relocators.AbstractPluginRelocator
All Implemented Interfaces:
PluginRelocator, org.codehaus.plexus.logging.LogEnabled
Direct Known Subclasses:
AbstractSourceForgePluginRelocator, CastorPluginRelocator, DeveloperActivityPluginRelocator, FaqPluginRelocator, FileActivityPluginRelocator, JalopyPluginRelocator, JavaCCPluginRelocator, JdependPluginRelocator, JdiffPluginRelocator, JunitReportPluginRelocator, LicenseRelocator, SimianPluginRelocator, TasklistPluginRelocator, XdocPluginRelocator

public abstract class AbstractPluginRelocator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements PluginRelocator

A general implementation of the PluginRelocator interface.

Version:
$Id: AbstractPluginRelocator.java 661727 2008-05-30 14:21:49Z bentmann $
Author:
Dennis Lundberg

Field Summary
 
Fields inherited from interface org.apache.maven.model.converter.relocators.PluginRelocator
ROLE
 
Constructor Summary
AbstractPluginRelocator()
           
 
Method Summary
 void addListener(ConverterListener listener)
          Add a listener for all messages sended by the relocator.
 void addListeners(List listeners)
          Add a listeners list for all messages sended by the relocator.
abstract  String getNewArtifactId()
          If there is no replacement for this plugin, you can have the plugin removed from the v4 pom by returning null from this method and from getNewGroupId().
abstract  String getNewGroupId()
          If there is no replacement for this plugin, you can have the plugin removed from the v4 pom by returning null from this method and from getNewArtifactId().
abstract  String getOldArtifactId()
          Note: Because we are working on the recently converted Maven 2 model, this method must return the artifactId that is in the model, after the model has been converted.
 String getOldGroupId()
          Note: Because we are working on the recently converted Maven 2 model, this method must return the groupId that is in the model, after the model has been converted.
 void relocate(Model v4Model)
          Relocate a plugin from one groupId/artifactId to another.
 
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
 

Constructor Detail

AbstractPluginRelocator

public AbstractPluginRelocator()
Method Detail

getNewArtifactId

public abstract String getNewArtifactId()
If there is no replacement for this plugin, you can have the plugin removed from the v4 pom by returning null from this method and from getNewGroupId().

Returns:
The artifactId of the new Maven 2 plugin

getNewGroupId

public abstract String getNewGroupId()
If there is no replacement for this plugin, you can have the plugin removed from the v4 pom by returning null from this method and from getNewArtifactId().

Returns:
The groupId of the new Maven 2 plugin

getOldArtifactId

public abstract String getOldArtifactId()
Note: Because we are working on the recently converted Maven 2 model, this method must return the artifactId that is in the model, after the model has been converted.

Returns:
The artifactId of the Maven 1 plugin.
See Also:
PomV3ToV4Translator.translateDependencies(java.util.List)

getOldGroupId

public String getOldGroupId()
Note: Because we are working on the recently converted Maven 2 model, this method must return the groupId that is in the model, after the model has been converted.

Feel free to overload this method if your plugin has a different groupId.

Returns:
The groupId of the Maven 1 plugin.
See Also:
PomV3ToV4Translator.translateDependencies(java.util.List)

relocate

public void relocate(Model v4Model)
Relocate a plugin from one groupId/artifactId to another.

Specified by:
relocate in interface PluginRelocator
Parameters:
v4Model - The model where we look for the plugin

addListener

public void addListener(ConverterListener listener)
Description copied from interface: PluginRelocator
Add a listener for all messages sended by the relocator.

Specified by:
addListener in interface PluginRelocator
Parameters:
listener - The listener that will receive messages

addListeners

public void addListeners(List listeners)
Description copied from interface: PluginRelocator
Add a listeners list for all messages sended by the relocator.

Specified by:
addListeners in interface PluginRelocator
Parameters:
listeners - The listeners list that will receive messages


Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.