source:jar-no-fork

Full name:

org.apache.maven.plugins:maven-source-plugin:3.1.0:jar-no-fork

Description:

This goal bundles all the sources into a jar archive. This goal functions the same as the jar goal but does not fork the build and is suitable for attaching to the build lifecycle.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 2.1.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
<defaultManifestFile> File 2.1 Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.
Default value is: ${project.build.outputDirectory}/META-INF/MANIFEST.MF.

Optional Parameters

Name Type Since Description
<archive> MavenArchiveConfiguration 2.1 The archive configuration to use. See Maven Archiver Reference.
Note: Since 3.0.0 the resulting archives contain a maven descriptor. If you need to suppress the generation of the maven descriptor you can simply achieve this by using the archiver configuration..
<attach> boolean 2.1 Specifies whether or not to attach the artifact to the project
Default value is: true.
User property is: maven.source.attach.
<classifier> String 2.2 (no description)
Default value is: sources.
User property is: maven.source.classifier.
<excludeResources> boolean 2.0.4 Specifies whether or not to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.
Default value is: false.
User property is: maven.source.excludeResources.
<excludes> String[] 2.1 List of files to exclude. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.
<finalName> String 2.1 The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this filename. For the source:test-jar goal, "-test-sources" is appended.
Default value is: ${project.build.finalName}.
<forceCreation> boolean 2.1 Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, the jar will only be created when the sources are newer than the jar.
Default value is: false.
User property is: maven.source.forceCreation.
<includePom> boolean 2.1 Specifies whether or not to include the POM file in the sources-jar.
Default value is: false.
User property is: maven.source.includePom.
<includes> String[] 2.1 List of files to include. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.
<outputDirectory> File 2.1 The directory where the generated archive file will be put.
Default value is: ${project.build.directory}.
<skipSource> boolean 2.2 A flag used to disable the source procedure. This is primarily intended for usage from the command line to occasionally adjust the build.
Default value is: false.
User property is: maven.source.skip.
<useDefaultExcludes> boolean 2.1 Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()
Default value is: true.
User property is: maven.source.useDefaultExcludes.
<useDefaultManifestFile> boolean 2.1 Set this to true to enable the use of the defaultManifestFile.

Default value is: false.
User property is: maven.source.useDefaultManifestFile.

Parameter Details

<archive>

The archive configuration to use. See Maven Archiver Reference.
Note: Since 3.0.0 the resulting archives contain a maven descriptor. If you need to suppress the generation of the maven descriptor you can simply achieve this by using the archiver configuration..
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Since: 2.1
  • Required: No

<attach>

Specifies whether or not to attach the artifact to the project
  • Type: boolean
  • Since: 2.1
  • Required: No
  • User Property: maven.source.attach
  • Default: true

<classifier>

(no description)
  • Type: java.lang.String
  • Since: 2.2
  • Required: No
  • User Property: maven.source.classifier
  • Default: sources

<defaultManifestFile>

Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.
  • Type: java.io.File
  • Since: 2.1
  • Required: Yes
  • Default: ${project.build.outputDirectory}/META-INF/MANIFEST.MF

<excludeResources>

Specifies whether or not to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.
  • Type: boolean
  • Since: 2.0.4
  • Required: No
  • User Property: maven.source.excludeResources
  • Default: false

<excludes>

List of files to exclude. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.
  • Type: java.lang.String[]
  • Since: 2.1
  • Required: No

<finalName>

The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this filename. For the source:test-jar goal, "-test-sources" is appended.
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • Default: ${project.build.finalName}

<forceCreation>

Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, the jar will only be created when the sources are newer than the jar.
  • Type: boolean
  • Since: 2.1
  • Required: No
  • User Property: maven.source.forceCreation
  • Default: false

<includePom>

Specifies whether or not to include the POM file in the sources-jar.
  • Type: boolean
  • Since: 2.1
  • Required: No
  • User Property: maven.source.includePom
  • Default: false

<includes>

List of files to include. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.
  • Type: java.lang.String[]
  • Since: 2.1
  • Required: No

<outputDirectory>

The directory where the generated archive file will be put.
  • Type: java.io.File
  • Since: 2.1
  • Required: No
  • Default: ${project.build.directory}

<skipSource>

A flag used to disable the source procedure. This is primarily intended for usage from the command line to occasionally adjust the build.
  • Type: boolean
  • Since: 2.2
  • Required: No
  • User Property: maven.source.skip
  • Default: false

<useDefaultExcludes>

Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()
  • Type: boolean
  • Since: 2.1
  • Required: No
  • User Property: maven.source.useDefaultExcludes
  • Default: true

<useDefaultManifestFile>

Set this to true to enable the use of the defaultManifestFile.
  • Type: boolean
  • Since: 2.1
  • Required: No
  • User Property: maven.source.useDefaultManifestFile
  • Default: false