Class JarLicenseMojo

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

    @Mojo(name="jar-license",
          defaultPhase=GENERATE_RESOURCES,
          requiresProject=true,
          threadSafe=true)
    public class JarLicenseMojo
    extends AbstractLicenseMojo
    Add a license file to created JAR files and, if applicable, source JAR files.

    License files are first resolved relative to the current directory. If it cannot be found there, parent directories are checked until one of the following occurs:

    • The parent directory is not part of the Maven project (does not contain a pom.xml file), and is not the root directory of the current Git project.
    • The maximum number of parent directories has been reached.
    • Constructor Summary

      Constructors 
      Constructor Description
      JarLicenseMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void processLicenseFile​(java.nio.file.Path licenseFile)  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JarLicenseMojo

        public JarLicenseMojo()