bom-builder:build-bom
Full name:
eu.maveniverse.maven.plugins:bom-builder3:1.1.1:build-bom
Description:
Generates a BOM based on the project/reactor and dependencies. The generated BOM may be attached to project w/ classifier (for Maven 4 consumers) or it may replace a given subproject POM (if it is packaging=pom and have no subprojects).
This Mojo is affected if it needs "whole reactor" but reactor is limited in any way (ie -r or alike option used).
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
compile
. - The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
generate-resources
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<bomArtifactId> |
String |
- |
BOM artifactId, by default current project artifactId. Default: ${project.artifactId} User Property: bom.artifactId |
<bomGroupId> |
String |
- |
BOM groupId, by default current project groupId. Default: ${project.groupId} User Property: bom.groupId |
<bomVersion> |
String |
- |
BOM version, by default current project version. Default: ${project.version} User Property: bom.version |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<addVersionProperties> |
boolean |
- |
Whether to add collected versions to BOM properties. See also: usePropertiesForVersion |
<allProjects> |
List<MavenProject> |
- |
All projects from reactor Default: ${session.allProjects} |
<attach> |
boolean |
- |
Should the generated BOM be attached to project? See bomClassifier . Note: if this parameter is true , the generated BOM will be attached using given classifier OR will replace module POM. To replace, the project must fulfil certain requirements:
bomClassifier is not set, and current project does not fulfil these requirements, the mojo will fail the build.User Property: bom.attach |
<bomClassifier> |
String |
- |
BOM classifier, optional. If not specified, and attach is set, will replace current module POM.User Property: bom.classifier |
<bomDescription> |
String |
- |
BOM description. User Property: bom.description |
<bomName> |
String |
- |
BOM name. User Property: bom.name |
<bomParentGav> |
String |
- |
BOM parent GAV, in form for G:A:V . If specified, the GAV will be set as parent of generated BOM. See also useProjectParentAsParent . |
<dependencyExclusions> |
List<DependencyExclusion> |
- |
List of dependencies which should be excluded from BOM. |
<directDependencies> |
BuildBomMojo$Scope |
1.1.1 |
The direct dependencies to be included in generated BOM. Possible values and their meaning:
Default: NONE User Property: bom.directDependencies |
<exclusions> |
List<BomExclusion> |
- |
Whether the BOM should include the dependency exclusions that are present in the source POM. By default, the exclusions will not be copied to the new BOM. |
<includePoms> |
boolean |
- |
Whether generated BOM contain reactor artifacts with packaging "pom" as well, when a reactorDependencies value is set that pulls in reactor artifacts.User Property: bom.includePoms |
<mavenProject> |
MavenProject |
- |
The current project Default: ${project} |
<outputFilename> |
String |
- |
BOM output file. If relative, is resolved from ${project.build } directory.Default: bom-pom.xml |
<reactorDependencies> |
BuildBomMojo$Scope |
1.1.1 |
The projects of the reactor to be included in generated BOM. Possible values and their meaning:
includePoms .Default: REACTOR User Property: bom.reactorDependencies |
<transitiveDependencies> |
BuildBomMojo$Scope |
1.1.1 |
The transitive dependencies to be included in generated BOM. Possible values and their meaning:
Default: NONE User Property: bom.transitiveDependencies |
<useProjectParentAsParent> |
boolean |
- |
Should the generated BOM use project parent, if applicable, as parent? Ignored if bomParentGav specified.User Property: bom.useProjectParentAsParent |
<usePropertiesForVersion> |
boolean |
- |
Whether to use properties to specify dependency versions in BOM. This will also add properties to BOM with dependency versions. See also: addVersionProperties User Property: bom.usePropertiesForVersion |
Parameter Details
<addVersionProperties>
Whether to add collected versions to BOM properties.
See also: usePropertiesForVersion
See also: usePropertiesForVersion
- Type:
boolean
- Required:
No
<allProjects>
All projects from reactor
- Type:
java.util.List<org.apache.maven.project.MavenProject>
- Required:
No
- Default:
${session.allProjects}
<attach>
Should the generated BOM be attached to project? See
bomClassifier
. Note: if this parameter is true
, the generated BOM will be attached using given classifier OR will replace module POM. To replace, the project must fulfil certain requirements:
- The project must have packaging "pom"
- The project must NOT have subprojects (modules)
bomClassifier
is not set, and current project does not fulfil these requirements, the mojo will fail the build.- Type:
boolean
- Required:
No
- User Property:
bom.attach
<bomArtifactId>
BOM artifactId, by default current project artifactId.
- Type:
java.lang.String
- Required:
Yes
- User Property:
bom.artifactId
- Default:
${project.artifactId}
<bomClassifier>
BOM classifier, optional. If not specified, and
attach
is set, will replace current module POM.- Type:
java.lang.String
- Required:
No
- User Property:
bom.classifier
<bomDescription>
BOM description.
- Type:
java.lang.String
- Required:
No
- User Property:
bom.description
<bomGroupId>
BOM groupId, by default current project groupId.
- Type:
java.lang.String
- Required:
Yes
- User Property:
bom.groupId
- Default:
${project.groupId}
<bomName>
BOM name.
- Type:
java.lang.String
- Required:
No
- User Property:
bom.name
<bomParentGav>
BOM parent GAV, in form for
G:A:V
. If specified, the GAV will be set as parent of generated BOM. See also useProjectParentAsParent
.- Type:
java.lang.String
- Required:
No
<bomVersion>
BOM version, by default current project version.
- Type:
java.lang.String
- Required:
Yes
- User Property:
bom.version
- Default:
${project.version}
<dependencyExclusions>
List of dependencies which should be excluded from BOM.
- Type:
java.util.List<eu.maneniverse.maven.plugins.bombuilder.DependencyExclusion>
- Required:
No
<directDependencies>
The direct dependencies to be included in generated BOM. Possible values and their meaning:
- NONE - will result that no direct dependencies are included in BOM.
- REACTOR - will include whole reactor direct dependencies into BOM. Warning: if reactor is any way "limited", it will affect this mojo output!
- CURRENT_PROJECT - will include direct dependencies of only current project into BOM.
- Type:
eu.maneniverse.maven.plugins.bombuilder.BuildBomMojo$Scope
- Since:
1.1.1
- Required:
No
- User Property:
bom.directDependencies
- Default:
NONE
<exclusions>
Whether the BOM should include the dependency exclusions that are present in the source POM. By default, the exclusions will not be copied to the new BOM.
- Type:
java.util.List<eu.maneniverse.maven.plugins.bombuilder.BomExclusion>
- Required:
No
<includePoms>
Whether generated BOM contain reactor artifacts with packaging "pom" as well, when a
reactorDependencies
value is set that pulls in reactor artifacts.- Type:
boolean
- Required:
No
- User Property:
bom.includePoms
<mavenProject>
The current project
- Type:
org.apache.maven.project.MavenProject
- Required:
No
- Default:
${project}
<outputFilename>
BOM output file. If relative, is resolved from
${project.build
} directory.- Type:
java.lang.String
- Required:
No
- Default:
bom-pom.xml
<reactorDependencies>
The projects of the reactor to be included in generated BOM. Possible values and their meaning:
- NONE - will result that no reactor project are included in BOM.
- REACTOR - will include whole reactor into BOM. Warning: if reactor is any way "limited", it will affect this mojo output!
- CURRENT_PROJECT - will include only current project into BOM.
includePoms
.- Type:
eu.maneniverse.maven.plugins.bombuilder.BuildBomMojo$Scope
- Since:
1.1.1
- Required:
No
- User Property:
bom.reactorDependencies
- Default:
REACTOR
<transitiveDependencies>
The transitive dependencies to be included in generated BOM. Possible values and their meaning:
- NONE - will result that no transitive dependencies are included in BOM.
- REACTOR - will include whole reactor transitive dependencies into BOM. Warning: if reactor is any way "limited", it will affect this mojo output!
- CURRENT_PROJECT - will include transitive dependencies of only current project into BOM.
- Type:
eu.maneniverse.maven.plugins.bombuilder.BuildBomMojo$Scope
- Since:
1.1.1
- Required:
No
- User Property:
bom.transitiveDependencies
- Default:
NONE
<useProjectParentAsParent>
Should the generated BOM use project parent, if applicable, as parent? Ignored if
bomParentGav
specified.- Type:
boolean
- Required:
No
- User Property:
bom.useProjectParentAsParent
<usePropertiesForVersion>
Whether to use properties to specify dependency versions in BOM. This will also add properties to BOM with dependency versions.
See also: addVersionProperties
See also: addVersionProperties
- Type:
boolean
- Required:
No
- User Property:
bom.usePropertiesForVersion