Skip to content

Commit e81e286

Browse files
PrafulrakhadePiyush7034
authored andcommitted
Mosip 41674 migration changes (mosip#366)
* [MOSIP-41674] central sonatype migration changes Signed-off-by: techno-467 <prafulrakhade02@gmail.com> * [MOSIP-41674] central sonatype migration changes Signed-off-by: techno-467 <prafulrakhade02@gmail.com> * [MOSIP-41674] central sonatype migration changes Signed-off-by: techno-467 <prafulrakhade02@gmail.com> * [MOSIP-41674] central sonatype migration changes Signed-off-by: techno-467 <prafulrakhade02@gmail.com> --------- Signed-off-by: techno-467 <prafulrakhade02@gmail.com> Co-authored-by: Prafulrakhade <prafulrakhade@users.noreply.github.com> Signed-off-by: Vishwa <visu.vs1@gmail.com> Signed-off-by: Piyush7034 <piyushshukla2100@gmail.com>
1 parent 231c8e6 commit e81e286

File tree

4 files changed

+57
-48
lines changed

4 files changed

+57
-48
lines changed

.github/workflows/push-trigger.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,19 @@ jobs:
9494
run: |
9595
echo "Condition Met: ${{ steps.check_output.outputs.is_condition }}"
9696
97-
# Ignorning for now until migration to central nexus is done.
98-
# publish_to_nexus:
99-
# if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
100-
# needs: build-maven-inji-certify
101-
# uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
102-
# with:
103-
# SERVICE_LOCATION: ./
104-
# secrets:
105-
# OSSRH_USER: ${{ secrets.OSSRH_USER }}
106-
# OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
107-
# OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
108-
# OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
109-
# GPG_SECRET: ${{ secrets.GPG_SECRET }}
110-
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
97+
publish_to_nexus:
98+
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
99+
needs: build-maven-inji-certify
100+
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
101+
with:
102+
SERVICE_LOCATION: ./
103+
secrets:
104+
OSSRH_USER: ${{ secrets.OSSRH_USER }}
105+
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
106+
OSSRH_URL: ${{ secrets.OSSRH_CENTRAL_URL }}
107+
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
108+
GPG_SECRET: ${{ secrets.GPG_SECRET }}
109+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
111110

112111
build-dockers:
113112
needs: build-maven-inji-certify
@@ -147,7 +146,7 @@ jobs:
147146

148147
# Removing publish_to_nexus for now from the list until migration to central nexus is done.
149148
build-docker-inji-certify-with-plugins:
150-
needs: [ maven-build-inji-certify-with-plugins, check_snapshot_version ]
149+
needs: [ maven-build-inji-certify-with-plugins, check_snapshot_version, publish_to_nexus ]
151150
if: ${{ needs.check_snapshot_version.outputs.is_condition == 'true' }}
152151
strategy:
153152
matrix:
@@ -195,19 +194,19 @@ jobs:
195194
GPG_SECRET: ${{ secrets.GPG_SECRET }}
196195
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
197196

198-
publish_to_nexus_apitest_inji_certify:
199-
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}"
200-
needs: build-maven-apitest-inji-certify
201-
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
202-
with:
203-
SERVICE_LOCATION: ./api-test
204-
secrets:
205-
OSSRH_USER: ${{ secrets.OSSRH_USER }}
206-
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
207-
OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
208-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
209-
GPG_SECRET: ${{ secrets.GPG_SECRET }}
210-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
197+
# publish_to_nexus_apitest_inji_certify:
198+
# if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}"
199+
# needs: build-maven-apitest-inji-certify
200+
# uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
201+
# with:
202+
# SERVICE_LOCATION: ./api-test
203+
# secrets:
204+
# OSSRH_USER: ${{ secrets.OSSRH_USER }}
205+
# OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
206+
# OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
207+
# OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
208+
# GPG_SECRET: ${{ secrets.GPG_SECRET }}
209+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
211210

212211
build-apitest-inji-certify-local:
213212
needs: build-maven-apitest-inji-certify

