summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2022-04-04 17:26:32 +0200
committerGitHub <noreply@github.com>2022-04-04 17:26:32 +0200
commitc6ab8e56a77e12a1318cc6897db575f755785f38 (patch)
tree055f11b202f82e995eb47faf3da3e7808a0eaaa0
parent3ad3d0735bd476c9babae1032ea23b9fcc129b1a (diff)
parent742c70780512f3313077eb2ce9aeb4854b2e1f72 (diff)
Merge pull request #21968 from vespa-engine/aressem/fix-opensource-release
Add workaround for nexus-staging-maven-plugin with JDK 17. Upgrade ve…
-rwxr-xr-xscrewdriver/release-java-artifacts.sh10
-rw-r--r--screwdriver/settings-publish.xml2
2 files changed, 3 insertions, 9 deletions
diff --git a/screwdriver/release-java-artifacts.sh b/screwdriver/release-java-artifacts.sh
index 8030638cf5b..8d80bb45578 100755
--- a/screwdriver/release-java-artifacts.sh
+++ b/screwdriver/release-java-artifacts.sh
@@ -52,6 +52,8 @@ for MODULE in $(comm -2 -3 \
echo "No javadoc available for module" > $MODULE/src/main/javadoc/README
done
+# Workaround for broken nexus-staging-maven-plugin instead of swapping JDK
+export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
export VESPA_MAVEN_EXTRA_OPTS="--show-version --batch-mode"
./bootstrap.sh
@@ -69,20 +71,12 @@ mvn $COMMON_MAVEN_OPTS --file ./maven-plugins/pom.xml -DskipStagingRepositoryClo
# Deploy the rest of the artifacts
mvn $COMMON_MAVEN_OPTS --threads 8 -DskipStagingRepositoryClose=true -DstagingRepositoryId=$STG_REPO deploy
-# Workaround for nexus-staging-maven-plugin:1.6.12:rc-release not working with maven+jdk17
-SWAP_MAVEN_JAVA_WORKAROUND=false
-if rpm -q maven-openjdk17 &> /dev/null; then SWAP_MAVEN_JAVA_WORKAROUND=true; fi
-if $SWAP_MAVEN_JAVA_WORKAROUND; then dnf swap -y maven-openjdk17 maven-openjdk11; fi
-
# Close with checks
mvn $COMMON_MAVEN_OPTS -N org.sonatype.plugins:nexus-staging-maven-plugin:1.6.12:rc-close -DnexusUrl=https://oss.sonatype.org/ -DserverId=ossrh -DstagingRepositoryId=$STG_REPO
# Release if ok
mvn $COMMON_MAVEN_OPTS -N org.sonatype.plugins:nexus-staging-maven-plugin:1.6.12:rc-release -DnexusUrl=https://oss.sonatype.org/ -DserverId=ossrh -DstagingRepositoryId=$STG_REPO
-# Swap back if we swapped previously
-if $SWAP_MAVEN_JAVA_WORKAROUND; then dnf swap -y maven-openjdk11 maven-openjdk17; fi
-
# Delete the GPG rings
rm -rf $SD_SOURCE_DIR/screwdriver/deploy
diff --git a/screwdriver/settings-publish.xml b/screwdriver/settings-publish.xml
index 5524bf9d7ac..2d6dc2d187c 100644
--- a/screwdriver/settings-publish.xml
+++ b/screwdriver/settings-publish.xml
@@ -30,7 +30,7 @@
<gpg.publickeyring>pubring.gpg</gpg.publickeyring>
<gpg.secretkeyring>secring.gpg</gpg.secretkeyring>
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
- <nexus.staging.maven.plugin.version>1.6.7</nexus.staging.maven.plugin.version>
+ <nexus.staging.maven.plugin.version>1.6.12</nexus.staging.maven.plugin.version>
</properties>
</profile>
</profiles>