contentcheck:check

Full name:

net.kozelka.maven:contentcheck-maven-plugin:1.0-SNAPSHOT:check

Description:

Checks the archive content according to an authoritative source. This authoritative source defines set of allowed files in the archive.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.0.0.
  • Binds by default to the lifecycle phase: verify.

Optional Parameters

Name Type Since Description
archive File 1.0.0 Deprecated. use sourceFile instead
checkFilesPattern String 1.0.0 Ant like file pattern selecting archive entries (files) to include in the check.
Default value is: **/*.jar.
contentListing File 1.0.0 The file with list of approved files. If such file does not exist, the check is skipped. This enables multimodule use. Each line in represents one pathname entry. Empty lines and comments (starting with '#') are ignored.
Default value is: ${basedir}/approved-content.txt.
contentListingGenerated File 1.0.0 Where to generate content listing. Can be used to fix or initiate the approved-content.txt file.
Default value is: ${project.build.directory}/contentcheck-maven-plugin/approved-content.txt.
directory File 1.0.3 Deprecated. use sourceFile instead
failOnMissing boolean 1.0.0 If true, stops the build when there is any file missing.
Default value is: false.
failOnUnexpected boolean 1.0.0 If true, stops the build when there is any unexpected file.
Default value is: true.
ignoreVendorArchives boolean 1.0.0 If true, doesn't check vendor JAR files. A vendor JAR file is determined by a value (vendorId) in its manifest key (manifestVendorEntry).
Default value is: false.
User property is: ignoreVendorArchives.
manifestVendorEntry String 1.0.0 The name of manifest entry that holds vendor's identification
Default value is: Implementation-Vendor-Id.
msgMissing String 1.0.0 Message used to report missing entry - uses the Formatter syntax to embed entry name.
Default value is: File is expected but not found: %s.
msgUnexpected String 1.0.0 Message used to report unexpected entry - uses the Formatter syntax to embed entry name.
Default value is: Found unexpected file: %s.
skip boolean 1.0.0 If true, no check is performed.
Default value is: false.
User property is: contentcheck.skip.
sourceFile File 1.0.4 The archive file or directory to be checked.
Default value is: ${project.build.directory}/${project.build.finalName}.${project.packaging}.
User property is: source.file.
vendorId String 1.0.0 The vendor identification. This value is used for JAR's manifest checking when ignoreVendorArchives is turned on. Using the same groupId for all modules in your project can be beneficial for proper verdor archive detection.
Default value is: ${project.groupId}.

Parameter Details

archive:

Deprecated. use sourceFile instead
(no description)
  • Type: java.io.File
  • Since: 1.0.0
  • Required: No

checkFilesPattern:

Ant like file pattern selecting archive entries (files) to include in the check.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • Default: **/*.jar

contentListing:

The file with list of approved files. If such file does not exist, the check is skipped. This enables multimodule use. Each line in represents one pathname entry. Empty lines and comments (starting with '#') are ignored.
  • Type: java.io.File
  • Since: 1.0.0
  • Required: No
  • Default: ${basedir}/approved-content.txt

contentListingGenerated:

Where to generate content listing. Can be used to fix or initiate the approved-content.txt file.
  • Type: java.io.File
  • Since: 1.0.0
  • Required: No
  • Default: ${project.build.directory}/contentcheck-maven-plugin/approved-content.txt

directory:

Deprecated. use sourceFile instead
(no description)
  • Type: java.io.File
  • Since: 1.0.3
  • Required: No

failOnMissing:

If true, stops the build when there is any file missing.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • Default: false

failOnUnexpected:

If true, stops the build when there is any unexpected file.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • Default: true

ignoreVendorArchives:

If true, doesn't check vendor JAR files. A vendor JAR file is determined by a value (vendorId) in its manifest key (manifestVendorEntry).
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • User Property: ignoreVendorArchives
  • Default: false

manifestVendorEntry:

The name of manifest entry that holds vendor's identification
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • Default: Implementation-Vendor-Id

msgMissing:

Message used to report missing entry - uses the Formatter syntax to embed entry name.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • Default: File is expected but not found: %s

msgUnexpected:

Message used to report unexpected entry - uses the Formatter syntax to embed entry name.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • Default: Found unexpected file: %s

skip:

If true, no check is performed.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • User Property: contentcheck.skip
  • Default: false

sourceFile:

The archive file or directory to be checked.
  • Type: java.io.File
  • Since: 1.0.4
  • Required: No
  • User Property: source.file
  • Default: ${project.build.directory}/${project.build.finalName}.${project.packaging}

vendorId:

The vendor identification. This value is used for JAR's manifest checking when ignoreVendorArchives is turned on. Using the same groupId for all modules in your project can be beneficial for proper verdor archive detection.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • Default: ${project.groupId}