Class SiteJarMojo

  • 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 Detail

      • DEFAULT_ARCHIVE_EXCLUDES

        private static final java.lang.String[] DEFAULT_ARCHIVE_EXCLUDES
      • DEFAULT_ARCHIVE_INCLUDES

        private static final java.lang.String[] DEFAULT_ARCHIVE_INCLUDES
      • jarOutputDirectory

        @Parameter(property="project.build.directory",
                   required=true)
        private java.lang.String jarOutputDirectory
        Specifies the directory where the generated jar file will be put.
      • finalName

        @Parameter(property="project.build.finalName",
                   required=true)
        private java.lang.String 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 projectHelper
        Used for attaching the artifact in the project.
      • attach

        @Parameter(property="site.attach",
                   defaultValue="true")
        private boolean attach
        Specifies 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 jarArchiver
        The Jar archiver.
        Since:
        3.1
      • archive

        @Parameter
        private org.apache.maven.archiver.MavenArchiveConfiguration archive
        The archive configuration to use. See Maven Archiver Reference.
        Since:
        3.1
      • archiveIncludes

        @Parameter
        private java.lang.String[] 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

        @Parameter
        private java.lang.String[] 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 Detail

      • SiteJarMojo

        public SiteJarMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Description copied from class: SiteMojo
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Overrides:
        execute in class SiteMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
        See Also:
        Mojo.execute()
      • getArtifactType

        protected java.lang.String getArtifactType()
      • getClassifier

        protected java.lang.String getClassifier()
      • createArchive

        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
        Method that creates the jar file.
        Parameters:
        siteDirectory - the directory where the site files are located
        jarFilename - the filename of the created jar file
        Returns:
        a File object that contains the created jar file
        Throws:
        org.codehaus.plexus.archiver.ArchiverException
        java.io.IOException
        org.codehaus.plexus.archiver.jar.ManifestException
        org.apache.maven.artifact.DependencyResolutionRequiredException
      • getArchiveIncludes

        private java.lang.String[] getArchiveIncludes()
      • getArchiveExcludes

        private java.lang.String[] getArchiveExcludes()