org.apache.maven.plugin.jar
Class JarMojo

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

public class JarMojo
extends AbstractJarMojo

Build a JAR from the current project.

Version:
$Id: JarMojo.java 1158941 2011-08-17 22:22:17Z rfscholte $
Author:
Emmanuel Venisse
Is defined by the goal name:
jar
Is bound to the specified phase of the standard build lifecycle:
package
Requires the dependencies in this specified scope:
runtime
Requires a Maven project to run:
true

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JarMojo()
           
 
Method Summary
protected  File getClassesDirectory()
          Return the main classes directory, so it's used as the root of the jar.
protected  String getClassifier()
          Overload this to produce a jar with another classifier, for example a test-jar.
protected  String getType()
          Overload this to produce a test-jar, for example.
 
Methods inherited from class org.apache.maven.plugin.jar.AbstractJarMojo
createArchive, execute, getDefaultManifestFile, getJarFile, 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

JarMojo

public JarMojo()
Method Detail

getClassifier

protected String getClassifier()
Description copied from class: AbstractJarMojo
Overload this to produce a jar with another classifier, for example a test-jar.

Specified by:
getClassifier in class AbstractJarMojo

getType

protected String getType()
Description copied from class: AbstractJarMojo
Overload this to produce a test-jar, for example.

Specified by:
getType in class AbstractJarMojo
Returns:
type of the generated artifact

getClassesDirectory

protected File getClassesDirectory()
Return the main classes directory, so it's used as the root of the jar.

Specified by:
getClassesDirectory in class AbstractJarMojo


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