diff --git a/README.adoc b/README.adoc index ac0a4bc5..910e42c7 100644 --- a/README.adoc +++ b/README.adoc @@ -227,6 +227,57 @@ Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on t IMPORTANT: Remember to set the `Scan Scope` to `All sources` since we apply checkstyle rules for production and test sources. +=== Duplicate Finder + +Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, that enables flagging duplicate and conflicting classes and resources on the java classpath. + +==== Duplicate Finder configuration + +Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`. + +.pom.xml +[source,xml] +---- + + + + org.basepom.maven + duplicate-finder-maven-plugin + + + +---- + +For other properties, we have set defaults as listed in the https://github.com/basepom/duplicate-finder-maven-plugin/wiki[plugin documentation]. + +You can easily override them but setting the value of the selected property prefixed with `duplicate-finder-maven-plugin`. For example, set `duplicate-finder-maven-plugin.skip` to `true` in order to skip duplicates check in your build. + +If you need to add `ignoredClassPatterns` or `ignoredResourcePatterns` to your setup, make sure to add them in the plugin configuration section of your project: + +[source,xml] +---- + + + + org.basepom.maven + duplicate-finder-maven-plugin + + + org.joda.time.base.BaseDateTime + .*module-info + + + changelog.txt + + + + + + + +---- + + == Flattening the POMs To avoid propagating build setup that is required to build a Spring Cloud project, we're using the maven flatten plugin. It has the advantage of letting you use whatever features you need while publishing "clean" pom to the repository. diff --git a/docs/src/main/asciidoc/contributing.adoc b/docs/src/main/asciidoc/contributing.adoc index e36b0a49..71f8aab5 100644 --- a/docs/src/main/asciidoc/contributing.adoc +++ b/docs/src/main/asciidoc/contributing.adoc @@ -177,3 +177,54 @@ Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on t - `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`. IMPORTANT: Remember to set the `Scan Scope` to `All sources` since we apply checkstyle rules for production and test sources. + +=== Duplicate Finder + +Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, that enables flagging duplicate and conflicting classes and resources on the java classpath. + +==== Duplicate Finder configuration + +Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`. + +.pom.xml +[source,xml] +---- + + + + org.basepom.maven + duplicate-finder-maven-plugin + + + +---- + +For other properties, we have set defaults as listed in the https://github.com/basepom/duplicate-finder-maven-plugin/wiki[plugin documentation]. + +You can easily override them but setting the value of the selected property prefixed with `duplicate-finder-maven-plugin`. For example, set `duplicate-finder-maven-plugin.skip` to `true` in order to skip duplicates check in your build. + +If you need to add `ignoredClassPatterns` or `ignoredResourcePatterns` to your setup, make sure to add them in the plugin configuration section of your project: + +[source,xml] +---- + + + + org.basepom.maven + duplicate-finder-maven-plugin + + + org.joda.time.base.BaseDateTime + .*module-info + + + changelog.txt + + + + + + + +---- + diff --git a/pom.xml b/pom.xml index 106c27c0..1b0e1574 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ ${java.version} ${basedir} ${project.artifactId} - 2.6.0 + 2.6.1 3.1.0-SNAPSHOT ${project.build.directory}/build-docs ${project.build.directory}/build-docs-classes @@ -121,6 +121,24 @@ ${docs.classes.dir} readme.class.path 5.14.0.18788 + 1.5.0 + false + false + false + true + true + true + true + false + false + true + true + 2 + ${project.build.directory}/duplicate-finder-result.xml + false + sun.boot.class.path + true + false false @@ -643,6 +661,40 @@ + + org.basepom.maven + duplicate-finder-maven-plugin + ${duplicate-finder-maven-plugin.version} + + + duplicate-validation + verify + + check + + + + + ${duplicate-finder-maven-plugin.printEqualFiles} + ${duplicate-finder-maven-plugin.failBuildInCaseOfDifferentContentConflict} + ${duplicate-finder-maven-plugin.failBuildInCaseOfEqualContentConflict} + ${duplicate-finder-maven-plugin.failBuildInCaseOfConflict} + ${duplicate-finder-maven-plugin.checkCompileClasspath} + ${duplicate-finder-maven-plugin.checkRuntimeClasspath} + ${duplicate-finder-maven-plugin.checkTestClasspath} + ${duplicate-finder-maven-plugin.skip} + ${duplicate-finder-maven-plugin.quiet} + ${duplicate-finder-maven-plugin.preferLocal} + ${duplicate-finder-maven-plugin.useResultFile} + ${duplicate-finder-maven-plugin.resultFileMinClasspathCount} + ${duplicate-finder-maven-plugin.resultFile} + ${duplicate-finder-maven-plugin.includeBootClasspath} + ${duplicate-finder-maven-plugin.bootClasspathProperty} + ${duplicate-finder-maven-plugin.useDefaultResourceIgnoreList} + ${duplicate-finder-maven-plugin.includePomProjects} + + + diff --git a/spring-cloud-build-dependencies/pom.xml b/spring-cloud-build-dependencies/pom.xml index 24327ebb..019c19b1 100644 --- a/spring-cloud-build-dependencies/pom.xml +++ b/spring-cloud-build-dependencies/pom.xml @@ -14,12 +14,12 @@ org.springframework.boot spring-boot-dependencies - 2.6.0 + 2.6.1 UTF-8 - 2.6.0 + 2.6.1