org.apache.maven.plugin.idea

Class AbstractIdeaMojo

public abstract class AbstractIdeaMojo extends AbstractMojo

Author: Edwin Punzalan

Field Summary
protected ArtifactFactoryartifactFactory
protected ArtifactMetadataSourceartifactMetadataSource
protected ArtifactResolverartifactResolver
protected MavenProjectexecutedProject
The Maven Project.
protected ArtifactRepositorylocalRepo
protected Loglog
protected booleanoverwrite
Whether to update the existing project files or overwrite them.
Method Summary
protected ElementcreateElement(Element module, String name)
Creates an Xpp3Dom element.
protected voiddoDependencyResolution(MavenProject project, ArtifactRepository localRepo)
protected ElementfindComponent(Element module, String name)
Finds element from the module element.
protected ElementfindElement(Element element, String elementName, String attributeName)
protected ElementfindElement(Element component, String name)
LoggetLog()
voidinitParam(MavenProject project, ArtifactFactory artifactFactory, ArtifactRepository localRepo, ArtifactResolver artifactResolver, ArtifactMetadataSource artifactMetadataSource, Log log, boolean overwrite)
protected DocumentreadXmlDocument(File file, String altFilename)
protected voidremoveOldElements(Element content, String name)
Remove elements from content (Xpp3Dom).
protected StringtoRelative(File basedir, String absolutePath)
Translate the absolutePath into its relative path.
protected voidwriteXmlDocument(File file, Document document)

Field Detail

artifactFactory

protected ArtifactFactory artifactFactory

UNKNOWN: expression="${component.org.apache.maven.artifact.factory.ArtifactFactory}"

artifactMetadataSource

protected ArtifactMetadataSource artifactMetadataSource

UNKNOWN: role="org.apache.maven.artifact.metadata.ArtifactMetadataSource" hint="maven"

artifactResolver

protected ArtifactResolver artifactResolver

UNKNOWN: expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}"

executedProject

protected MavenProject executedProject
The Maven Project.

UNKNOWN: expression="${executedProject}"

localRepo

protected ArtifactRepository localRepo

UNKNOWN: expression="${localRepository}"

log

protected Log log

overwrite

protected boolean overwrite
Whether to update the existing project files or overwrite them.

UNKNOWN: expression="${overwrite}" default-value="false"

Method Detail

createElement

protected Element createElement(Element module, String name)
Creates an Xpp3Dom element.

Parameters: module Xpp3Dom element name Name of the element

Returns: component Xpp3Dom element

doDependencyResolution

protected void doDependencyResolution(MavenProject project, ArtifactRepository localRepo)

findComponent

protected Element findComponent(Element module, String name)
Finds element from the module element.

Parameters: module Xpp3Dom element name Name attribute to find

Returns: component Returns the Xpp3Dom element found.

findElement

protected Element findElement(Element element, String elementName, String attributeName)

findElement

protected Element findElement(Element component, String name)

getLog

public Log getLog()

initParam

public void initParam(MavenProject project, ArtifactFactory artifactFactory, ArtifactRepository localRepo, ArtifactResolver artifactResolver, ArtifactMetadataSource artifactMetadataSource, Log log, boolean overwrite)

readXmlDocument

protected Document readXmlDocument(File file, String altFilename)

removeOldElements

protected void removeOldElements(Element content, String name)
Remove elements from content (Xpp3Dom).

Parameters: content Xpp3Dom element name Name of the element to be removed

toRelative

protected String toRelative(File basedir, String absolutePath)
Translate the absolutePath into its relative path.

Parameters: basedir The basedir of the project. absolutePath The absolute path that must be translated to relative path.

Returns: relative Relative path of the parameter absolute path.

writeXmlDocument

protected void writeXmlDocument(File file, Document document)
Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.