org.mobicents.plugins.library
Class AbstractLibraryMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.mobicents.plugins.library.AbstractLibraryMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
LibraryMojo

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

Base class for creating a library jar.

Author:
Alexandre Mendonca

Field Summary
protected  org.apache.maven.artifact.handler.ArtifactHandler artifactHandler
          Default artifact handler.
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
          Used to look up Artifacts in the remote repository.
protected  org.apache.maven.artifact.installer.ArtifactInstaller installer
           
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          The local repository.
protected  org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
          Project builder
protected  java.util.List remoteRepos
          List of Remote Repositories used by the resolver
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
          Used to look up Artifacts in the remote repository.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLibraryMojo()
           
 
Method Summary
 java.io.File createArchive()
          Creates the library archive.
 void execute()
           
protected abstract  java.lang.String getClassifier()
          Overload this to produce a jar with another classifier, for example a test-jar.
protected  java.io.File getDefaultManifestFile()
          Default Manifest location.
protected static java.io.File getJarFile(java.io.File basedir, java.lang.String finalName, java.lang.String classifier)
           
protected  org.apache.maven.project.MavenProject getProject()
          Return the specific output directory to serve as the root for the archive.
protected abstract  java.lang.String getType()
          Overload this to produce a test-jar, for example.
 
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

mavenProjectBuilder

protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
Project builder


localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
The local repository.


factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory
Used to look up Artifacts in the remote repository.


resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
Used to look up Artifacts in the remote repository.


remoteRepos

protected java.util.List remoteRepos
List of Remote Repositories used by the resolver


installer

protected org.apache.maven.artifact.installer.ArtifactInstaller installer

artifactHandler

protected org.apache.maven.artifact.handler.ArtifactHandler artifactHandler
Default artifact handler.

Constructor Detail

AbstractLibraryMojo

public AbstractLibraryMojo()
Method Detail

getProject

protected final org.apache.maven.project.MavenProject getProject()
Return the specific output directory to serve as the root for the archive.


getClassifier

protected abstract java.lang.String getClassifier()
Overload this to produce a jar with another classifier, for example a test-jar.


getType

protected abstract java.lang.String getType()
Overload this to produce a test-jar, for example.


getJarFile

protected static java.io.File getJarFile(java.io.File basedir,
                                         java.lang.String finalName,
                                         java.lang.String classifier)

getDefaultManifestFile

protected java.io.File getDefaultManifestFile()
Default Manifest location. Can point to a non existing file. Cannot return null.


execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

createArchive

public java.io.File createArchive()
                           throws org.apache.maven.plugin.MojoExecutionException
Creates the library archive.

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


Copyright © 2008-2009 Mobicents. All Rights Reserved.