From d824e5d4327ca15c49d1b26053ebb9583e1a027c Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Thu, 20 Aug 2020 14:28:03 +0200 Subject: [PATCH] DATAGRAPH-1359 - Run Checkstyle in verify phase. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Checkstyle is configured to run in the validation phase in spring-data-parent, spring-data-neo4j used to use validate as well. Also, spring-data-neo4j has checkstyle configured to check the test sources as well. The later is done in test-compile. So checkstyle was executed indeed twice during validation, once for the sources and once for the test-compile. This commit changes spring-data-neo4j’s configuration to run in verify, after tests ran. This makes checkstyle only run once. For a quick look if all sources are correct, one can use ` ./mvnw checkstyle:check@verify` before running a full blown `./mvnw verify`. While the Java compiler now can flag invalid code immediate, checkstyle will discover the rest only afterwards. While working on this a flaw in the combine.self="override" attribute was discovered: It works of course only for the maven configurational attributes, not for the checkstyle rules themselve. Therefor the `io.spring.nohttp.checkstyle.check.NoHttpCheck` has been added to the local configuration as well. In the process of the bug fix, the sort pom plugin has been applied with the configuration as already available. --- etc/checkstyle/config.xml | 5 + pom.xml | 354 ++++++++++++++++++++------------------ 2 files changed, 193 insertions(+), 166 deletions(-) diff --git a/etc/checkstyle/config.xml b/etc/checkstyle/config.xml index 124cf999c..37dcf531f 100644 --- a/etc/checkstyle/config.xml +++ b/etc/checkstyle/config.xml @@ -23,6 +23,11 @@ + + + + + diff --git a/pom.xml b/pom.xml index d8ede785e..9eaab3d27 100644 --- a/pom.xml +++ b/pom.xml @@ -69,21 +69,25 @@ 1.1.0 - 2.0.1 1.6.0 + 2.0.1 + + + ${assertj.version} 3.15.0 1.10.9 + 2.0 -SNAPSHOT 8.29 2020.0.1 - 2.0 spring-data-neo4j SDNEO4J 1.2.1 0.8.5 - 1.8 spring.data.neo4j - 2.3.1 + 1.8 + 2.3.1 + 1.8.0 1.8.0 1.8.0 @@ -92,19 +96,21 @@ 3.1.0 3.0.0-M1 3.0.0-M3 - 3.2.0 3.0.0-M4 3.0.0-M1 + 3.2.0 3.1.1 3.7.1 3.2.0 3.0.0-M4 ${java.version} ${java.version} + ${mockito.version} 3.2.4 4.0.1 4.0.3 - 3.0.1 + 3.0.1 + ${project.build.directory}/docs UTF-8 Arabba-SR5 @@ -112,40 +118,28 @@ 1.1 1.3.8 2.2.5 - 2.4.0-SNAPSHOT - 1.13.0 + ${skipTests} + ${skipTests} ${skipTests} - ${skipTests} - ${skipTests} - - - ${assertj.version} - ${mockito.version} + 2.4.0-SNAPSHOT + 1.13.0 - net.bytebuddy - byte-buddy - ${byte-buddy.version} + eu.michael-simons.neo4j + junit-jupiter-causal-cluster-testcontainer-extension + ${junit-cc-testcontainer} + test - net.bytebuddy - byte-buddy-agent - ${byte-buddy.version} - - - org.objenesis - objenesis - ${objenesis.version} - - - javax.xml.bind - jaxb-api - ${jaxb.version} - provided + io.r2dbc + r2dbc-bom + ${r2dbc.releasetrain} + pom + import io.reactivex @@ -163,9 +157,20 @@ ${rxjava2.version} - org.neo4j - neo4j-cypher-dsl - ${cypher-dsl.version} + javax.xml.bind + jaxb-api + ${jaxb.version} + provided + + + net.bytebuddy + byte-buddy + ${byte-buddy.version} + + + net.bytebuddy + byte-buddy-agent + ${byte-buddy.version} org.apiguardian @@ -185,13 +190,6 @@ pom import - - io.r2dbc - r2dbc-bom - ${r2dbc.releasetrain} - pom - import - org.mockito mockito-core @@ -209,6 +207,11 @@ neo4j ${neo4j.version} + + org.neo4j + neo4j-cypher-dsl + ${cypher-dsl.version} + org.neo4j.driver neo4j-java-driver @@ -219,6 +222,11 @@ neo4j-harness ${neo4j.version} + + org.objenesis + objenesis + ${objenesis.version} + org.slf4j slf4j-api @@ -236,8 +244,8 @@ test - org.jetbrains annotations + org.jetbrains @@ -247,16 +255,26 @@ ${testcontainers.version} test - - eu.michael-simons.neo4j - junit-jupiter-causal-cluster-testcontainer-extension - ${junit-cc-testcontainer} - test - + + com.fasterxml.jackson.core + jackson-databind + test + + + eu.michael-simons.neo4j + junit-jupiter-causal-cluster-testcontainer-extension + test + + + io.mockk + mockk + ${mockk} + test + io.projectreactor reactor-core @@ -268,6 +286,11 @@ test true + + io.r2dbc + r2dbc-h2 + test + io.reactivex rxjava @@ -283,27 +306,19 @@ rxjava true + + + javax.enterprise + cdi-api + ${cdi} + provided + javax.transaction jta 1.1 test - - org.springframework.data - spring-data-r2dbc - 1.0.0.RELEASE - test - - - io.r2dbc - r2dbc-h2 - test - - - org.neo4j - neo4j-cypher-dsl - org.apiguardian apiguardian-api @@ -313,6 +328,32 @@ assertj-core test + + org.jboss.weld.se + weld-se-core + 3.1.4.Final + test + + + org.jetbrains.kotlin + kotlin-reflect + true + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + true + + + org.jetbrains.kotlinx + kotlinx-coroutines-core + true + + + org.jetbrains.kotlinx + kotlinx-coroutines-reactor + true + org.junit.jupiter junit-jupiter @@ -328,10 +369,22 @@ mockito-junit-jupiter test + + org.neo4j + neo4j-cypher-dsl + org.neo4j.driver neo4j-java-driver + + + org.projectlombok + lombok + ${lombok} + test + true + org.springframework spring-beans @@ -353,29 +406,9 @@ spring-data-commons - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - true - - - org.jetbrains.kotlin - kotlin-reflect - true - - - org.jetbrains.kotlinx - kotlinx-coroutines-core - true - - - org.jetbrains.kotlinx - kotlinx-coroutines-reactor - true - - - io.mockk - mockk - ${mockk} + org.springframework.data + spring-data-r2dbc + 1.0.0.RELEASE test @@ -388,47 +421,34 @@ neo4j test - - eu.michael-simons.neo4j - junit-jupiter-causal-cluster-testcontainer-extension - test - - - - org.projectlombok - lombok - ${lombok} - true - test - - - com.fasterxml.jackson.core - jackson-databind - test - - - - javax.enterprise - cdi-api - ${cdi} - provided - - - org.jboss.weld.se - weld-se-core - 3.1.4.Final - test - + + + spring-libs-snapshot + https://repo.spring.io/libs-snapshot + + + + + + spring-plugins-release + https://repo.spring.io/plugins-release + + + spring-libs-milestone + https://repo.spring.io/libs-milestone + + + com.github.ekryd.sortpom sortpom-maven-plugin - 2.8.0 + 2.12.0 verify @@ -444,28 +464,29 @@ true groupId,artifactId false + false com.buschmais.jqassistant jqassistant-maven-plugin ${jqassistant.version} - - etc/jqassistant - ${skipArchitectureTests} - - - org.jqassistant.contrib.plugin - jqassistant-dashboard-plugin - ${jqassistant-dashboard-plugin.version} - de.kontext-e.jqassistant.plugin jqassistant.plugin.git ${jqassistant.version} + + org.jqassistant.contrib.plugin + jqassistant-dashboard-plugin + ${jqassistant-dashboard-plugin.version} + + + etc/jqassistant + ${skipArchitectureTests} + org.jacoco @@ -526,8 +547,8 @@ maven-checkstyle-plugin - validate - validate + verify + verify check @@ -585,7 +606,7 @@ - + 3.6.0 @@ -610,9 +631,6 @@ org.apache.maven.plugins maven-failsafe-plugin - - ${skipIntegrationTests} - @@ -621,14 +639,13 @@ + + ${skipIntegrationTests} + org.codehaus.mojo flatten-maven-plugin - - true - resolveCiFriendliesOnly - flatten @@ -645,6 +662,10 @@ + + true + resolveCiFriendliesOnly + org.apache.maven.plugins @@ -666,6 +687,15 @@ org.asciidoctor asciidoctor-maven-plugin ${asciidoctor-maven-plugin.version} + + + generate-docs + prepare-package + + process-asciidoc + + + org.asciidoctor @@ -683,24 +713,15 @@ font left - - - + + + asciidoctor-diagram ${project.build.docs} - - - generate-docs - prepare-package - - process-asciidoc - - - com.buschmais.jqassistant @@ -745,22 +766,23 @@ - - - spring-libs-snapshot - https://repo.spring.io/libs-snapshot - - - - - - spring-plugins-release - https://repo.spring.io/plugins-release - - - spring-libs-milestone - https://repo.spring.io/libs-milestone - - + + + ci + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + none + + + + + + +