Skip to content

Commit 8ce6e4f

Browse files
authored
Merge pull request #4387 from yue9944882/sanitize-release-plugins
Cherry-pick(Legacy) Sanitize release plugin to fix release GH workflow
2 parents 6db220a + 6fae893 commit 8ce6e4f

File tree

7 files changed

+10
-77
lines changed

7 files changed

+10
-77
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
- name: Release Prepare
6161
run: |
6262
git checkout -b 'automated-release-${{ github.event.inputs.releaseVersion }}'
63-
mvn --batch-mode \
64-
release:prepare \
63+
./mvnw --batch-mode \
64+
org.apache.maven.plugins:maven-release-plugin:prepare \
6565
-Dtag=v${{ github.event.inputs.releaseVersion }} \
6666
-DconnectionUrl=https://${{ github.token }}@github.com/${{ github.repository }}.git \
6767
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
@@ -76,7 +76,7 @@ jobs:
7676
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
7777
run: |
7878
# The tests are already executed in the prepare, skipping
79-
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -DlocalCheckout=true -Darguments=-DskipTests release:perform
79+
./mvnw -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -DlocalCheckout=true -Darguments=-DskipTests org.apache.maven.plugins:maven-release-plugin:perform
8080
git push https://${{ github.token }}@github.com/${{ github.repository }}.git \
8181
automated-release-${{ github.event.inputs.releaseVersion }}:automated-release-${{ github.event.inputs.releaseVersion }}
8282
git push https://${{ github.token }}@github.com/${{ github.repository }}.git v${{ github.event.inputs.releaseVersion }}

client-java-contrib/admissionreview/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434

3535
<build>
3636
<plugins>
37-
<plugin>
38-
<groupId>org.sonatype.plugins</groupId>
39-
<artifactId>nexus-staging-maven-plugin</artifactId>
40-
<extensions>true</extensions>
41-
<configuration>
42-
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
43-
</configuration>
44-
</plugin>
4537
<plugin>
4638
<groupId>com.diffplug.spotless</groupId>
4739
<artifactId>spotless-maven-plugin</artifactId>

client-java-contrib/cert-manager/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@
2222
<build>
2323
<plugins>
2424
<plugin>
25-
<groupId>org.sonatype.plugins</groupId>
26-
<artifactId>nexus-staging-maven-plugin</artifactId>
27-
<extensions>true</extensions>
25+
<groupId>com.diffplug.spotless</groupId>
26+
<artifactId>spotless-maven-plugin</artifactId>
2827
<configuration>
29-
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
28+
<skip>true</skip>
3029
</configuration>
3130
</plugin>
3231
</plugins>

client-java-contrib/prometheus-operator/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
<build>
2222
<plugins>
2323
<plugin>
24-
<groupId>org.sonatype.plugins</groupId>
25-
<artifactId>nexus-staging-maven-plugin</artifactId>
26-
<extensions>true</extensions>
24+
<groupId>com.diffplug.spotless</groupId>
25+
<artifactId>spotless-maven-plugin</artifactId>
2726
<configuration>
28-
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
27+
<skip>true</skip>
2928
</configuration>
3029
</plugin>
3130
</plugins>

examples/examples-release-19/pom.xml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,4 @@
9898

9999
</dependencies>
100100

101-
<build>
102-
<plugins>
103-
<plugin>
104-
<groupId>org.sonatype.plugins</groupId>
105-
<artifactId>nexus-staging-maven-plugin</artifactId>
106-
<extensions>true</extensions>
107-
<configuration>
108-
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
109-
</configuration>
110-
</plugin>
111-
<plugin>
112-
<groupId>org.apache.maven.plugins</groupId>
113-
<artifactId>maven-deploy-plugin</artifactId>
114-
<version>3.1.4</version>
115-
<configuration>
116-
<skip>true</skip>
117-
</configuration>
118-
</plugin>
119-
</plugins>
120-
</build>
121-
122-
</project>
101+
</project>

examples/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@
3030
<artifactId>maven-bundle-plugin</artifactId>
3131
<extensions>true</extensions>
3232
</plugin>
33-
<plugin>
34-
<groupId>org.apache.maven.plugins</groupId>
35-
<artifactId>maven-deploy-plugin</artifactId>
36-
<configuration>
37-
<skip>true</skip>
38-
</configuration>
39-
</plugin>
4033
</plugins>
4134
</build>
4235

pom.xml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,6 @@
398398
<artifactId>maven-compiler-plugin</artifactId>
399399
<version>3.14.1</version>
400400
</plugin>
401-
<plugin>
402-
<groupId>org.sonatype.plugins</groupId>
403-
<artifactId>nexus-staging-maven-plugin</artifactId>
404-
<version>1.7.0</version>
405-
</plugin>
406401
<plugin>
407402
<groupId>org.codehaus.mojo</groupId>
408403
<artifactId>build-helper-maven-plugin</artifactId>
@@ -421,11 +416,6 @@
421416
<trimStackTrace>false</trimStackTrace> <!-- SUREFIRE-1226 workaround -->
422417
</configuration>
423418
</plugin>
424-
<plugin>
425-
<groupId>org.apache.maven.plugins</groupId>
426-
<artifactId>maven-deploy-plugin</artifactId>
427-
<version>3.1.4</version>
428-
</plugin>
429419
<plugin>
430420
<groupId>org.codehaus.gmavenplus</groupId>
431421
<artifactId>gmavenplus-plugin</artifactId>
@@ -473,25 +463,6 @@
473463
<skip>true</skip>
474464
</configuration>
475465
</plugin>
476-
<plugin>
477-
<groupId>org.sonatype.central</groupId>
478-
<artifactId>central-publishing-maven-plugin</artifactId>
479-
<version>0.9.0</version>
480-
<extensions>true</extensions>
481-
<configuration>
482-
<publishingServerId>ossrh</publishingServerId>
483-
</configuration>
484-
</plugin>
485-
<plugin>
486-
<groupId>org.sonatype.plugins</groupId>
487-
<artifactId>nexus-staging-maven-plugin</artifactId>
488-
<extensions>true</extensions>
489-
<configuration>
490-
<serverId>ossrh</serverId>
491-
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
492-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
493-
</configuration>
494-
</plugin>
495466
<plugin>
496467
<groupId>com.diffplug.spotless</groupId>
497468
<artifactId>spotless-maven-plugin</artifactId>

0 commit comments

Comments
 (0)