@Mojo(name="check",
requiresProject=true,
threadSafe=true,
defaultPhase=VERIFY,
requiresDependencyResolution=TEST)
public final class DuplicateFinderMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
bootClasspathProperty
System property that contains the boot class path.
|
protected boolean |
checkCompileClasspath
Check resources and classes on the compile class path.
|
protected boolean |
checkRuntimeClasspath
Check resources and classes on the runtime class path.
|
protected boolean |
checkTestClasspath
Check resources and classes on the test class path.
|
protected ConflictingDependency[] |
conflictingDependencies
Artifacts with expected and resolved versions that are checked.
|
protected boolean |
failBuildInCaseOfConflict
Fail the build if any files with the same name are found.
|
protected boolean |
failBuildInCaseOfDifferentContentConflict
Fail the build if files with the same name but different content are detected.
|
protected boolean |
failBuildInCaseOfEqualContentConflict
Fail the build if files with the same name and the same content are detected.
|
protected MavenCoordinates[] |
ignoredDependencies
Dependencies that should not be checked at all.
|
protected String[] |
ignoredResourcePatterns
Ignored resources, which are not checked for multiple occurences.
|
protected String[] |
ignoredResources
Deprecated.
Use ignoredResourcePatterns.
|
protected boolean |
includeBootClasspath
Include the boot class path in duplicate detection.
|
protected boolean |
preferLocal
Whether existing local directories with classes or existing artifacts are preferred.
|
protected boolean |
printEqualFiles
Report files that have the same sha256 has value.
|
protected boolean |
quiet
Quiets the plugin (report only errors).
|
protected File |
resultFile
Output file for the result of the plugin.
|
protected int |
resultFileMinClasspathCount
Minimum occurences on the class path to be listed in the result file.
|
protected boolean |
skip
Skips the plugin execution.
|
protected boolean |
useDefaultResourceIgnoreList
Use the default resource ignore list.
|
protected boolean |
useResultFile
Write result to output file.
|
| Constructor and Description |
|---|
DuplicateFinderMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
void |
setIgnoredDependencies(org.apache.maven.model.Dependency[] dependencies) |
void |
setLog(org.apache.maven.plugin.logging.Log log) |
@Parameter(defaultValue="false",
property="duplicate-finder.printEqualFiles")
protected boolean printEqualFiles
@Parameter(defaultValue="false",
property="duplicate-finder.failBuildInCaseOfDifferentContentConflict")
protected boolean failBuildInCaseOfDifferentContentConflict
@Parameter(defaultValue="false",
property="duplicate-finder.failBuildInCaseOfEqualContentConflict")
protected boolean failBuildInCaseOfEqualContentConflict
@Parameter(defaultValue="false",
property="duplicate-finder.failBuildInCaseOfConflict")
protected boolean failBuildInCaseOfConflict
@Parameter(defaultValue="true",
property="duplicate-finder.useDefaultResourceIgnoreList")
protected boolean useDefaultResourceIgnoreList
@Deprecated @Parameter protected String[] ignoredResources
@Parameter protected String[] ignoredResourcePatterns
@Parameter(alias="exceptions") protected ConflictingDependency[] conflictingDependencies
@Parameter(alias="ignoredDependencies") protected MavenCoordinates[] ignoredDependencies
@Parameter(defaultValue="true",
property="duplicate-finder.checkCompileClasspath")
protected boolean checkCompileClasspath
@Parameter(defaultValue="true",
property="duplicate-finder.checkRuntimeClasspath")
protected boolean checkRuntimeClasspath
@Parameter(defaultValue="true",
property="duplicate-finder.checkTestClasspath")
protected boolean checkTestClasspath
@Parameter(defaultValue="false",
property="duplicate-finder.skip")
protected boolean skip
@Parameter(defaultValue="false",
property="duplicate-finder.quiet")
protected boolean quiet
@Parameter(defaultValue="true",
property="duplicate-finder.preferLocal")
protected boolean preferLocal
@Parameter(defaultValue="${project.build.directory}/duplicate-finder-result.xml",
property="duplicate-finder.resultFile")
protected File resultFile
@Parameter(defaultValue="true",
property="duplicate-finder.useResultFile")
protected boolean useResultFile
@Parameter(defaultValue="2",
property="duplicate-finder.resultFileMinClasspathCount")
protected int resultFileMinClasspathCount
@Parameter(defaultValue="false",
property="duplicate-finder.includeBootClasspath")
protected boolean includeBootClasspath
@Parameter(defaultValue="sun.boot.class.path",
property="duplicate-finder.bootClasspathProperty")
protected String bootClasspathProperty
public void setLog(org.apache.maven.plugin.logging.Log log)
setLog in interface org.apache.maven.plugin.MojosetLog in class org.apache.maven.plugin.AbstractMojopublic void setIgnoredDependencies(org.apache.maven.model.Dependency[] dependencies)
throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationExceptionpublic void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2015. All rights reserved.