Class AbstractBuildinfoMojo
- java.lang.Object
 - 
- org.apache.maven.plugin.AbstractMojo
 - 
- org.apache.maven.plugins.artifact.buildinfo.AbstractBuildinfoMojo
 
 
 
- 
- All Implemented Interfaces:
 org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
 BuildinfoMojo,CompareMojo,DescribeBuildOutputMojo
public abstract class AbstractBuildinfoMojo extends org.apache.maven.plugin.AbstractMojoBase buildinfo-generating class, for goals related to Reproducible Builds.buildinfofiles.- Since:
 - 3.2.0
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected FilebuildinfoFileLocation of the generated buildinfo file.protected StringoutputTimestampTimestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXXor as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).protected org.apache.maven.project.MavenProjectprojectThe Maven project.protected org.apache.maven.rtinfo.RuntimeInformationrtInformationprotected org.apache.maven.execution.MavenSessionsessionThe current build session instance. 
- 
Constructor Summary
Constructors Constructor Description AbstractBuildinfoMojo() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopyAggregateToRoot(File aggregate)voidexecute()protected Map<org.eclipse.aether.artifact.Artifact,String>generateBuildinfo(boolean mono)Generate buildinfo file.protected org.apache.maven.project.MavenProjectgetExecutionRoot()protected booleanisSkip(org.apache.maven.project.MavenProject project)protected org.apache.maven.plugins.artifact.buildinfo.BuildInfoWriternewBuildInfoWriter(PrintWriter p, boolean mono)protected voidskip(org.apache.maven.project.MavenProject last) 
 - 
 
- 
- 
Field Detail
- 
project
@Component protected org.apache.maven.project.MavenProject project
The Maven project. 
- 
buildinfoFile
@Parameter(defaultValue="${project.build.directory}/${project.artifactId}-${project.version}.buildinfo", required=true, readonly=true) protected File buildinfoFileLocation of the generated buildinfo file. 
- 
session
@Component protected org.apache.maven.execution.MavenSession session
The current build session instance. This is used for toolchain manager API calls. 
- 
outputTimestamp
@Parameter(defaultValue="${project.build.outputTimestamp}") protected String outputTimestampTimestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXXor as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Since:
 - 3.2.0
 
 
- 
rtInformation
@Component protected org.apache.maven.rtinfo.RuntimeInformation rtInformation
 
 - 
 
- 
Method Detail
- 
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
 org.apache.maven.plugin.MojoExecutionException
 
- 
skip
protected void skip(org.apache.maven.project.MavenProject last) throws org.apache.maven.plugin.MojoExecutionException- Throws:
 org.apache.maven.plugin.MojoExecutionException
 
- 
copyAggregateToRoot
protected void copyAggregateToRoot(File aggregate) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
 org.apache.maven.plugin.MojoExecutionException
 
- 
newBuildInfoWriter
protected org.apache.maven.plugins.artifact.buildinfo.BuildInfoWriter newBuildInfoWriter(PrintWriter p, boolean mono)
 
- 
generateBuildinfo
protected Map<org.eclipse.aether.artifact.Artifact,String> generateBuildinfo(boolean mono) throws org.apache.maven.plugin.MojoExecutionException
Generate buildinfo file.- Parameters:
 mono- is it a mono-module build?- Returns:
 - a Map of artifacts added to the build info with their associated property key prefix
         (
outputs.[#module.].#artifact) - Throws:
 org.apache.maven.plugin.MojoExecutionException- if anything goes wrong
 
- 
getExecutionRoot
protected org.apache.maven.project.MavenProject getExecutionRoot()
 
- 
isSkip
protected boolean isSkip(org.apache.maven.project.MavenProject project)
 
 - 
 
 -