From 2091c02e0ae656d854f060578d79141f85014310 Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Mon, 25 Feb 2019 14:27:36 +1300 Subject: [PATCH 1/4] Now that KeyVault data-plane has no more checkstyle errors or violations, we are now enforcing build failure for this project and all child modules. --- .azure-pipelines/client.yml | 2 +- keyvault/data-plane/pom.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index e100cdcf8ad33..b1a8d3547b9f4 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -30,7 +30,7 @@ jobs: displayName: 'Build and Package' inputs: mavenPomFile: $(pomFile) - goals: 'javadoc:jar source:jar package' + goals: 'checkstyle:check javadoc:jar source:jar package' # Run checkstyle:check to fail build when checkstyle failures are encountered options: '$(DefaultOptions) $(ProfileFlag) -Dmaven.test.skip=true -Dinclude-template' # We include template-module so we ensure it always builds in CI mavenOptions: '$(LoggingOptions)' javaHomeOption: 'JDKVersion' diff --git a/keyvault/data-plane/pom.xml b/keyvault/data-plane/pom.xml index f9b762c6728ff..1786a3b17d99a 100644 --- a/keyvault/data-plane/pom.xml +++ b/keyvault/data-plane/pom.xml @@ -87,6 +87,17 @@ + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + true + + + From 38f39d0210c65298aa094ce9c19caa341af34a33 Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Mon, 25 Feb 2019 15:35:42 +1300 Subject: [PATCH 2/4] Install build tools locally so that checkstyle can run. --- .azure-pipelines/client.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index b1a8d3547b9f4..ea1593ba73eaa 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -26,6 +26,19 @@ jobs: JavaVersion: '1.11' steps: + # This build task can be removed once we start publishing the build tools to Maven Central + - task: Maven@3 + displayName: 'Install reporting tools' + inputs: + mavenPomFile: $(pomFile) + options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip' + mavenOptions: '$(LoggingOptions)' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.11' + jdkArchitectureOption: 'x64' + publishJUnitResults: false + goals: 'install' + - task: Maven@3 displayName: 'Build and Package' inputs: From e08f3ef81705b246da55049ae583f145b2c0c59d Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Mon, 25 Feb 2019 15:51:37 +1300 Subject: [PATCH 3/4] Fix whitespace --- .azure-pipelines/client.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index ea1593ba73eaa..ed60bc2233ef7 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -26,18 +26,18 @@ jobs: JavaVersion: '1.11' steps: - # This build task can be removed once we start publishing the build tools to Maven Central - task: Maven@3 - displayName: 'Install reporting tools' - inputs: - mavenPomFile: $(pomFile) - options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip' - mavenOptions: '$(LoggingOptions)' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - publishJUnitResults: false - goals: 'install' + # This build task can be removed once we start publishing the build tools to Maven Central + displayName: 'Install reporting tools' + inputs: + mavenPomFile: $(pomFile) + options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip' + mavenOptions: '$(LoggingOptions)' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.11' + jdkArchitectureOption: 'x64' + publishJUnitResults: false + goals: 'install' - task: Maven@3 displayName: 'Build and Package' From 56e7b9628adbdc230503221ac4425e6f9ea055f5 Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Thu, 7 Mar 2019 10:13:16 +1300 Subject: [PATCH 4/4] It is not necessary to run checkstyle:check as the build will fail satisfactorily under the analyze job. --- .azure-pipelines/client.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index ed60bc2233ef7..e100cdcf8ad33 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -26,24 +26,11 @@ jobs: JavaVersion: '1.11' steps: - - task: Maven@3 - # This build task can be removed once we start publishing the build tools to Maven Central - displayName: 'Install reporting tools' - inputs: - mavenPomFile: $(pomFile) - options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip' - mavenOptions: '$(LoggingOptions)' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - publishJUnitResults: false - goals: 'install' - - task: Maven@3 displayName: 'Build and Package' inputs: mavenPomFile: $(pomFile) - goals: 'checkstyle:check javadoc:jar source:jar package' # Run checkstyle:check to fail build when checkstyle failures are encountered + goals: 'javadoc:jar source:jar package' options: '$(DefaultOptions) $(ProfileFlag) -Dmaven.test.skip=true -Dinclude-template' # We include template-module so we ensure it always builds in CI mavenOptions: '$(LoggingOptions)' javaHomeOption: 'JDKVersion'