This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/main by this push:
new ceb3e5e Extract Nexus URL using `nexus-staging-maven-plugin` (#246)
ceb3e5e is described below
commit ceb3e5e1a19621bc0d628760c6e82299bc1ea337
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Wed Oct 9 15:08:39 2024 +0200
Extract Nexus URL using `nexus-staging-maven-plugin` (#246)
---
.github/generate-email.sh | 7 ++--
.github/workflows/deploy-release-reusable.yaml | 5 ++-
pom.xml | 43 ++++++++++++++++++----
src/changelog/.11.x.x/change_nexus_deploy.xml | 8 ++++
.../ROOT/pages/release-instructions-project.adoc | 8 ----
5 files changed, 52 insertions(+), 19 deletions(-)
diff --git a/.github/generate-email.sh b/.github/generate-email.sh
index 2a03363..d485c25 100755
--- a/.github/generate-email.sh
+++ b/.github/generate-email.sh
@@ -28,12 +28,12 @@ stderr() {
fail_for_invalid_args() {
stderr "Invalid arguments!"
- stderr "Expected arguments: <vote|announce> <version> <commitId>"
+ stderr "Expected arguments: <vote|announce> <version> <commitId>
<nexusUrl>"
exit 1
}
# Check arguments
-[ $# -ne 3 ] && fail_for_invalid_args
+[ $# -ne 4 ] && fail_for_invalid_args
# Constants
PROJECT_NAME="Apache Logging Parent"
@@ -43,6 +43,7 @@ PROJECT_SITE="https://logging.apache.org/$PROJECT_ID"
PROJECT_STAGING_SITE="${PROJECT_SITE/apache.org/staged.apache.org}"
PROJECT_REPO="https://github.com/apache/$PROJECT_ID"
COMMIT_ID="$3"
+NEXUS_URL="$4"
PROJECT_DIST_URL="https://dist.apache.org/repos/dist/dev/logging/$PROJECT_ID/$PROJECT_VERSION"
# Check release notes file
@@ -71,7 +72,7 @@ Website: $PROJECT_STAGING_SITE-$PROJECT_VERSION
GitHub: $PROJECT_REPO
Commit: $COMMIT_ID
Distribution: $PROJECT_DIST_URL
-Nexus:
https://repository.apache.org/content/repositories/orgapachelogging-<FIXME>
+Nexus: $NEXUS_URL
Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0
Review kit:
https://logging.apache.org/logging-parent/release-review-instructions.html
diff --git a/.github/workflows/deploy-release-reusable.yaml
b/.github/workflows/deploy-release-reusable.yaml
index 64442b8..5486194 100644
--- a/.github/workflows/deploy-release-reusable.yaml
+++ b/.github/workflows/deploy-release-reusable.yaml
@@ -143,6 +143,8 @@ jobs:
./mvnw \
--show-version --batch-mode --errors --no-transfer-progress \
-P deploy,release
+ export NEXUS_URL=$(awk '/^(stagingRepository.url)/ {
gsub(/(^.+=|\\)/, ""); print $1 }' target/nexus-staging/staging/*.properties)
+ echo "NEXUS_URL=$NEXUS_URL" >> $GITHUB_ENV
# Node.js cache is needed for Antora
- name: Set up Node.js cache
@@ -273,7 +275,8 @@ jobs:
# Generate emails
for EMAIL_TYPE in vote announce; do
- "$GITHUB_WORKSPACE/.github/generate-email.sh" $EMAIL_TYPE
$PROJECT_VERSION $COMMIT_ID \
+ "$GITHUB_WORKSPACE/.github/generate-email.sh" \
+ "$EMAIL_TYPE" "$PROJECT_VERSION" "$COMMIT_ID" "$NEXUS_URL" \
> "${DIST_FILENAME_VERSIONED_PREFIX}-email-${EMAIL_TYPE}.txt"
done
diff --git a/pom.xml b/pom.xml
index 0f27870..0018f5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -231,7 +231,6 @@
<log4j-changelog-maven-plugin.version>0.9.0</log4j-changelog-maven-plugin.version>
<maven-artifact-plugin.version>3.5.1</maven-artifact-plugin.version>
<restrict-imports-enforcer-rule.version>2.6.0</restrict-imports-enforcer-rule.version>
- <sign-maven-plugin.version>1.1.0</sign-maven-plugin.version>
<spotbugs-maven-plugin.version>4.8.6.4</spotbugs-maven-plugin.version>
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
<xml-maven-plugin.version>1.1.0</xml-maven-plugin.version>
@@ -390,12 +389,6 @@
<version>${maven-artifact-plugin.version}</version>
</plugin>
- <plugin>
- <groupId>org.simplify4u.plugins</groupId>
- <artifactId>sign-maven-plugin</artifactId>
- <version>${sign-maven-plugin.version}</version>
- </plugin>
-
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
@@ -1312,11 +1305,18 @@
<id>deploy</id>
<properties>
+
+ <!-- Global configuration -->
<deployAtEnd>true</deployAtEnd>
<installAtEnd>true</installAtEnd>
<skipTests>true</skipTests>
<spotbugs.skip>true</spotbugs.skip>
<spotless.check.skip>true</spotless.check.skip>
+
+ <!-- Plugin versions -->
+
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
+ <sign-maven-plugin.version>1.1.0</sign-maven-plugin.version>
+
</properties>
<build>
@@ -1328,6 +1328,7 @@
<plugin>
<groupId>org.simplify4u.plugins</groupId>
<artifactId>sign-maven-plugin</artifactId>
+ <version>${sign-maven-plugin.version}</version>
<executions>
<execution>
<goals>
@@ -1337,6 +1338,34 @@
</executions>
</plugin>
+ <!-- Skip `maven-deploy-plugin`, we will use
`org.sonatype.plugins:nexus-staging-maven-plugin` instead -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ <!-- Using Sonatype plugin, since it reports the resultant Nexus URL
-->
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>${nexus-staging-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>default-deploy</id>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ <configuration>
+ <nexusUrl>https://repository.apache.org</nexusUrl>
+ <serverId>${distMgmtReleasesId}</serverId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
diff --git a/src/changelog/.11.x.x/change_nexus_deploy.xml
b/src/changelog/.11.x.x/change_nexus_deploy.xml
new file mode 100644
index 0000000..8e51183
--- /dev/null
+++ b/src/changelog/.11.x.x/change_nexus_deploy.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://logging.apache.org/xml/ns"
+ xsi:schemaLocation="https://logging.apache.org/xml/ns
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="changed">
+ <issue id="246" link="https://github.com/apache/logging-parent/pull/246"/>
+ <description format="asciidoc">Switch from `maven-deploy-plugin` to
`nexus-staging-maven-plugin`, which helps with fetching the Nexus repository
URL during a release</description>
+</entry>
diff --git
a/src/site/antora/modules/ROOT/pages/release-instructions-project.adoc
b/src/site/antora/modules/ROOT/pages/release-instructions-project.adoc
index 774e6e7..279171a 100644
--- a/src/site/antora/modules/ROOT/pages/release-instructions-project.adoc
+++ b/src/site/antora/modules/ROOT/pages/release-instructions-project.adoc
@@ -93,8 +93,6 @@ You can iterate on the `release/7.8.0` branch to perfect it.
+
If not, commit necessary fixes, push, and repeat.
-. _Close_ the repository in
https://repository.apache.org/[repository.apache.org] using a self-explanatory
description, e.g., ``\`{project-id}` version \`7.8.0` RC1``
-
[#vote-release]
== Vote the release
@@ -102,12 +100,6 @@ If not, commit necessary fixes, push, and repeat.
+
[WARNING]
====
-**Fix the cited https://repository.apache.org[repository.apache.org] URL** in
the generated email!
-It changes after every Nexus deployment.
-====
-+
-[WARNING]
-====
Make sure your email is sent in plain text, that is,
https://infra.apache.org/contrib-email-tips#nohtml[no HTML]!
If you are using GMail, enable the _"Plain text mode"_ while composing your
message.
====