Package scala_maven

Class ScalaDocJarMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport

    @Mojo(name="doc-jar",
          defaultPhase=PACKAGE,
          requiresDependencyResolution=COMPILE)
    public class ScalaDocJarMojo
    extends ScalaDocMojo
    Creates a jar of the non-aggregated scaladoc and attaches it to the project for distribution.
    • Field Detail

      • DEFAULT_INCLUDES

        private static final java.lang.String[] DEFAULT_INCLUDES
      • DEFAULT_EXCLUDES

        private static final java.lang.String[] DEFAULT_EXCLUDES
      • jarArchiver

        @Component(role=org.codehaus.plexus.archiver.Archiver.class,
                   hint="jar")
        private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
        The Jar archiver.
      • projectHelper

        @Component
        private org.apache.maven.project.MavenProjectHelper projectHelper
        Used for attaching the artifact in the project.
      • finalName

        @Parameter(property="project.build.finalName")
        private java.lang.String finalName
        Specifies the filename that will be used for the generated jar file. Please note that -javadoc or -test-javadoc will be appended to the file name.
      • attach

        @Parameter(property="attach",
                   defaultValue="true")
        private boolean attach
        Specifies whether to attach the generated artifact to the project helper.
      • classifier

        @Parameter(property="classifier",
                   defaultValue="javadoc")
        private java.lang.String classifier
        Specifies the classifier of the generated artifact.
      • skip

        @Parameter(property="skip",
                   defaultValue="false")
        private boolean skip
        Specifies whether to skip generating scaladoc.
      • jarOutputDirectory

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

        @Parameter
        private org.apache.maven.archiver.MavenArchiveConfiguration archive
        The archive configuration to use. See Maven Archiver Reference.
      • defaultManifestFile

        @Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF",
                   required=true,
                   readonly=true)
        private java.io.File defaultManifestFile
        Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.
      • useDefaultManifestFile

        @Parameter(defaultValue="false")
        private boolean useDefaultManifestFile
        Set this to true to enable the use of the defaultManifestFile.
      • failOnError

        @Parameter(property="maven.javadoc.failOnError",
                   defaultValue="true")
        protected boolean failOnError
        Specifies if the build will fail if there are errors during javadoc execution or not.
        Since:
        2.5
    • Constructor Detail

      • ScalaDocJarMojo

        public ScalaDocJarMojo()
    • Method Detail

      • doExecute

        public void doExecute()
                       throws java.lang.Exception
        Overrides:
        doExecute in class ScalaDocMojo
        Throws:
        java.lang.Exception
      • generateArchive

        private java.io.File generateArchive​(java.io.File javadocFiles,
                                             java.lang.String jarFileName)
                                      throws org.codehaus.plexus.archiver.ArchiverException,
                                             java.io.IOException
        Method that creates the jar file
        Parameters:
        javadocFiles - the directory where the generated jar file will be put
        jarFileName - the filename of the generated jar file
        Returns:
        a File object that contains the generated jar file
        Throws:
        org.codehaus.plexus.archiver.ArchiverException
        java.io.IOException
      • getClassifier

        protected java.lang.String getClassifier()
      • failOnError

        protected void failOnError​(java.lang.String prefix,
                                   java.lang.Exception e)
                            throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException