@Mojo(name="jar", defaultPhase=PACKAGE, requiresDependencyResolution=TEST, requiresReports=true) public class SiteJarMojo extends SiteMojo
Modifier and Type | Field and Description |
---|---|
private org.apache.maven.archiver.MavenArchiveConfiguration |
archive
The archive configuration to use.
|
private java.lang.String[] |
archiveExcludes
List of files to exclude.
|
private java.lang.String[] |
archiveIncludes
List of files to include.
|
private boolean |
attach
Specifies whether to attach the generated artifact to the project.
|
private static java.lang.String[] |
DEFAULT_ARCHIVE_EXCLUDES |
private static java.lang.String[] |
DEFAULT_ARCHIVE_INCLUDES |
private java.lang.String |
finalName
Specifies the filename that will be used for the generated jar file.
|
private org.codehaus.plexus.archiver.jar.JarArchiver |
jarArchiver
The Jar archiver.
|
private java.lang.String |
jarOutputDirectory
Specifies the directory where the generated jar file will be put.
|
private org.apache.maven.project.MavenProjectHelper |
projectHelper
Used for attaching the artifact in the project.
|
outputDirectory
generatedSiteDirectory, mavenSession, reports, siteRenderer
repositories, siteDirectory
i18n, localRepository, project, reactorProjects, siteTool, skip
Constructor and Description |
---|
SiteJarMojo() |
Modifier and Type | Method and Description |
---|---|
private java.io.File |
createArchive(java.io.File siteDirectory,
java.lang.String jarFilename)
Method that creates the jar file.
|
void |
execute()
Generate the project site
throws MojoExecutionException if any
|
private java.lang.String[] |
getArchiveExcludes() |
private java.lang.String[] |
getArchiveIncludes() |
protected java.lang.String |
getArtifactType() |
protected java.lang.String |
getClassifier() |
getProject, getSession
categoriseReports, checkInputEncoding, contextualize, createSiteRenderingContext, getInputEncoding, getOutputEncoding, getReports, locateDocuments, locateReports, populateReportItems
prepareDecorationModel
getLocales, getMavenVersion, isMaven3OrMore
private static final java.lang.String[] DEFAULT_ARCHIVE_EXCLUDES
private static final java.lang.String[] DEFAULT_ARCHIVE_INCLUDES
@Parameter(property="project.build.directory", required=true) private java.lang.String jarOutputDirectory
@Parameter(property="project.build.finalName", required=true) private java.lang.String finalName
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
@Parameter(property="site.attach", defaultValue="true") private boolean attach
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
@Parameter private java.lang.String[] archiveIncludes
@Parameter private java.lang.String[] archiveExcludes
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
SiteMojo
protected java.lang.String getArtifactType()
protected java.lang.String getClassifier()
private java.io.File createArchive(java.io.File siteDirectory, java.lang.String jarFilename) throws org.codehaus.plexus.archiver.ArchiverException, java.io.IOException, org.codehaus.plexus.archiver.jar.ManifestException, org.apache.maven.artifact.DependencyResolutionRequiredException
siteDirectory
- the directory where the site files are locatedjarFilename
- the filename of the created jar fileorg.codehaus.plexus.archiver.ArchiverException
java.io.IOException
org.codehaus.plexus.archiver.jar.ManifestException
org.apache.maven.artifact.DependencyResolutionRequiredException
private java.lang.String[] getArchiveIncludes()
private java.lang.String[] getArchiveExcludes()