Class SiteJarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="jar",
defaultPhase=PACKAGE,
requiresDependencyResolution=TEST,
requiresReports=true,
threadSafe=true)
public class SiteJarMojo
extends SiteMojo
Bundles the site output into a JAR so that it can be deployed to a repository.
- Since:
- 2.0-beta-6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.archiver.MavenArchiveConfigurationThe archive configuration to use.private String[]List of files to exclude.private String[]List of files to include.private booleanSpecifies whether to attach the generated artifact to the project.private static final String[]private static final String[]private StringSpecifies the filename that will be used for the generated jar file.private org.codehaus.plexus.archiver.jar.JarArchiverThe Jar archiver.private StringSpecifies the directory where the generated jar file will be put.private org.apache.maven.project.MavenProjectHelperUsed for attaching the artifact in the project.Fields inherited from class org.apache.maven.plugins.site.render.SiteMojo
outputDirectoryFields inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
generatedSiteDirectory, mavenReportExecutor, mavenSession, mojoExecution, outputTimestamp, siteRendererFields inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
reactorProjects, remoteProjectRepositories, repoSession, siteDirectoryFields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, project, siteTool, skipFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugins.site.render.SiteMojo
getProject, getSessionMethods inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
categoriseReports, checkInputEncoding, createSiteRenderingContext, getInputEncoding, getOutputEncoding, getReports, locateDocuments, locateReports, populateReportItemsMethods inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
prepareSiteModelMethods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getLocalesMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
DEFAULT_ARCHIVE_EXCLUDES
-
DEFAULT_ARCHIVE_INCLUDES
-
jarOutputDirectory
Specifies the directory where the generated jar file will be put. -
finalName
Specifies the filename that will be used for the generated jar file. Please note that "-site" will be appended to the file name. -
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelperUsed for attaching the artifact in the project. -
attach
@Parameter(property="site.attach", defaultValue="true") private boolean attachSpecifies whether to attach the generated artifact to the project. -
jarArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiverThe Jar archiver.- Since:
- 3.1
-
archive
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archiveThe archive configuration to use. See Maven Archiver Reference.- Since:
- 3.1
-
archiveIncludes
List of files to include. Specified as file set patterns which are relative to the input directory whose contents is being packaged into the JAR.- Since:
- 3.1
-
archiveExcludes
List of files to exclude. Specified as file set patterns which are relative to the input directory whose contents is being packaged into the JAR.- Since:
- 3.1
-
-
Constructor Details
-
SiteJarMojo
public SiteJarMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:SiteMojo -
getArtifactType
-
getClassifier
-
createArchive
private File createArchive(File siteDirectory, String jarFilename) throws org.codehaus.plexus.archiver.ArchiverException, IOException, org.codehaus.plexus.archiver.jar.ManifestException, org.apache.maven.artifact.DependencyResolutionRequiredException Method that creates the jar file.- Parameters:
siteDirectory- the directory where the site files are locatedjarFilename- the filename of the created jar file- Returns:
- a File object that contains the created jar file
- Throws:
org.codehaus.plexus.archiver.ArchiverExceptionIOExceptionorg.codehaus.plexus.archiver.jar.ManifestExceptionorg.apache.maven.artifact.DependencyResolutionRequiredException
-
getArchiveIncludes
-
getArchiveExcludes
-