de.smartics.maven.plugin.buildmetadata
Class BuildReportMojo

Package class diagram package BuildReportMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by de.smartics.maven.plugin.buildmetadata.AbstractReportMojo
              extended by de.smartics.maven.plugin.buildmetadata.BuildReportMojo
All Implemented Interfaces:
ContextEnabled, Mojo, MavenReport

public final class BuildReportMojo
     
     
extends AbstractReportMojo

Generates a report about the meta data provided to the build.

Since:
1.0
maven-goal:
buildmetadata-report
maven-phase:
site
maven-requiresProject:
maven-description:
Generates a report on the build meta data.

Field Summary
protected  List<Property> properties
          The list of a system properties or environment variables to be selected by the user to include into the build meta data properties.
protected  List<FileMapping> propertyOutputFileMapping
          Maps a packaging to a location for the build meta data properties file.
 
Fields inherited from class de.smartics.maven.plugin.buildmetadata.AbstractReportMojo
factory, locale, localRepository, logLevel, outputDirectory, project, resolver, siteRenderer, skip
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
BuildReportMojo()
           
 
Method Summary
 boolean canGenerateReport()
          
 void execute()
          Runs the report generation.
protected  void executeReport(Locale locale)
          
 String getDescription(Locale locale)
          
 String getName(Locale locale)
          
 String getOutputName()
          
protected  void init()
          Initializes the Mojo.
 
Methods inherited from class de.smartics.maven.plugin.buildmetadata.AbstractReportMojo
getBundle, getOutputDirectory, getProject, getSiteRenderer, provideSink
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, generate, getCategoryName, getReportOutputDirectory, getSink, isExternalReport, setReportOutputDirectory
 
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
 

Field Detail

propertyOutputFileMapping

protected List<FileMapping> propertyOutputFileMapping
Maps a packaging to a location for the build meta data properties file.

This mapping is especially useful for multi projects.

Since:
1.1

properties

protected List<Property> properties
The list of a system properties or environment variables to be selected by the user to include into the build meta data properties.

The name is the name of the property, the section is relevant for placing the property in one of the following sections:

If no valid section is given, the property is silently rendered in the build.misc section.

Since:
1.0
Constructor Detail

BuildReportMojo

public BuildReportMojo()
Method Detail

getName

public String getName(Locale locale)

See Also:
MavenReport.getName(java.util.Locale)

getDescription

public String getDescription(Locale locale)

See Also:
MavenReport.getDescription(java.util.Locale)

getOutputName

public String getOutputName()

See Also:
MavenReport.getOutputName()

execute

public void execute()
             throws MojoExecutionException
Runs the report generation.

Specified by:
execute in interface Mojo
Overrides:
execute in class AbstractReportMojo
Throws:
MojoExecutionException - on any problem encountered.

init

protected void init()
Initializes the Mojo.


executeReport

protected void executeReport(Locale locale)
                      throws MavenReportException

Configures the plugin logger.

Overrides:
executeReport in class AbstractReportMojo
Throws:
MavenReportException
See Also:
AbstractMavenReport.executeReport(java.util.Locale)

canGenerateReport

public boolean canGenerateReport()

Returns false if the properties file that contains the build information cannot be read.

Specified by:
canGenerateReport in interface MavenReport
Overrides:
canGenerateReport in class AbstractReportMojo
See Also:
AbstractMavenReport.canGenerateReport()


Copyright © 2006-2012 Kronseder & Reiner GmbH - smartics. All Rights Reserved.