org.apache.maven.plugin.jar

## Class JarMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.maven.plugin.jar.AbstractJarMojo
    - - 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

### Field Summary

### Fields inherited from interface org.apache.maven.plugin.Mojo

`ROLE`

### Constructor Summary

Constructors
Constructor and Description
`JarMojo()`

### Method Summary

Methods
`protected java.io.File` `getClassesDirectory()` Return the main classes directory, so it's used as the root of the jar.
`protected java.lang.String` `getClassifier()` Overload this to produce a jar with another classifier, for example a test-jar.
`protected java.lang.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 java.lang.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 java.lang.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 java.io.File getClassesDirectory()

Return the main classes directory, so it's used as the root of the jar.

Specified by:
  `getClassesDirectory` in class `AbstractJarMojo`