Fork me on GitHub

inline:inline

Full name:

org.basepom.maven:inline-maven-plugin:1.3.0:inline

Description:

Inlines one or more dependencies of the project, relocated the classes and writes a new artifact.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
<prefix> String - Defines the package prefix for all relocated classes. This prefix must be a valid package name. All relocated classes are put under this prefix.
User Property: inline.prefix

Optional Parameters

Name Type Since Description
<additionalProcessors> List<String> - Adds external jar processors. These must be on the dependency path for the plugin. See the "Additional Processors" documentation.
<excludes> List<ArtifactIdentifier> - Exclude dependencies from inclusion. A dependency is given as groupId:artifactId. Any transitive dependency that has been pulled in can be excluded here. The wildcard character '*' is supported for group id and artifact id.

Includes and excludes operate on the list of potential dependencies to inline. They can not be used to add additional dependencies that are not listed in the <inlineDependency> elements.

<failOnDuplicate> boolean - Fail if any duplicate exists after processing the contents.
Default: true
User Property: inline.failOnDuplicate
<failOnNoMatch> boolean - Fail if an inline dependency is defined but the corresponding dependency is not actually found.
Default: true
User Property: inline.failOnNoMatch
<hideClasses> boolean - Hide inlined classes from IDE autocompletion.
Default: true
User Property: inline.hide-classes
<includes> List<ArtifactIdentifier> - Include dependencies. A dependency is given as groupId:artifactId. The wildcard character '*' is supported for group id and artifact id.

Includes and excludes operate on the list of potential dependencies to inline. They can not be used to add additional dependencies that are not listed in the <inlineDependency> elements.

<inlinedArtifactAttached> boolean - If true, attach the inlined artifact, if false replace the original artifact.
Default: false
User Property: inline.attachArtifact
<inlinedClassifierName> String - The name of the classifier used in case the inlined artifact is attached.
Default: inlined
<inlineDependencies> List<InlineDependency> - Direct dependencies to inline. Each dependency here must be listed in the project POM. Any transitive dependency is added to the final jar, unless it is in RUNTIME scope. RUNTIME dependencies become a runtime dependency of the resulting final jar unless they are listed here. In that case, they are inlined in the final jar as well.
<outputDirectory> File - The destination directory for the inlined artifact.
Default: ${project.build.directory}
<outputJarFile> File - The path to the output file for the inlined artifact. When this parameter is set, the created archive will neither replace the project's main artifact nor will it be attached. Hence, this parameter causes the parameters inlinedArtifactAttached, inlinedClassifierName to be ignored when used.
<outputPomFile> File - The path to the output file for the new POM file. When this parameter is set, the created pom file will not replace the project's pom file.
<pomFile> File - The POM file to use.
Default: ${project.file}
User Property: inline.pomFile
<quiet> boolean - Silence all non-output and non-error messages.
Default: false
User Property: inline.quiet
<replacePomFile> boolean - If true, replace the POM file with a new version that has all inlined dependencies removed. It is possible to write a POM file that works to build the jar with inlined dependencies and then use the same POM file for the resulting artifact (by having all dependencies marked as provided and ensure that those dependencies do not have additional, transitive dependencies. This tends to be error prone and it is recommended to have the plugin rewrite the POM file.
Default: true
User Property: inline.replacePomFile
<skip> boolean - Skip the execution.
Default: false
User Property: inline.skip

Parameter Details

<additionalProcessors>

Adds external jar processors. These must be on the dependency path for the plugin. See the "Additional Processors" documentation.
  • Type: java.util.List<java.lang.String>
  • Required: report.plugin.goal.no

<excludes>

Exclude dependencies from inclusion. A dependency is given as groupId:artifactId. Any transitive dependency that has been pulled in can be excluded here. The wildcard character '*' is supported for group id and artifact id.

Includes and excludes operate on the list of potential dependencies to inline. They can not be used to add additional dependencies that are not listed in the <inlineDependency> elements.

  • Type: java.util.List<org.basepom.inline.mojo.ArtifactIdentifier>
  • Required: report.plugin.goal.no

<failOnDuplicate>

Fail if any duplicate exists after processing the contents.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.failOnDuplicate
  • Default: true

<failOnNoMatch>

Fail if an inline dependency is defined but the corresponding dependency is not actually found.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.failOnNoMatch
  • Default: true

<hideClasses>

Hide inlined classes from IDE autocompletion.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.hide-classes
  • Default: true

<includes>

Include dependencies. A dependency is given as groupId:artifactId. The wildcard character '*' is supported for group id and artifact id.

Includes and excludes operate on the list of potential dependencies to inline. They can not be used to add additional dependencies that are not listed in the <inlineDependency> elements.

  • Type: java.util.List<org.basepom.inline.mojo.ArtifactIdentifier>
  • Required: report.plugin.goal.no

<inlinedArtifactAttached>

If true, attach the inlined artifact, if false replace the original artifact.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.attachArtifact
  • Default: false

<inlinedClassifierName>

The name of the classifier used in case the inlined artifact is attached.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • Default: inlined

<inlineDependencies>

Direct dependencies to inline. Each dependency here must be listed in the project POM. Any transitive dependency is added to the final jar, unless it is in RUNTIME scope. RUNTIME dependencies become a runtime dependency of the resulting final jar unless they are listed here. In that case, they are inlined in the final jar as well.
  • Type: java.util.List<org.basepom.inline.mojo.InlineDependency>
  • Required: report.plugin.goal.no

<outputDirectory>

The destination directory for the inlined artifact.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • Default: ${project.build.directory}

<outputJarFile>

The path to the output file for the inlined artifact. When this parameter is set, the created archive will neither replace the project's main artifact nor will it be attached. Hence, this parameter causes the parameters inlinedArtifactAttached, inlinedClassifierName to be ignored when used.
  • Type: java.io.File
  • Required: report.plugin.goal.no

<outputPomFile>

The path to the output file for the new POM file. When this parameter is set, the created pom file will not replace the project's pom file.
  • Type: java.io.File
  • Required: report.plugin.goal.no

<pomFile>

The POM file to use.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • User Property: inline.pomFile
  • Default: ${project.file}

<prefix>

Defines the package prefix for all relocated classes. This prefix must be a valid package name. All relocated classes are put under this prefix.
  • Type: java.lang.String
  • Required: report.plugin.goal.yes
  • User Property: inline.prefix

<quiet>

Silence all non-output and non-error messages.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.quiet
  • Default: false

<replacePomFile>

If true, replace the POM file with a new version that has all inlined dependencies removed. It is possible to write a POM file that works to build the jar with inlined dependencies and then use the same POM file for the resulting artifact (by having all dependencies marked as provided and ensure that those dependencies do not have additional, transitive dependencies. This tends to be error prone and it is recommended to have the plugin rewrite the POM file.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.replacePomFile
  • Default: true

Skip the execution.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: inline.skip
  • Default: false