From a3e44acb656c883258d779d4d724e58625aaba6c Mon Sep 17 00:00:00 2001 From: Angshuman Sarkar Date: Tue, 28 Feb 2023 15:17:42 +0530 Subject: [PATCH 1/4] BAH-2849 | Changing group id for nexus sonatype release. Adding necessary POM info for nexus. Changing GHA action to publish to nexus --- .github/workflows/build_publish.yml | 8 ++++++- api/pom.xml | 4 ++-- omod/pom.xml | 14 ++++++------ pom.xml | 34 ++++++++++++++++++++++++----- 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index cc2c237..57f8d53 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -13,6 +13,9 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + server-id: nexus-sonatype + server-username: NEXUS_USERNAME + server-password: NEXUS_PASSWORD - name: Set AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -20,5 +23,8 @@ jobs: aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }} aws-region: ap-southeast-1 - name: Build and deploy with Maven - run: ./mvnw --no-transfer-progress clean -U deploy -Pmybahmni-s3 + run: ./mvnw --no-transfer-progress clean -U deploy + env: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/api/pom.xml b/api/pom.xml index 04b65ab..8eef265 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.openmrs.module + org.bahmni.module episodes - 1.0-SNAPSHOT + 1.0.0-SNAPSHOT episodes-api diff --git a/omod/pom.xml b/omod/pom.xml index cdd3a31..a585f66 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.openmrs.module + org.bahmni.module episodes - 1.0-SNAPSHOT + 1.0.0-SNAPSHOT episodes-omod @@ -13,11 +13,11 @@ Implementation of Episodes of Care for OpenMRS - - org.openmrs.module - episodes-api - ${project.parent.version} - + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + org.openmrs.web openmrs-web diff --git a/pom.xml b/pom.xml index c278dba..c38e37a 100644 --- a/pom.xml +++ b/pom.xml @@ -2,14 +2,38 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.openmrs.module + org.bahmni.module episodes - 1.0-SNAPSHOT + 1.0.0-SNAPSHOT pom Episodes of Care Module Implementation of Episodes of Care for OpenMRS + https://github.com/Bahmni/openmrs-module-episodes + + Bahmni + http://bahmni.org + - https://wiki.openmrs.org/x/_gBl + + + GNU AFFERO GENERAL PUBLIC LICENSE, Version 3.0 + https://www.gnu.org/licenses/agpl-3.0.txt + + + + + Bahmni + bahmnicommunity@gmail.com + Bahmni + https://github.com/Bahmni + + + + scm:git:git@github.com:Bahmni/openmrs-module-episodes.git + scm:git:git@github.com:Bahmni/openmrs-module-episodes.git + https://github.com/Bahmni/openmrs-module-episodes + HEAD + api @@ -18,10 +42,10 @@ 2.4.2 - episodes + ${project.artifactId} ${project.name} ${project.version} - ${project.groupId}.${MODULE_ID} + org.openmrs.module.${MODULE_ID} ${project.description} ${openmrs.platform.version} UTF-8 From 7502f6c2dbadf4b7c1a2a388b9b3128a748c4ac7 Mon Sep 17 00:00:00 2001 From: Angshuman Sarkar Date: Tue, 28 Feb 2023 16:09:44 +0530 Subject: [PATCH 2/4] BAH-2849 | Adding profile for release signing --- pom.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/pom.xml b/pom.xml index c38e37a..3275aab 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,57 @@ + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + From dff5fbe4f4e43febfef8ce0263ced11f34be7431 Mon Sep 17 00:00:00 2001 From: Angshuman Sarkar Date: Tue, 28 Feb 2023 16:23:07 +0530 Subject: [PATCH 3/4] BAH-2849 | Moving distributionManagement as default (outside a profile) and also adding a dummy class for nexus requirements for javadoc jar (no javadoc is created without a java class) --- .../module/episodes/ModuleDescriptor.java | 4 +++ pom.xml | 27 ++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 omod/src/main/java/org/openmrs/module/episodes/ModuleDescriptor.java diff --git a/omod/src/main/java/org/openmrs/module/episodes/ModuleDescriptor.java b/omod/src/main/java/org/openmrs/module/episodes/ModuleDescriptor.java new file mode 100644 index 0000000..ef830a6 --- /dev/null +++ b/omod/src/main/java/org/openmrs/module/episodes/ModuleDescriptor.java @@ -0,0 +1,4 @@ +package org.openmrs.module.episodes; + +public class ModuleDescriptor { +} diff --git a/pom.xml b/pom.xml index 3275aab..ed79313 100644 --- a/pom.xml +++ b/pom.xml @@ -55,23 +55,18 @@ 4.0.1 - - + + nexus-sonatype - - true - - - - nexus-sonatype - https://oss.sonatype.org/content/repositories/snapshots - - - nexus-sonatype - https://oss.sonatype.org/service/local/staging/deploy/maven2 - - - + https://oss.sonatype.org/content/repositories/snapshots + + + nexus-sonatype + https://oss.sonatype.org/service/local/staging/deploy/maven2 + + + + mybahmni-s3 From 4a3bc1eec43e4e1bfb9ee68bb29b49d2c3691eb0 Mon Sep 17 00:00:00 2001 From: Angshuman Sarkar Date: Tue, 28 Feb 2023 17:40:23 +0530 Subject: [PATCH 4/4] BAH-2849 | removing s3 profile and also modifying GHA to remove AWS S3 release for snapshots --- .github/workflows/build_publish.yml | 6 ------ pom.xml | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 57f8d53..2d4bf67 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -16,12 +16,6 @@ jobs: server-id: nexus-sonatype server-username: NEXUS_USERNAME server-password: NEXUS_PASSWORD - - name: Set AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.S3_MVN_ACCESS_KEY }} - aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }} - aws-region: ap-southeast-1 - name: Build and deploy with Maven run: ./mvnw --no-transfer-progress clean -U deploy env: diff --git a/pom.xml b/pom.xml index ed79313..205afb3 100644 --- a/pom.xml +++ b/pom.xml @@ -67,16 +67,6 @@ - - mybahmni-s3 - - - repo.mybahmni.org - bahmni-artifactory-snapshots - s3://repo.mybahmni.org/artifactory/snapshot - - - release-sign-artifacts