org.apache.maven.plugin.jar
Class AbstractJarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.jar.AbstractJarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JarMojo, TestJarMojo

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

Base class for creating a jar from project classes.

Version:
$Id: AbstractJarMojo.java 366416 2006-01-06 04:07:11Z brett $
Author:
Emmanuel Venisse

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJarMojo()
           
 
Method Summary
 java.io.File createArchive()
          Generates the JAR.
 void execute()
          Generates the JAR.
protected abstract  java.io.File getClassesDirectory()
          Return the specific output directory to serve as the root for the archive.
protected abstract  java.lang.String getClassifier()
          Overload this to produce a test-jar, for example.
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()
           
 
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
 

Constructor Detail

AbstractJarMojo

public AbstractJarMojo()
Method Detail

getClassesDirectory

protected abstract java.io.File getClassesDirectory()
Return the specific output directory to serve as the root for the archive.


getProject

protected final org.apache.maven.project.MavenProject getProject()

getClassifier

protected abstract java.lang.String getClassifier()
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)

createArchive

public java.io.File createArchive()
                           throws org.apache.maven.plugin.MojoExecutionException
Generates the JAR.

Throws:
org.apache.maven.plugin.MojoExecutionException

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Generates the JAR.

Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.