Class ObrRemoteClean
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.felix.obrplugin.ObrRemoteClean
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="remote-clean",
requiresProject=false,
defaultPhase=CLEAN)
public final class ObrRemoteClean
extends org.apache.maven.plugin.AbstractMojo
Clean a remote repository file.
It just looks for every resources and check that pointed file exists.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate StringAlternative deployment repository.private org.apache.maven.artifact.repository.ArtifactRepositoryprivate booleanWhen true, ignore remote locking.private booleanprivate org.apache.maven.artifact.manager.WagonManagerThe Wagon manager.private StringOBR specific deployment repository.private StringLocal OBR Repository.private StringOptional public URL prefix for the remote repository.private org.apache.maven.project.MavenProjectThe Maven project.private StringRemote OBR Repository.private org.apache.maven.settings.SettingsLocal Maven settings.private ListProject types which this plugin supports.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ElementcleanDocument(Element elem) Analyze the given XML tree (DOM of the repository file) and remove missing resources.voidexecute()private DocumentBuilderInitialize the document builder from Xerces.private voidopenRepositoryConnection(RemoteFileManager remoteFile) private DocumentparseFile(File file, DocumentBuilder constructor) Open an XML file.private voidwriteToFile(URI outputFilename, Node treeToBeWrite) write a Node in a xml file.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
ignoreLock
@Parameter(property="ignoreLock") private boolean ignoreLockWhen true, ignore remote locking. -
prefixUrl
Optional public URL prefix for the remote repository. -
remoteOBR
Remote OBR Repository. -
obrRepository
Local OBR Repository. -
supportedProjectTypes
Project types which this plugin supports. -
deploymentRepository
@Parameter(defaultValue="${project.distributionManagementArtifactRepository}", readonly=true) private org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository -
altDeploymentRepository
Alternative deployment repository. Format: id::layout::url -
obrDeploymentRepository
OBR specific deployment repository. Format: id::layout::url -
interactive
@Parameter(defaultValue="${settings.interactiveMode}", readonly=true) private boolean interactive -
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject projectThe Maven project. -
settings
@Parameter(defaultValue="${settings}", readonly=true, required=true) private org.apache.maven.settings.Settings settingsLocal Maven settings. -
m_wagonManager
@Component private org.apache.maven.artifact.manager.WagonManager m_wagonManagerThe Wagon manager. -
ALT_REPO_SYNTAX_PATTERN
-
-
Constructor Details
-
ObrRemoteClean
public ObrRemoteClean()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
openRepositoryConnection
private void openRepositoryConnection(RemoteFileManager remoteFile) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
cleanDocument
-
initConstructor
Initialize the document builder from Xerces.- Returns:
- DocumentBuilder ready to create new document
- Throws:
org.apache.maven.plugin.MojoExecutionException- : occurs when the instantiation of the document builder fails
-
parseFile
private Document parseFile(File file, DocumentBuilder constructor) throws org.apache.maven.plugin.MojoExecutionException Open an XML file.- Parameters:
file- : XML fileconstructor- DocumentBuilder get from xerces- Returns:
- Document which describes this file
- Throws:
org.apache.maven.plugin.MojoExecutionException- occurs when the given file cannot be opened or is a valid XML file.
-
writeToFile
private void writeToFile(URI outputFilename, Node treeToBeWrite) throws org.apache.maven.plugin.MojoExecutionException write a Node in a xml file.- Parameters:
outputFilename- URI to the output filetreeToBeWrite- Node root of the tree to be write in file- Throws:
org.apache.maven.plugin.MojoExecutionException- if the plugin failed
-