source:test-jar

Full name:

org.apache.maven.plugins:maven-source-plugin:4.0.0-beta-1:test-jar

Description:

This plugin bundles all the test sources into a jar archive.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 2.0.3.
  • Binds by default to the lifecycle phase: package.
  • Invokes the execution of the following lifecycle phase prior to executing itself: generate-sources.

Required Parameters

Name Type Since Description
<defaultManifestFile> Path 2.1 Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.

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 - Specifies whether to attach the artifact to the project
<classifier> String 2.2 No description.
<excludeResources> boolean 2.0.4 Specifies whether 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.
<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 - 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.
<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.
<includePom> boolean 2.1 Specifies whether to include the POM file in the sources-jar.
<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> Path - The directory where the generated archive file will be put.
<outputTimestamp> String 3.2.0 Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
<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.
<useDefaultExcludes> boolean 2.1 Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()
<useDefaultManifestFile> boolean 2.1 Set this to true to enable the use of the defaultManifestFile.

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 to attach the artifact to the project
  • Type: boolean
  • Required: No

<classifier>

No description.
  • Type: java.lang.String
  • Since: 2.2
  • Required: No

<defaultManifestFile>

Path to the default MANIFEST file to use. It will be used if useDefaultManifestFile is set to true.
  • Type: java.nio.file.Path
  • Since: 2.1
  • Required: Yes

<excludeResources>

Specifies whether 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

<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
  • Required: No

<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

<includePom>

Specifies whether to include the POM file in the sources-jar.
  • Type: boolean
  • Since: 2.1
  • Required: No

<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.nio.file.Path
  • Required: No

<outputTimestamp>

Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
  • Type: java.lang.String
  • Since: 3.2.0
  • Required: No

<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

<useDefaultExcludes>

Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()
  • Type: boolean
  • Since: 2.1
  • Required: No

<useDefaultManifestFile>

Set this to true to enable the use of the defaultManifestFile.
  • Type: boolean
  • Since: 2.1
  • Required: No