Skip to content

Commit

Permalink
Build is failing due to some bug on nexus-staging-maven-plugin (#428)
Browse files Browse the repository at this point in the history
Unable to upload -SNAPSHOTs with nexus-staging-maven-plugin

Change to only use plugin on releases, which are working fine
  • Loading branch information
velo committed May 9, 2024
1 parent 5f03ddc commit 2e49d72
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 22 deletions.
34 changes: 24 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ commands:
name: 'Configure GPG keys'
command: |
echo -e "$GPG_KEY" | gpg --batch --no-tty --import --yes
nexus-deploy:
steps:
- run:
name: 'Deploy Core Modules Sonatype'
command: |
./mvnw -ntp -B -nsu -s .circleci/settings.xml -DskipTests=true deploy -Prelease
# our job defaults
defaults: &defaults
Expand Down Expand Up @@ -325,7 +319,24 @@ jobs:
./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.EmbeddedDatabase
- save-test-results

deploy:
deploySnapshot:
executor:
name: java
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- querydsl-dependencies-{{ checksum "pom.xml" }}
- querydsl-dependencies-
- resolve-dependencies
- configure-gpg
- run:
name: 'Deploy Core Modules Sonatype'
command: |
./mvnw -ntp -B -nsu -s .circleci/settings.xml -DskipTests=true deploy -Prelease
deployRelease:
executor:
name: java
<<: *defaults
Expand All @@ -337,7 +348,10 @@ jobs:
- querydsl-dependencies-
- resolve-dependencies
- configure-gpg
- nexus-deploy
- run:
name: 'Deploy Core Modules Sonatype'
command: |
./mvnw -ntp -B -nsu -s .circleci/settings.xml -DskipTests=true deploy -Prelease,staging
workflows:
version: 2
Expand Down Expand Up @@ -424,7 +438,7 @@ workflows:
name: 'snapshot'
filters:
<<: *master-only
- deploy:
- deploySnapshot:
name: 'deploy snapshot'
requires:
- 'snapshot'
Expand All @@ -434,7 +448,7 @@ workflows:

release:
jobs:
- deploy:
- deployRelease:
name: 'release to maven central'
context: Sonatype
filters:
Expand Down
32 changes: 20 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -550,18 +550,6 @@
<tag>${project.version}</tag>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
</configuration>
</plugin>
<plugin>
<groupId>io.sundr</groupId>
<artifactId>sundr-maven-plugin</artifactId>
Expand Down Expand Up @@ -761,6 +749,26 @@
</properties>
</profile>

<profile>
<id>staging</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>release</id>
<build>
Expand Down

0 comments on commit 2e49d72

Please sign in to comment.