public abstract class AbstractJarMojo
extends org.apache.maven.plugin.AbstractMojo
Constructor and Description |
---|
AbstractJarMojo() |
Modifier and Type | Method and Description |
---|---|
File |
createArchive()
Generates the JAR.
|
void |
execute()
Generates the JAR.
|
protected abstract File |
getClassesDirectory()
Return the specific output directory to serve as the root for the archive.
|
protected abstract String |
getClassifier()
Overload this to produce a jar with another classifier, for example a test-jar.
|
protected File |
getJarFile(File basedir,
String resultFinalName,
String classifier)
Returns the Jar file to generate, based on an optional classifier.
|
protected org.apache.maven.project.MavenProject |
getProject() |
protected abstract String |
getType()
Overload this to produce a test-jar, for example.
|
protected boolean |
hasClassifier() |
protected abstract File getClassesDirectory()
protected final org.apache.maven.project.MavenProject getProject()
project
protected abstract String getClassifier()
protected abstract String getType()
protected File getJarFile(File basedir, String resultFinalName, String classifier)
basedir
- the output directoryresultFinalName
- the name of the ear fileclassifier
- an optional classifierpublic File createArchive() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- in case of an error.public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected boolean hasClassifier()
null
and contains something else than white spaces.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.