diff --git a/spring-boot-parent/checkstyle-header.txt b/spring-boot-parent/checkstyle-header.txt new file mode 100644 index 0000000000..154aaa1a69 --- /dev/null +++ b/spring-boot-parent/checkstyle-header.txt @@ -0,0 +1,17 @@ +^\Q/*\E$ +^\Q * Copyright \E20\d\d\-20\d\d\Q the original author or authors.\E$ +^\Q *\E$ +^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$ +^\Q * you may not use this file except in compliance with the License.\E$ +^\Q * You may obtain a copy of the License at\E$ +^\Q *\E$ +^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$ +^\Q *\E$ +^\Q * Unless required by applicable law or agreed to in writing, software\E$ +^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$ +^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$ +^\Q * See the License for the specific language governing permissions and\E$ +^\Q * limitations under the License.\E$ +^\Q */\E$ +^$ +^.*$ diff --git a/spring-boot-parent/checkstyle-import-control.xml b/spring-boot-parent/checkstyle-import-control.xml new file mode 100644 index 0000000000..2885367f6b --- /dev/null +++ b/spring-boot-parent/checkstyle-import-control.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/spring-boot-parent/checkstyle-suppressions.xml b/spring-boot-parent/checkstyle-suppressions.xml new file mode 100644 index 0000000000..f2d4895026 --- /dev/null +++ b/spring-boot-parent/checkstyle-suppressions.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-boot-parent/checkstyle.xml b/spring-boot-parent/checkstyle.xml new file mode 100644 index 0000000000..9224ffb0ad --- /dev/null +++ b/spring-boot-parent/checkstyle.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-boot-parent/pom.xml b/spring-boot-parent/pom.xml index 1acbf278bc..dd3f24a311 100755 --- a/spring-boot-parent/pom.xml +++ b/spring-boot-parent/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 org.springframework.boot @@ -241,6 +242,18 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.16 + + + com.puppycrawl.tools + checkstyle + 6.10.1 + + + org.apache.maven.plugins maven-invoker-plugin @@ -393,6 +406,53 @@ + + org.apache.maven.plugins + maven-resources-plugin + + + checkstyle-prepare + validate + + copy-resources + + + ${project.build.directory} + + + ${main.basedir}/spring-boot-parent + + checkstyle-import-control.xml + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + checkstyle-validation + validate + + checkstyle.xml + checkstyle-suppressions.xml + checkstyle-header.txt + checkstyle.build.directory=${project.build.directory} + UTF-8 + true + true + true + + + check + + + + org.apache.maven.plugins maven-compiler-plugin @@ -487,16 +547,16 @@ - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar-no-fork - - - + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + org.codehaus.mojo @@ -588,8 +648,10 @@ - - + + org.apache.maven.plugins maven-compiler-plugin