Move spring-javaformat plugins to root POM

Relocate spring-javaformat plugins to the root of the project.

Closes gh-13306
This commit is contained in:
Phillip Webb
2018-06-04 17:25:19 -07:00
parent e1d21e52d5
commit 2274ac5214
8 changed files with 57 additions and 103 deletions

View File

@@ -0,0 +1,17 @@
^\Q/*\E$
^\Q * Copyright \E2012-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$
^$
^.*$

View File

@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />
<suppress files="SignalUtils\.java" checks="IllegalImport" />
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]cli[\\/]command[\\/]" checks="ImportControl" />
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]sample[\\/]" checks="ImportControl" />
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]sample[\\/]" checks="ImportControl" />
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocType" />
<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocVariable" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType" />
<suppress files="[\\/]spring-boot-samples[\\/]" checks="JavadocType" />
<suppress files="[\\/]spring-boot-deployment-tests[\\/]" checks="JavadocType" />
<suppress files="[\\/]spring-boot-integration-tests[\\/]" checks="JavadocType" />
<suppress files="Ansi.*\.java" checks="JavadocVariable" />
<suppress files="Ansi.*\.java" checks="JavadocStyle" />
<suppress files="LogLevel\.java" checks="JavadocVariable" />
<suppress files="HelpMojo\.java" checks=".*"/>
<suppress files="[\\/]org.springframework.boot.configurationprocessor.json[\\/].*\.java$" checks=".*"/>
<suppress files="TripType\.java" checks="JavadocVariable" />
<suppress files="Rating\.java" checks="JavadocVariable" />
<suppress files="Direction\.java" checks="JavadocVariable" />
<suppress files="JooqExamples\.java" checks="AvoidStaticImport"/>
</suppressions>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="com.puppycrawl.tools.checkstyle.Checker">
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="illegalPkgs" value="sun, org.apache.commons.(?!codec|compress|dbcp2|lang|lang3|logging|pool2).*, com.google.common, org.flywaydb.core.internal, reactor.core.support.Assert"/>
<property name="regexp" value="true"/>
</module>
</module>
</module>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0"?>
<!DOCTYPE import-control PUBLIC "-//Puppy Crawl//DTD Import Control 1.1//EN" "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
<import-control pkg="org.springframework.boot">
<allow pkg=".*" regex="true" />
<subpackage name="autoconfigure">
<subpackage name="web">
<disallow pkg="org.springframework.boot.web" />
<disallow pkg="org.springframework.web.servlet" />
<disallow pkg="org.springframework.web.reactive" />
<disallow pkg="javax.servlet" />
<allow pkg="org.springframework.boot.web.server" />
<allow pkg="org.springframework.boot.web.servlet.server" />
<subpackage name="client">
<allow pkg="org.springframework.boot.web.client" />
</subpackage>
<subpackage name="embedded">
<allow pkg="org.springframework.boot.web.embedded" />
</subpackage>
<subpackage name="servlet">
<allow pkg="javax.servlet" />
<allow pkg="org.springframework.boot.web.embedded" />
<allow pkg="org.springframework.boot.web.servlet" />
<allow pkg="org.springframework.web.servlet" />
</subpackage>
<subpackage name="reactive">
<allow pkg="org.springframework.boot.web.codec" />
<allow pkg="org.springframework.boot.web.embedded" />
<allow pkg="org.springframework.boot.web.reactive" />
<allow pkg="org.springframework.web.reactive" />
</subpackage>
</subpackage>
</subpackage>
<!-- Endpoint infrastructure -->
<subpackage name="actuate.endpoint">
<disallow pkg="org.springframework.http" />
<disallow pkg="org.springframework.web" />
<subpackage name="web">
<allow pkg="org.springframework.http" />
<allow pkg="org.springframework.web" />
<subpackage name="servlet">
<disallow pkg="org.springframework.web.reactive" />
</subpackage>
<subpackage name="reactive">
<disallow pkg="org.springframework.web.servlet" />
</subpackage>
</subpackage>
</subpackage>
<!-- Logging -->
<subpackage name="logging">
<disallow pkg="org.springframework.context" />
<disallow pkg="org.springframework.boot.context" />
</subpackage>
<!-- Web related concerns -->
<subpackage name="web">
<!-- Lock things down -->
<disallow pkg="org.springframework.boot.web" />
<disallow pkg="org.springframework.web.servlet" />
<disallow pkg="javax.servlet" />
<!-- Common -->
<subpackage name="client">
</subpackage>
<subpackage name="server">
<disallow pkg="org.springframework.context" />
</subpackage>
<subpackage name="context">
<allow pkg="org.springframework.boot.web.server" />
</subpackage>
<!-- Servlet -->
<subpackage name="servlet">
<allow pkg="javax.servlet" />
<subpackage name="context">
<allow pkg="org.springframework.boot.web.context" />
<allow pkg="org.springframework.boot.web.server" />
<allow pkg="org.springframework.boot.web.servlet.server" />
<allow pkg="org.springframework.boot.web.servlet" />
</subpackage>
<subpackage name="filter">
<allow pkg="javax.servlet" />
<allow pkg="org.springframework.boot.web.servlet" />
</subpackage>
<subpackage name="server">
<disallow pkg="org.springframework.context" />
<allow pkg="org.springframework.boot.web.server" />
<allow pkg="org.springframework.boot.web.servlet" />
</subpackage>
<subpackage name="support">
<allow pkg="javax.servlet" />
<allow pkg="org.springframework.boot.web.servlet" />
<allow pkg="org.springframework.boot.web.server" />
</subpackage>
<subpackage name="view">
<allow pkg="org.springframework.web.servlet" />
</subpackage>
<subpackage name="error">
<allow pkg="org.springframework.web.servlet" />
</subpackage>
</subpackage>
<!-- Reactive -->
<subpackage name="reactive">
<subpackage name="context">
<allow pkg="org.springframework.boot.web.context" />
<allow pkg="org.springframework.boot.web.server" />
<allow pkg="org.springframework.boot.web.reactive.server" />
</subpackage>
<subpackage name="server">
<allow pkg="org.springframework.boot.web.server" />
<disallow pkg="org.springframework.context" />
</subpackage>
<subpackage name="result">
<subpackage name="view">
<allow pkg="org.springframework.boot.web.reactive.result.view" />
</subpackage>
</subpackage>
</subpackage>
<!-- Embedded Servers -->
<subpackage name="embedded">
<allow pkg="javax.servlet" />
<allow pkg="org.springframework.boot.web.server" />
<allow pkg="org.springframework.boot.web.servlet" />
<allow pkg="org.springframework.boot.web.servlet.server" />
<allow pkg="org.springframework.boot.web.reactive.server" />
</subpackage>
</subpackage>
</import-control>