This is an automated email from the ASF dual-hosted git repository.
arm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-actions.git
The following commit(s) were added to refs/heads/main by this push:
new 1398d00 Change expected repo layout - jar and pom
1398d00 is described below
commit 1398d0006b1f3cc080619ccc364a7f0ec39335ea
Author: Alastair McFarlane <[email protected]>
AuthorDate: Fri Jan 16 16:43:25 2026 +0000
Change expected repo layout - jar and pom
---
.github/workflows/distribute-maven-stg.yml | 63 ++++++++++++++++++++++++++----
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/distribute-maven-stg.yml
b/.github/workflows/distribute-maven-stg.yml
index 5f33f2a..5b81acb 100644
--- a/.github/workflows/distribute-maven-stg.yml
+++ b/.github/workflows/distribute-maven-stg.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-name: Distribute from ATR to Maven (stage - RAO)
+name: Distribute from ATR to Maven Central
run-name: "${{ inputs.atr-id }}"
on:
@@ -56,6 +56,7 @@ jobs:
ATR_HOST: release-test.apache.org
SSH_PORT: 2222
WORKFLOW: distribute-maven-stg.yml
+ NJORD_STORE: njord-deployer
RAO_USERNAME: ${{ secrets.RAO_USERNAME }}
RAO_PASSWORD: ${{ secrets.RAO_PASSWORD }}
steps:
@@ -77,13 +78,33 @@ jobs:
<configuration>
<njord.publisher>sonatype-nx3</njord.publisher>
<njord.publisher.sonatype-nx3.baseUrl>https://repository.apache.org:4443/</njord.publisher.sonatype-nx3.baseUrl>
-
<njord.publisher.sonatype-nx3.releaseRepositoryName>maven-staging</njord.publisher.sonatype-nx3.releaseRepositoryName>
</configuration>
</server>
</servers>
</settings>
EOF
+ - name: Create pom.xml
+ run: |
+ <?xml version="1.0" encoding="UTF-8"?>
+ <project xmlns="http://maven.apache.org/POM/4.0.0">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>local</groupId>
+ <artifactId>$NJORD_STORE</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>eu.maveniverse.maven.njord</groupId>
+ <artifactId>extension3</artifactId>
+ <version>0.9.2</version>
+ </extension>
+ </extensions>
+ </build>
+ </project>
+
- name: Set up JDK 17
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
with:
@@ -185,9 +206,35 @@ jobs:
SSH_PRIVATE_KEY_PATH: ${{
steps.generate-ssh-key.outputs.ssh_private_key_path }}
- name: Build and stage locally
- working-directory: ./stg
run: |
- mvn clean deploy -DaltDeploymentRepository=local::njord:
+ DIR="stg"
+ BASE="${ARTIFACT_ID}-${VERSION}"
+
+ FILES="" CLASSIFIERS="" TYPES=""
+ for f in "$DIR/${BASE}"-*.*; do
+ # Skip checksums and signatures
+ [[ "$f" =~ \.(asc|sha1|sha256|sha512|md5)$ ]] && continue
+ # Skip main jar and pom
+ [[ "$f" == "$DIR/${BASE}.jar" ]] && continue
+ [[ "$f" == "$DIR/${BASE}.pom" ]] && continue
+
+ # Extract classifier and type from filename
+ suffix="${f#$DIR/${BASE}-}"
+ classifier="${suffix%.*}"
+ type="${suffix##*.}"
+
+ FILES="${FILES:+$FILES,}$f"
+ CLASSIFIERS="${CLASSIFIERS:+$CLASSIFIERS,}$classifier"
+ TYPES="${TYPES:+$TYPES,}$type"
+ done
+
+ mvn deploy:deploy-file \
+ -Dfile="$DIR/${BASE}.jar" \
+ -DpomFile="$DIR/${BASE}.pom" \
+ -Durl=njord: \
+ -DrepositoryId=njord-local \
+ ${FILES:+-Dfiles="$FILES" -Dclassifiers="$CLASSIFIERS"
-Dtypes="$TYPES"}
+
- name: Create staging tag
run: |
@@ -206,10 +253,10 @@ jobs:
- name: Get store ID and publish
working-directory: ./stg
run: |
- echo "Publishing store: $INPUTS_DISTRIBUTION_PACKAGE-00001"
- mvn njord:validate -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001
-X
- mvn njord:publish -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001
-Dnjord.target=rao3
-Dnjord.publisher.sonatype-nx3.releaseRepositoryName=maven-staging -X
- mvn njord:drop -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001 -X
+ echo "Publishing store: $NJORD_STORE-00001"
+ mvn njord:validate -Dnjord.store=$NJORD_STORE-00001
+ mvn njord:publish -Dnjord.store=$NJORD_STORE-00001
-Dnjord.target=rao3
-Dnjord.publisher.sonatype-nx3.releaseRepositoryName=maven-staging
+ mvn njord:drop -Dnjord.store=$NJORD_STORE-00001
env:
INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]