Class UpdateProjectLicenseMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="update-project-license", defaultPhase=GENERATE_RESOURCES) public class UpdateProjectLicenseMojo extends AbstractLicenseNameMojo
Updates (or creates) the main project license file according to the given license defines as AbstractLicenseNameMojo.licenseName. Can also generate a bundled license file (to avoid collision names in class-path). This file is by default generated in META-INF class-path directory.
Since:
1.0
Author:
tchemit dev@tchemit.fr
  • Field Details

    • licenseFile

      @Parameter(property="license.licenceFile", defaultValue="${basedir}/LICENSE.txt") protected File licenseFile
      Project license file to synchronize with main license defined in descriptor file.
      Since:
      1.0
    • outputDirectory

      @Parameter(property="license.outputDirectory", defaultValue="target/generated-sources/license") protected File outputDirectory
      The directory where to generate license resources. Note: This option is not available for pom module types.
      Since:
      1.0
    • generateBundle

      @Parameter(property="license.generateBundle", defaultValue="false") protected boolean generateBundle
      A flag to copy the main license file in a bundled place. This is usefull for final application to have a none confusing location to seek for the application license. If Sets to true, will copy the license file to the bundleLicensePath to outputDirectory. Note: This option is not available for pom module types.
      Since:
      1.0
    • bundleLicensePath

      @Parameter(property="license.bundleLicensePath", defaultValue="META-INF/${project.artifactId}-LICENSE.txt") protected String bundleLicensePath
      The path of the bundled license file to produce when generateBundle is on. Note: This option is not available for pom module types.
      Since:
      1.0
    • force

      @Parameter(property="license.force", defaultValue="false") protected boolean force
      A flag to force to generate project license file even if it is up-to-date.
      Since:
      1.0.0
    • skipUpdateProjectLicense

      @Parameter(property="license.skipUpdateProjectLicense", defaultValue="false") protected boolean skipUpdateProjectLicense
      A flag to skip the goal.
      Since:
      1.0
  • Constructor Details

    • UpdateProjectLicenseMojo

      public UpdateProjectLicenseMojo()
  • Method Details