Class LicensesReport

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.apache.maven.report.projectinfo.AbstractProjectInfoReport
org.apache.maven.report.projectinfo.LicensesReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenMultiPageReport, org.apache.maven.reporting.MavenReport

@Mojo(name="licenses") public class LicensesReport extends AbstractProjectInfoReport
Generates the Project Licenses report.
Since:
2.0
Author:
Vincent Siveton
  • Constructor Details

    • LicensesReport

      @Inject public LicensesReport(org.apache.maven.repository.RepositorySystem repositorySystem, org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.project.ProjectBuilder projectBuilder)
  • Method Details

    • canGenerateReport

      public boolean canGenerateReport() throws org.apache.maven.reporting.MavenReportException
      Specified by:
      canGenerateReport in interface org.apache.maven.reporting.MavenReport
      Overrides:
      canGenerateReport in class AbstractProjectInfoReport
      Throws:
      org.apache.maven.reporting.MavenReportException
    • executeReport

      public void executeReport(Locale locale)
      Specified by:
      executeReport in class org.apache.maven.reporting.AbstractMavenReport
    • getOutputName

      public String getOutputName()
    • getI18Nsection

      protected String getI18Nsection()
      Specified by:
      getI18Nsection in class AbstractProjectInfoReport
      Returns:
      The according string for the section.
    • getLicenseURL

      protected static URL getLicenseURL(org.apache.maven.project.MavenProject project, String url) throws IOException
      Parameters:
      project - not null
      url - not null
      Returns:
      a valid URL object from the url string
      Throws:
      IOException - if any