From e22cb09444ef00eda0ce5fb4d1a9e270b27a515a Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Thu, 5 Sep 2024 15:53:00 -0500 Subject: [PATCH 1/5] Re-enable Maven build caching samples --- ....yml.disabled => maven-build-caching-samples-verification.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{maven-build-caching-samples-verification.yml.disabled => maven-build-caching-samples-verification.yml} (100%) diff --git a/.github/workflows/maven-build-caching-samples-verification.yml.disabled b/.github/workflows/maven-build-caching-samples-verification.yml similarity index 100% rename from .github/workflows/maven-build-caching-samples-verification.yml.disabled rename to .github/workflows/maven-build-caching-samples-verification.yml From 2560dac7e83f2f3efabc31ad3984408d822dbcd4 Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Sat, 7 Sep 2024 12:36:55 -0500 Subject: [PATCH 2/5] Update Maven build caching verification workflow --- ...ven-build-caching-samples-verification.yml | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/.github/workflows/maven-build-caching-samples-verification.yml b/.github/workflows/maven-build-caching-samples-verification.yml index 0c4964414..a83f11a4b 100644 --- a/.github/workflows/maven-build-caching-samples-verification.yml +++ b/.github/workflows/maven-build-caching-samples-verification.yml @@ -9,41 +9,50 @@ on: paths: [ 'build-caching-maven-samples/**', '.github/workflows/**' ] workflow_dispatch: +env: + PROJECT_DIR: build-caching-maven-samples + GOALS: verify + ARGS: -B -Ddevelocity.cache.failOnUnhandledParameters=true + jobs: verification: name: Verification runs-on: ubuntu-latest steps: - - uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' + - name: Set up Maven + uses: gradle/develocity-actions/maven-setup@v1.1 + with: + develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} - name: Setup Node.js and Npm uses: actions/setup-node@v4 with: node-version: '14' - name: Set up Yarn run: npm install -g yarn - - name: Verify cacheable goals are retrieved from the build cache - id: build - working-directory: gradle-enterprise-maven-build-validation - run: | - set -o pipefail - ./02-validate-local-build-caching-different-locations.sh \ - -r "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" \ - -c "$GITHUB_SHA" \ - -p "build-caching-maven-samples" \ - -g "verify" \ - -a "-Dorg.slf4j.simpleLogger.log.gradle.goal.cache=debug -B" \ - -s "https://ge.solutions-team.gradle.com" \ - -f -e 2>&1 | tee -a /tmp/build.log - echo "hasUnknownParams=$(grep "Build caching was not enabled for this goal execution because the following parameters were not handled" /tmp/build.log | wc -l)" >> $GITHUB_OUTPUT - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} - - name: Verify no unmapped mojo parameters - if: (success() || failure()) && steps.build.outputs.hasUnknownParams != '0' - run: exit 1 + - name: Download latest version of the Develocity Build Validation Scripts + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run experiment 1 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-1@actions-stable + with: + gitRepo: ${{ github.server_url }}/${{ github.repository }} + gitCommitId: ${{ github.sha }} + projectDir: ${{ env.PROJECT_DIR }} + goals: ${{ env.GOALS }} + args: ${{ env.ARGS }} + failIfNotFullyCacheable: true + - name: Run experiment 2 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-2@actions-stable + with: + gitRepo: ${{ github.server_url }}/${{ github.repository }} + gitCommitId: ${{ github.sha }} + projectDir: ${{ env.PROJECT_DIR }} + goals: ${{ env.GOALS }} + args: ${{ env.ARGS }} + failIfNotFullyCacheable: true From 5a003b9ca2de4a148a46289ec11b40277eb5c48d Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Sat, 7 Sep 2024 12:37:32 -0500 Subject: [PATCH 3/5] Align Maven build caching samples develocity.xml --- build-caching-maven-samples/.mvn/develocity.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build-caching-maven-samples/.mvn/develocity.xml b/build-caching-maven-samples/.mvn/develocity.xml index bf9915160..101764cf8 100644 --- a/build-caching-maven-samples/.mvn/develocity.xml +++ b/build-caching-maven-samples/.mvn/develocity.xml @@ -1,8 +1,21 @@ - + + https://ge.solutions-team.gradle.com - true + + #{isFalse(env['GITHUB_ACTIONS'])} + + + + + + + #{{'0.0.0.0'}} + + true From 608f88b9960fd7bbd55e4d7f35345f4aa456a84a Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Sat, 7 Sep 2024 12:54:15 -0500 Subject: [PATCH 4/5] Update PMD properties --- .../pmd-project/pom.xml | 101 ++++++++---------- 1 file changed, 46 insertions(+), 55 deletions(-) diff --git a/build-caching-maven-samples/pmd-project/pom.xml b/build-caching-maven-samples/pmd-project/pom.xml index 9db0363e9..3ce54615b 100644 --- a/build-caching-maven-samples/pmd-project/pom.xml +++ b/build-caching-maven-samples/pmd-project/pom.xml @@ -68,30 +68,35 @@ excludeFromFailureFile NAME_ONLY + + siteDirectory + - - skip + aggregate + benchmark format - linkXRef includeTests - aggregate + includeXmlInReports inputEncoding - includeXmlInSite - skipEmptyReport jdkToolchain - targetJdk language + linkXRef + locale minimumPriority - rulesets - typeResolution - benchmark - suppressMarker - skipPmdError + outputFormat + outputTimestamp renderProcessingErrors renderRuleViolationPriority renderSuppressedViolations renderViolationsByPriority + rulesets + skip + skipEmptyReport + skipPmdError + suppressMarker + targetJdk + typeResolution @@ -124,26 +129,17 @@ analysisCache analysisCacheLocation + + + mojoExecution + + + repoSession - - - localRepository - - - - id - - - url - - - - - - remoteRepositories + remoteProjectRepositories @@ -197,24 +193,28 @@ excludeFromFailureFile NAME_ONLY + + siteDirectory + - skip + aggregate format - linkXRef + ignoreAnnotations + ignoreIdentifiers + ignoreLiterals includeTests - aggregate + includeXmlInReports inputEncoding - includeXmlInSite - skipEmptyReport - language jdkToolchain - - ignoreAnnotations - ignoreLiterals - ignoreIdentifiers + language + linkXRef + locale minimumTokens - + outputFormat + outputTimestamp + skip + skipEmptyReport @@ -240,26 +240,17 @@ targetDirectory + + + mojoExecution + + + repoSession - - - localRepository - - - - id - - - url - - - - - - remoteRepositories + remoteProjectRepositories From 65364b69fa240edfc1ad5537eb150e1c3e6e89dc Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Sat, 7 Sep 2024 13:13:07 -0500 Subject: [PATCH 5/5] Update Avro properties Properties were sorted alphabetically. It wasn't clear why they were grouped the way they were. --- build-caching-maven-samples/avro-project/pom.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build-caching-maven-samples/avro-project/pom.xml b/build-caching-maven-samples/avro-project/pom.xml index d8ef0c298..745a87a5b 100644 --- a/build-caching-maven-samples/avro-project/pom.xml +++ b/build-caching-maven-samples/avro-project/pom.xml @@ -87,18 +87,19 @@ + createNullSafeAnnotations createOptionalGetters createSetters + customConversions + customLogicalTypeFactories enableDecimalLogicalType + errorSpecificClass + fieldVisibility gettersReturnOptional + imports optionalGettersForNullableFieldsOnly - + recordSpecificClass stringType - imports - fieldVisibility - - customConversions - customLogicalTypeFactories templateDirectory velocityToolsClassesNames