certify-service-with-plugins/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<sunbird-rc-certify-integration-plugin.version>0.4.0</sunbird-rc-certify-integration-plugin.version>
4747
<sunbird-rc-certify-integration-plugin.fileName>sunbird-rc-certify-integration-impl.jar</sunbird-rc-certify-integration-plugin.fileName>
4848
</properties>
49-
5049
<build>
5150
<plugins>
5251
<plugin>

certify-service/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@
190190
<goal>build-info</goal>
191191
<goal>repackage</goal>
192192
</goals>
193+
<configuration>
194+
<attach>false</attach>
195+
</configuration>
193196
</execution>
194197
</executions>
195198
</plugin>

pom.xml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646

4747
<repositories>
4848
<repository>
49-
<id>ossrh</id>
50-
<name>CentralRepository</name>
51-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
49+
<id>ossrh-central</id>
50+
<name>MavenCentralRepository</name>
51+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
5252
<layout>default</layout>
5353
<snapshots>
5454
<enabled>true</enabled>
@@ -72,11 +72,11 @@
7272
<distributionManagement>
7373
<snapshotRepository>
7474
<id>ossrh</id>
75-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
75+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
7676
</snapshotRepository>
7777
<repository>
7878
<id>ossrh</id>
79-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
79+
<url>https://central.sonatype.com/api/v1/publisher</url>
8080
</repository>
8181
</distributionManagement>
8282

@@ -97,6 +97,7 @@
9797
<maven-shade-plugin.version>4.4.3</maven-shade-plugin.version>
9898

9999
<spring.boot.version>3.2.3</spring.boot.version>
100+
<central.publishing.maven.plugin.version>0.7.0</central.publishing.maven.plugin.version>
100101

101102
<java.version>21</java.version>
102103
<jose4j.version>0.6.5</jose4j.version>
@@ -205,14 +206,27 @@
205206
<plugin>
206207
<groupId>org.springframework.boot</groupId>
207208
<artifactId>spring-boot-maven-plugin</artifactId>
208-
<!--<version>${spring.boot.version}</version>-->
209+
<!-- <version>${spring.boot.version}</version> -->
209210
<configuration>
210211
<executable>true</executable>
211212
<layout>ZIP</layout>
212213
</configuration>
213214
<executions>
215+
<!-- Build info and repackage -->
216+
<execution>
217+
<id>build-info-repackage</id>
218+
<goals>
219+
<goal>build-info</goal>
220+
<goal>repackage</goal>
221+
</goals>
222+
<configuration>
223+
<attach>false</attach>
224+
</configuration>
225+
</execution>
226+
<!-- Integration test startup -->
214227
<execution>
215228
<id>pre-integration-test</id>
229+
<phase>pre-integration-test</phase>
216230
<goals>
217231
<goal>start</goal>
218232
</goals>
@@ -227,21 +241,16 @@
227241
<argument>--server.port=8090</argument>
228242
<argument>--server.servlet.path=/app/generic</argument>
229243
</arguments>
230-
231244
</configuration>
232245
</execution>
246+
<!-- Integration test shutdown -->
233247
<execution>
234248
<id>post-integration-test</id>
249+
<phase>post-integration-test</phase>
235250
<goals>
236251
<goal>stop</goal>
237252
</goals>
238253
</execution>
239-
<execution>
240-
<goals>
241-
<goal>build-info</goal>
242-
<goal>repackage</goal>
243-
</goals>
244-
</execution>
245254
</executions>
246255
</plugin>
247256
<plugin>
@@ -361,14 +370,13 @@
361370
</configuration>
362371
</plugin>
363372
<plugin>
364-
<groupId>org.sonatype.plugins</groupId>
365-
<artifactId>nexus-staging-maven-plugin</artifactId>
366-
<version>1.6.14</version>
373+
<groupId>org.sonatype.central</groupId>
374+
<artifactId>central-publishing-maven-plugin</artifactId>
375+
<version>${central.publishing.maven.plugin.version}</version>
367376
<extensions>true</extensions>
368377
<configuration>
369-
<serverId>ossrh</serverId>
370-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
371-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
378+
<publishingServerId>ossrh</publishingServerId>
379+
<autoPublish>false</autoPublish>
372380
</configuration>
373381
</plugin>
374382

0 commit comments

Comments
 (0)