[ci] Remove profile "pmd-dogfood" as this doesn't work well with release

Use alternative solution by modifying the version directly
in pom.xml for dogfood build.
This commit is contained in:
Andreas Dangel 2021-08-19 19:23:01 +02:00
parent 7e15f1781c
commit 5770785847
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
2 changed files with 8 additions and 34 deletions

View File

@ -87,15 +87,15 @@ function build() {
if pmd_ci_maven_isSnapshotBuild; then
if [ "${PMD_CI_MAVEN_PROJECT_VERSION}" != "7.0.0-SNAPSHOT" ]; then
pmd_ci_log_group_start "Executing PMD dogfood test with ${PMD_CI_MAVEN_PROJECT_VERSION}"
./mvnw versions:set -DnewVersion=${PMD_CI_MAVEN_PROJECT_VERSION}-dogfood -DgenerateBackupPoms=false
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}-dogfood" -DgenerateBackupPoms=false
sed -i 's/<version>[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}.*<\/version>\( *<!-- pmd.dogfood.version -->\)/<version>'"${PMD_CI_MAVEN_PROJECT_VERSION}"'<\/version>\1/' pom.xml
./mvnw verify --show-version --errors --batch-mode --no-transfer-progress "${PMD_MAVEN_EXTRA_OPTS[@]}" \
-DskipTests \
-Dmaven.javadoc.skip=true \
-Dmaven.source.skip=true \
-Dcheckstyle.skip=true \
-Ppmd-dogfood \
-Dpmd.dogfood.version=${PMD_CI_MAVEN_PROJECT_VERSION}
./mvnw versions:set -DnewVersion=${PMD_CI_MAVEN_PROJECT_VERSION} -DgenerateBackupPoms=false
-Dcheckstyle.skip=true
./mvnw versions:set -DnewVersion="${PMD_CI_MAVEN_PROJECT_VERSION}" -DgenerateBackupPoms=false
git checkout -- pom.xml
pmd_ci_log_group_end
else
# current maven-pmd-plugin is not compatible with PMD 7 yet.

32
pom.xml
View File

@ -402,15 +402,16 @@
</configuration>
<dependencies>
<!-- Note: we can't use a property for the version here due to https://issues.apache.org/jira/browse/MRELEASE-932 -->
<!-- We use the comment "pmd.dogfood.version" as a marker and manually change the version - see .ci/build.sh -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.37.0</version>
<version>6.37.0</version> <!-- pmd.dogfood.version -->
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.37.0</version>
<version>6.37.0</version> <!-- pmd.dogfood.version -->
</dependency>
<!-- This contains the dogfood ruleset -->
<dependency>
@ -1054,33 +1055,6 @@
</plugins>
</build>
</profile>
<profile>
<id>pmd-dogfood</id>
<properties>
<pmd.dogfood.version>${project.version}</pmd.dogfood.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.dogfood.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.dogfood.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>