info.rvin.mojo.flexmojo
Class AbstractIrvinMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by info.rvin.mojo.flexmojo.AbstractIrvinMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractFlexCompilerMojo, FlexUnitMojo

public abstract class AbstractIrvinMojo
extends org.apache.maven.plugin.AbstractMojo

Encapsulate the access to Maven API. Some times just to hide Java 5 warnings


Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
           
protected  org.apache.maven.model.Build build
           
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          Local repository to be used by the plugin to resolve dependencies.
protected  org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
           
protected  java.util.List<org.apache.maven.artifact.Artifact> pluginArtifacts
           
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  org.apache.maven.project.MavenProjectHelper projectHelper
           
protected  java.util.List remoteRepositories
          List of remote repositories to be used by the plugin to resolve dependencies.
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractIrvinMojo()
          Construct Mojo instance
 
Method Summary
 void execute()
          Executes plugin
protected  java.util.Set<org.apache.maven.artifact.Artifact> getDependencyArtifacts()
          Returns Set of dependency artifacts which are resolved for the project.
protected  java.util.List<org.apache.maven.artifact.Artifact> getDependencyArtifacts(java.lang.String... scopes)
          Get dependency artifacts for given scope
protected abstract  void run()
          Perform plugin functionality
protected abstract  void setUp()
          Perform setup before plugin is run.
protected abstract  void tearDown()
          Perform (cleanup) actions after plugin has run
 
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.


build

protected org.apache.maven.model.Build build

projectHelper

protected org.apache.maven.project.MavenProjectHelper projectHelper

artifactFactory

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

resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver

artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource

mavenProjectBuilder

protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Local repository to be used by the plugin to resolve dependencies.


remoteRepositories

protected java.util.List remoteRepositories
List of remote repositories to be used by the plugin to resolve dependencies.


pluginArtifacts

protected java.util.List<org.apache.maven.artifact.Artifact> pluginArtifacts
Constructor Detail

AbstractIrvinMojo

public AbstractIrvinMojo()
Construct Mojo instance

Method Detail

getDependencyArtifacts

protected java.util.Set<org.apache.maven.artifact.Artifact> getDependencyArtifacts()
                                                                            throws org.apache.maven.plugin.MojoExecutionException
Returns Set of dependency artifacts which are resolved for the project.

Returns:
Set of dependency artifacts.
Throws:
org.apache.maven.plugin.MojoExecutionException

getDependencyArtifacts

protected java.util.List<org.apache.maven.artifact.Artifact> getDependencyArtifacts(java.lang.String... scopes)
                                                                             throws org.apache.maven.plugin.MojoExecutionException
Get dependency artifacts for given scope

Parameters:
scope - for which to get artifacts
Returns:
List of artifacts
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Executes plugin

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

setUp

protected abstract void setUp()
                       throws org.apache.maven.plugin.MojoExecutionException,
                              org.apache.maven.plugin.MojoFailureException
Perform setup before plugin is run.

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

run

protected abstract void run()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
Perform plugin functionality

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

tearDown

protected abstract void tearDown()
                          throws org.apache.maven.plugin.MojoExecutionException,
                                 org.apache.maven.plugin.MojoFailureException
Perform (cleanup) actions after plugin has run

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


Copyright © 2008-2009 Flex-Mojos. All Rights Reserved.