org.apache.geronimo.mavenplugins.car
Class AbstractCarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.pluginsupport.MojoSupport
          extended by org.apache.geronimo.mavenplugins.car.AbstractCarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Direct Known Subclasses:
ArchiveCarMojo, CreatePluginListMojo, InstallModulesMojo, PackageMojo, PlanProcessorMojo, PluginMetadataGeneratorMojo, UpdatePluginListMojo, ValidateConfigurationMojo

public abstract class AbstractCarMojo
extends org.codehaus.mojo.pluginsupport.MojoSupport

Support for packaging Mojos.


Nested Class Summary
protected  class AbstractCarMojo.ArtifactLookupImpl
           
 
Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  org.apache.maven.artifact.repository.ArtifactRepository artifactRepository
           
protected  File basedir
          The basedir of the project.
protected  Set<org.apache.maven.artifact.Artifact> dependencies
           
protected  org.codehaus.mojo.pluginsupport.dependency.DependencyHelper dependencyHelper
          dependency resolution for the maven repository
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  org.apache.maven.project.MavenProjectHelper projectHelper
          The maven project's helper.
 
Fields inherited from class org.codehaus.mojo.pluginsupport.MojoSupport
container, log
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractCarMojo()
           
 
Method Summary
protected  void generateExplicitVersionProperties(File outputFile, Set<org.apache.maven.artifact.Artifact> dependencies)
          Generates a properties file with explicit versions of artifacts of the current project transitivly.
protected  org.apache.maven.artifact.Artifact geronimoToMavenArtifact(Artifact artifact)
           
protected static File getArchiveFile(File basedir, String finalName, String classifier)
           
protected  org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepository()
           
protected  void getDependencies(org.apache.maven.project.MavenProject project)
           
protected  org.apache.maven.project.MavenProject getProject()
           
protected  boolean includeDependency(org.apache.maven.model.Dependency dependency)
           
protected  void init()
           
protected  boolean isModuleArtifact(Artifact artifact)
          Determine if the given artifact is a Geronimo module.
protected  Artifact mavenToGeronimoArtifact(org.apache.maven.artifact.Artifact artifact)
           
protected  Artifact mavenToGeronimoArtifact(org.apache.maven.model.Dependency artifact)
           
protected  org.apache.maven.model.Dependency resolveDependency(org.apache.maven.model.Dependency dependency, List<org.apache.maven.model.Dependency> artifacts)
           
 
Methods inherited from class org.codehaus.mojo.pluginsupport.MojoSupport
contextualize, createArtifact, doExecute, execute, getArtifact, getArtifactFactory, getArtifactResolver, getProjectArtifacts, getProjectArtifacts, getProjectArtifacts, resolveArtifact, resolveArtifact
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
The maven project.


basedir

protected File basedir
The basedir of the project.


projectHelper

protected org.apache.maven.project.MavenProjectHelper projectHelper
The maven project's helper.


dependencyHelper

protected org.codehaus.mojo.pluginsupport.dependency.DependencyHelper dependencyHelper
dependency resolution for the maven repository


artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory

dependencies

protected Set<org.apache.maven.artifact.Artifact> dependencies

artifactRepository

protected org.apache.maven.artifact.repository.ArtifactRepository artifactRepository
Constructor Detail

AbstractCarMojo

public AbstractCarMojo()
Method Detail

getProject

protected org.apache.maven.project.MavenProject getProject()
Overrides:
getProject in class org.codehaus.mojo.pluginsupport.MojoSupport

getArtifactRepository

protected org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepository()
Overrides:
getArtifactRepository in class org.codehaus.mojo.pluginsupport.MojoSupport

init

protected void init()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Overrides:
init in class org.codehaus.mojo.pluginsupport.MojoSupport
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

generateExplicitVersionProperties

protected void generateExplicitVersionProperties(File outputFile,
                                                 Set<org.apache.maven.artifact.Artifact> dependencies)
                                          throws org.apache.maven.plugin.MojoExecutionException,
                                                 IOException
Generates a properties file with explicit versions of artifacts of the current project transitivly.

Throws:
org.apache.maven.plugin.MojoExecutionException
IOException

getArchiveFile

protected static File getArchiveFile(File basedir,
                                     String finalName,
                                     String classifier)

mavenToGeronimoArtifact

protected Artifact mavenToGeronimoArtifact(org.apache.maven.artifact.Artifact artifact)

mavenToGeronimoArtifact

protected Artifact mavenToGeronimoArtifact(org.apache.maven.model.Dependency artifact)

geronimoToMavenArtifact

protected org.apache.maven.artifact.Artifact geronimoToMavenArtifact(Artifact artifact)
                                                              throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

isModuleArtifact

protected boolean isModuleArtifact(Artifact artifact)
Determine if the given artifact is a Geronimo module.

Parameters:
artifact - The artifact to check; must not be null.
Returns:
True if the artifact is a Geronimo module.

includeDependency

protected boolean includeDependency(org.apache.maven.model.Dependency dependency)

resolveDependency

protected org.apache.maven.model.Dependency resolveDependency(org.apache.maven.model.Dependency dependency,
                                                              List<org.apache.maven.model.Dependency> artifacts)

getDependencies

protected void getDependencies(org.apache.maven.project.MavenProject project)
                        throws org.apache.maven.project.ProjectBuildingException,
                               org.apache.maven.project.artifact.InvalidDependencyVersionException,
                               org.apache.maven.artifact.resolver.ArtifactResolutionException
Throws:
org.apache.maven.project.ProjectBuildingException
org.apache.maven.project.artifact.InvalidDependencyVersionException
org.apache.maven.artifact.resolver.ArtifactResolutionException


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.