diff --git a/.ci/build.sh b/.ci/build.sh index 291a10b424..4e843d4311 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -83,6 +83,16 @@ function build() { ./mvnw clean verify -Dskip-cli-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}" else # b) only pmd-cli and pmd-dist + # + # In the first stage build (without pmd-cli and pmd-dist), cyclonedx:makeAggregateBom tries to + # fetch the jars of the to-be-released modules, which don't exist yet. This is recorded in *.lastUpdated + # files in the local repo and might end up in the cache, that is used for this 2nd stage build. + # Trying to delete the files now, if they exist. + # Alternatively, we could run maven with flag "-U" to force update all dependencies... + pmd_ci_log_info "Cleanup local maven repo..." + find ~/.m2/repository -wholename "*/net/sourceforge/pmd/*/${PMD_CI_MAVEN_PROJECT_VERSION}/*.lastUpdated" | xargs rm -v + pmd_ci_log_info "Cleanup local maven repo finished." + ./mvnw clean verify -pl pmd-cli,pmd-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}" fi else diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c27288ee6f..9f4bc12a42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,8 +48,6 @@ jobs: ~/.cache ~/work/pmd/target/repositories vendor/bundle - # avoid caching missed dependencies - !~/.m2/repository/**/*.lastUpdated key: v3-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} restore-keys: | v3-${{ runner.os }}- diff --git a/do-release.sh b/do-release.sh index ef34e1063a..269b2d8589 100755 --- a/do-release.sh +++ b/do-release.sh @@ -108,12 +108,12 @@ if [ "${BUILD_TOOLS_VERSION}" != "${BUILD_TOOLS_VERSION_RELEASE}" ]; then exit 1 fi -echo "* Update date info in **docs/_config.yml**." -echo " date: $(date -u +%d-%B-%Y)" -echo echo "* Update version info in **docs/_config.yml**." echo " remove the SNAPSHOT from site.pmd.version" echo +echo "* Update date info in **docs/_config.yml**." +echo " date: $(date -u +%Y-%m-%d)" +echo echo "* Update **pmd-apex/src/main/resources/rulesets/apex/quickstart.xml** and" echo " **pmd-java/src/main/resources/rulesets/java/quickstart.xml** with the new rules." echo @@ -204,7 +204,7 @@ echo echo "Tag has been pushed.... now check github actions: " echo echo "Now wait, until first stage of the release is finished successfully..." -echo "You don't need to wait until artifacts are in maven central, just the github action must be successful." +echo "You don't need to wait until artifacts are in maven central, just the GitHub Action must be successful." echo echo "If it is failing, you can fix the code/scripts and force push the tag via" echo @@ -214,7 +214,7 @@ echo " git push origin tag \"pmd_releases/${RELEASE_VERSION}\" --force" echo echo "However: This is only possible, if the artefacts have not been pushed to maven central yet..." echo -echo "Press enter to continue..." +echo "Press enter to continue, once the GitHub Action finished successfully..." read -r echo @@ -344,8 +344,8 @@ tweet="${tweet//#/%23}" tweet="${tweet//\//%2F}" tweet="${tweet//$'\r'/}" tweet="${tweet//$'\n'/%0A}" -echo "* Tweet about this release on https://twitter.com/pmd_analyzer:" -echo " " +echo "* Tweet about this release on https://x.com/pmd_analyzer:" +echo " " echo "* Post this also into :" echo " PMD ${RELEASE_VERSION} released: https://github.com/pmd/pmd/releases/tag/pmd_releases/${RELEASE_VERSION} #PMD" echo