com.github.maven_nar
Class AbstractDependencyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.github.maven_nar.AbstractNarMojo
          extended by com.github.maven_nar.AbstractDependencyMojo
All Implemented Interfaces:
NarConstants, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractCompileMojo, NarAssemblyMojo, NarDownloadDependenciesMojo, NarDownloadMojo, NarIntegrationTestMojo

public abstract class AbstractDependencyMojo
extends AbstractNarMojo

Author:
Mark Donszelmann

Field Summary
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
          To look up Archiver/UnArchiver implementations
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
          Artifact resolver, needed to download the attached nar files.
protected  List remoteArtifactRepositories
          Remote repositories which will be searched for nar attachments.
 
Fields inherited from class com.github.maven_nar.AbstractNarMojo
classesDirectory, classifiers, libraries
 
Fields inherited from interface com.github.maven_nar.NarConstants
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_VERBOSE, LOG_LEVEL_WARNING, NAR, NAR_AOL, NAR_EXTENSION, NAR_NO_ARCH, NAR_ROLE_HINT, NAR_TYPE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractDependencyMojo()
           
 
Method Summary
 void downloadAttachedNars(List<AttachedNarArtifact> dependencies)
           
 List<AttachedNarArtifact> getAllAttachedNarArtifacts(List<NarArtifact> narArtifacts)
           
protected  org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
           
protected  List<org.apache.maven.artifact.Artifact> getArtifacts()
           
protected  String getBinding(NarArtifact dependency)
           
protected  org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
          The plugin remote repositories declared in the pom.
 List<NarArtifact> getNarArtifacts()
          Returns dependencies which are dependent on NAR files (i.e.
 NarInfo getNarInfo(org.apache.maven.artifact.Artifact dependency)
           
protected  NarManager getNarManager()
           
protected  List getRemoteRepositories()
           
 void narExecute()
           
 void unpackAttachedNars(List<AttachedNarArtifact> dependencies)
           
 
Methods inherited from class com.github.maven_nar.AbstractNarMojo
execute, getAOL, getArchitecture, getBasedir, getJavah, getJavaHome, getLayout, getLibraries, getLinker, getMavenProject, getNarInfo, getOS, getOutput, getOutputDirectory, getTargetDirectory, getTestTargetDirectory, getTestUnpackDirectory, getUnpackDirectory, validate
 
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

artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
Artifact resolver, needed to download the attached nar files.


remoteArtifactRepositories

protected List remoteArtifactRepositories
Remote repositories which will be searched for nar attachments.


archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations

Constructor Detail

AbstractDependencyMojo

public AbstractDependencyMojo()
Method Detail

getLocalRepository

protected final org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
The plugin remote repositories declared in the pom.

Since:
2.2

getRemoteRepositories

protected final List getRemoteRepositories()

getArchiverManager

protected final org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()

getNarManager

protected final NarManager getNarManager()
                                  throws org.apache.maven.plugin.MojoFailureException,
                                         org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

getArtifacts

protected List<org.apache.maven.artifact.Artifact> getArtifacts()

getNarArtifacts

public final List<NarArtifact> getNarArtifacts()
                                        throws org.apache.maven.plugin.MojoExecutionException
Returns dependencies which are dependent on NAR files (i.e. contain NarInfo)

Throws:
org.apache.maven.plugin.MojoExecutionException

getNarInfo

public final NarInfo getNarInfo(org.apache.maven.artifact.Artifact dependency)
                         throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getAllAttachedNarArtifacts

public final List<AttachedNarArtifact> getAllAttachedNarArtifacts(List<NarArtifact> narArtifacts)
                                                           throws org.apache.maven.plugin.MojoExecutionException,
                                                                  org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getBinding

protected String getBinding(NarArtifact dependency)
                     throws org.apache.maven.plugin.MojoFailureException,
                            org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

downloadAttachedNars

public final void downloadAttachedNars(List<AttachedNarArtifact> dependencies)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

unpackAttachedNars

public final void unpackAttachedNars(List<AttachedNarArtifact> dependencies)
                              throws org.apache.maven.plugin.MojoExecutionException,
                                     org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

narExecute

public void narExecute()
                throws org.apache.maven.plugin.MojoFailureException,
                       org.apache.maven.plugin.MojoExecutionException
Specified by:
narExecute in class AbstractNarMojo
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.