Skip to content

Commit 68bbaaa

Browse files
committed
deploy with Njord to Central Portal
1 parent 3e45bc9 commit 68bbaaa

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

.github/workflows/maven.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Java CI/CD
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
49

510
jobs:
611
build:
@@ -23,7 +28,7 @@ jobs:
2328
git config --global user.name "GitHub Action"
2429
- name: Build and Analyse Reactor with Maven
2530
if: github.ref != 'refs/heads/master'
26-
run: ./mvnw -B clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_aem-classification -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pcoverage-report
31+
run: ./mvnw -B clean install org.sonarsource.scanner.maven:sonar-maven-plugin:5.2.0.4988 -Dsonar.projectKey=Netcentric_aem-classification -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Dsonar.scanner.skipJreProvisioning=true -Pcoverage-report
2732
env:
2833
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
2934
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -34,7 +39,7 @@ jobs:
3439
run: ./mvnw -B clean site --file aem-classification-maven-plugin/pom.xml
3540
- name: Build, Analyse and Deploy Reactor with Maven
3641
if: github.ref == 'refs/heads/master'
37-
run: ./mvnw -B clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_aem-classification -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pcoverage-report
42+
run: ./mvnw -B clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:5.2.0.4988 -Dsonar.projectKey=Netcentric_aem-classification -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Dsonar.scanner.skipJreProvisioning=true -Pcoverage-report -DaltDeploymentRepository=id::njord:snapshot
3843
env:
3944
MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
4045
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}

pom.xml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,23 @@
4242

4343
<distributionManagement>
4444
<snapshotRepository>
45-
<id>ossrh</id>
46-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
45+
<id>sonatype-central-portal</id>
46+
<name>AEM Classification Snapshots</name>
47+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
4748
</snapshotRepository>
4849
<repository>
49-
<id>ossrh</id>
50-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
50+
<id>sonatype-central-portal</id>
51+
<name>AEM Classification Releases</name>
52+
<url>https://repo.maven.apache.org/maven2</url>
5153
</repository>
5254
</distributionManagement>
5355

5456
<properties>
55-
<maven.version>3.3.9</maven.version>
57+
<maven.version>3.9</maven.version>
5658
<maven.compiler.release>8</maven.compiler.release> <!-- used for compiler and javadoc plugin -->
5759
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5860
<junit.jupiter.version>5.9.0</junit.jupiter.version>
61+
<njord.version>0.8.3</njord.version>
5962
</properties>
6063

6164
<dependencyManagement>
@@ -76,8 +79,20 @@
7679
</dependencyManagement>
7780

7881
<build>
82+
<extensions>
83+
<extension>
84+
<groupId>eu.maveniverse.maven.njord</groupId>
85+
<artifactId>extension3</artifactId>
86+
<version>${njord.version}</version>
87+
</extension>
88+
</extensions>
7989
<pluginManagement>
8090
<plugins>
91+
<plugin>
92+
<groupId>eu.maveniverse.maven.plugins</groupId>
93+
<artifactId>njord</artifactId>
94+
<version>${njord.version}</version>
95+
</plugin>
8196
<plugin>
8297
<artifactId>maven-surefire-plugin</artifactId>
8398
<version>3.5.1</version>
@@ -254,18 +269,6 @@
254269
<scmReleaseCommitComment>@{prefix} prepare release @{releaseLabel} [skip ci]</scmReleaseCommitComment>
255270
</configuration>
256271
</plugin>
257-
<plugin>
258-
<groupId>org.sonatype.plugins</groupId>
259-
<artifactId>nexus-staging-maven-plugin</artifactId>
260-
<extensions>true</extensions>
261-
<configuration>
262-
<serverId>ossrh</serverId>
263-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
264-
<!-- manually release in https://oss.sonatype.org/#stagingRepositories after the Maven release build -->
265-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
266-
</configuration>
267-
</plugin>
268-
269272
<plugin>
270273
<groupId>org.codehaus.mojo</groupId>
271274
<artifactId>license-maven-plugin</artifactId>

0 commit comments

Comments
 (0)