org.freehep.maven.nar
Class NarManager

java.lang.Object
  extended by org.freehep.maven.nar.NarManager

public class NarManager
extends Object


Constructor Summary
NarManager(org.apache.maven.plugin.logging.Log log, org.apache.maven.artifact.repository.ArtifactRepository repository, org.apache.maven.project.MavenProject project, String architecture, String os, Linker linker)
           
 
Method Summary
 void downloadAttachedNars(List narArtifacts, List remoteRepositories, org.apache.maven.artifact.resolver.ArtifactResolver resolver, String classifier)
           
 List getAttachedNarDependencies(List narArtifacts)
           
 List getAttachedNarDependencies(List narArtifacts, String classifier)
           
 List getAttachedNarDependencies(List narArtifacts, String aol, String type)
          Returns a list of all attached nar dependencies for a specific binding and "noarch", but not where "local" is specified
 Map getAttachedNarDependencyMap(String scope)
          Returns all NAR dependencies by type: noarch, static, dynamic, jni, plugin.
 List getNarDependencies(String scope)
          Returns dependencies which are dependent on NAR files (i.e.
 File getNarFile(org.apache.maven.artifact.Artifact dependency)
           
 NarInfo getNarInfo(org.apache.maven.artifact.Artifact dependency)
           
 void unpackAttachedNars(List narArtifacts, org.codehaus.plexus.archiver.manager.ArchiverManager manager, String classifier, String os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NarManager

public NarManager(org.apache.maven.plugin.logging.Log log,
                  org.apache.maven.artifact.repository.ArtifactRepository repository,
                  org.apache.maven.project.MavenProject project,
                  String architecture,
                  String os,
                  Linker linker)
           throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException
Method Detail

getNarDependencies

public List getNarDependencies(String scope)
                        throws org.apache.maven.plugin.MojoExecutionException
Returns dependencies which are dependent on NAR files (i.e. contain NarInfo)

Throws:
org.apache.maven.plugin.MojoExecutionException

getAttachedNarDependencyMap

public Map getAttachedNarDependencyMap(String scope)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
Returns all NAR dependencies by type: noarch, static, dynamic, jni, plugin.

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

getAttachedNarDependencies

public List getAttachedNarDependencies(List narArtifacts)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getAttachedNarDependencies

public List getAttachedNarDependencies(List narArtifacts,
                                       String classifier)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getAttachedNarDependencies

public List getAttachedNarDependencies(List narArtifacts,
                                       String aol,
                                       String type)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
Returns a list of all attached nar dependencies for a specific binding and "noarch", but not where "local" is specified

Parameters:
scope - compile, test, runtime, ....
aol - either a valid aol, noarch or null. In case of null both the default getAOL() and noarch dependencies are returned.
type - noarch, static, shared, jni, or null. In case of null the default binding found in narInfo is used.
Returns:
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getNarInfo

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

getNarFile

public File getNarFile(org.apache.maven.artifact.Artifact dependency)
                throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException

downloadAttachedNars

public void downloadAttachedNars(List narArtifacts,
                                 List remoteRepositories,
                                 org.apache.maven.artifact.resolver.ArtifactResolver resolver,
                                 String classifier)
                          throws org.apache.maven.plugin.MojoExecutionException,
                                 org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

unpackAttachedNars

public void unpackAttachedNars(List narArtifacts,
                               org.codehaus.plexus.archiver.manager.ArchiverManager manager,
                               String classifier,
                               String os)
                        throws org.apache.maven.plugin.MojoExecutionException,
                               org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright 2000-2007 FreeHEP. All Rights Reserved.