Fork me on GitHub

flatten:flatten

Full name:

com.carrotgarden.maven:flatten-maven-plugin:1.7.20200503170847:flatten

Description:

Simplify Maven project pom.xml descriptor for publication.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: prepare-package.

Optional Parameters

Name Type Since Description
<encoding> String - Default pom.xml encoding java charset name for text operations. Used when not defined in pom.xml.
Default value is: UTF-8.
User property is: flatten.encoding.
<memberRemoveList> String[] - List of pom.xml model members to remove. Used by performRemoveMembers.
User property is: flatten.memberRemoveList.
<overrideArtifactId> String - Override project artifact id via performOverrideIdentity.
Default value is: ${project.artifactId}.
User property is: flatten.overrideArtifactId.
<overrideGroupId> String - Override project group id via performOverrideIdentity.
Default value is: ${project.groupId}.
User property is: flatten.overrideGroupId.
<packagingSwitchList> String[] - List of project packaging types that trigger pom.xml switch for publication. Used by performSwitchPomXml.
Default value is: jar,war,ear,bundle,maven-plugin.
User property is: flatten.packagingSwitchList.
<performDependencyResolve> boolean - Execution step 1. Invoke maven-dependency-plugin:resolve to resolve and filter project dependencies with includeScope, ecludeTransitive. Alternative to step 2.
Default value is: true.
User property is: flatten.performDependencyResolve.
<performEraseScopes> boolean - Execution step 2. Erase dependency by scope names defined in scopeEraseList. Alternative to step 1.
Default value is: false.
User property is: flatten.performEraseScopes.
<performOverrideIdentity> boolean - Execution step 4. Override project maven identity with: overrideGroupId overrideArtifactId
Default value is: false.
User property is: flatten.performOverrideIdentity.
<performRemoveMembers> boolean - Execution step 3. Remove pom.xml members matched by xml tag names defined in the memberRemoveList.
Default value is: true.
User property is: flatten.performRemoveMembers.
<performSwitchPomXml> boolean - Execution step 5. Replace project pom.xml with generated flattened pom.xml for publication. Actual switch depends on condition packagingSwitchList.
Default value is: true.
User property is: flatten.performSwitchPomXml.
<resolveExclusions> boolean - Propagate dependency exclusions during performDependencyResolve.
Default value is: true.
User property is: flatten.resolveExclusions.
<scopeEraseList> String[] - Erase dependencies based on artifact scope. Used by performEraseScopes.
Default value is: test.
User property is: flatten.scopeEraseList.
<skip> boolean - Flag to skip this goal execution.
Default value is: false.
User property is: flatten.skip.
<targetPomFile> File - Absolute file path for the generated flattened pom.xml. Main output produced by this goal.
Default value is: ${project.build.directory}/flatten/pom.xml.flatten.
User property is: flatten.targetPomFile.

Parameter Details

<encoding>

Default pom.xml encoding java charset name for text operations. Used when not defined in pom.xml.
  • Type: java.lang.String
  • Required: No
  • User Property: flatten.encoding
  • Default: UTF-8

<memberRemoveList>

List of pom.xml model members to remove. Used by performRemoveMembers.
  • Type: java.lang.String[]
  • Required: No
  • User Property: flatten.memberRemoveList

<overrideArtifactId>

Override project artifact id via performOverrideIdentity.
  • Type: java.lang.String
  • Required: No
  • User Property: flatten.overrideArtifactId
  • Default: ${project.artifactId}

<overrideGroupId>

Override project group id via performOverrideIdentity.
  • Type: java.lang.String
  • Required: No
  • User Property: flatten.overrideGroupId
  • Default: ${project.groupId}

<packagingSwitchList>

List of project packaging types that trigger pom.xml switch for publication. Used by performSwitchPomXml.
  • Type: java.lang.String[]
  • Required: No
  • User Property: flatten.packagingSwitchList
  • Default: jar,war,ear,bundle,maven-plugin

<performDependencyResolve>

Execution step 1. Invoke maven-dependency-plugin:resolve to resolve and filter project dependencies with includeScope, ecludeTransitive. Alternative to step 2.
  • Type: boolean
  • Required: No
  • User Property: flatten.performDependencyResolve
  • Default: true

<performEraseScopes>

Execution step 2. Erase dependency by scope names defined in scopeEraseList. Alternative to step 1.
  • Type: boolean
  • Required: No
  • User Property: flatten.performEraseScopes
  • Default: false

<performOverrideIdentity>

Execution step 4. Override project maven identity with: overrideGroupId overrideArtifactId
  • Type: boolean
  • Required: No
  • User Property: flatten.performOverrideIdentity
  • Default: false

<performRemoveMembers>

Execution step 3. Remove pom.xml members matched by xml tag names defined in the memberRemoveList.
  • Type: boolean
  • Required: No
  • User Property: flatten.performRemoveMembers
  • Default: true

<performSwitchPomXml>

Execution step 5. Replace project pom.xml with generated flattened pom.xml for publication. Actual switch depends on condition packagingSwitchList.
  • Type: boolean
  • Required: No
  • User Property: flatten.performSwitchPomXml
  • Default: true

<resolveExclusions>

Propagate dependency exclusions during performDependencyResolve.
  • Type: boolean
  • Required: No
  • User Property: flatten.resolveExclusions
  • Default: true

<scopeEraseList>

Erase dependencies based on artifact scope. Used by performEraseScopes.
  • Type: java.lang.String[]
  • Required: No
  • User Property: flatten.scopeEraseList
  • Default: test

<skip>

Flag to skip this goal execution.
  • Type: boolean
  • Required: No
  • User Property: flatten.skip
  • Default: false

<targetPomFile>

Absolute file path for the generated flattened pom.xml. Main output produced by this goal.
  • Type: java.io.File
  • Required: No
  • User Property: flatten.targetPomFile
  • Default: ${project.build.directory}/flatten/pom.xml.flatten