From 9b901009124dc80fb05f92de76959d4f3cc575ff Mon Sep 17 00:00:00 2001 From: T Murali Date: Sun, 20 Apr 2025 16:15:44 -0400 Subject: [PATCH 01/10] Create maven_wf.yml Created a workflow file for building the project using Maven. --- .github/workflows/maven.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..06b6aa0 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,35 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 From 0430b3fed2a34bdfcb689cead26786af39074579 Mon Sep 17 00:00:00 2001 From: T Murali Date: Sun, 20 Apr 2025 16:22:29 -0400 Subject: [PATCH 02/10] Update maven.yml --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 06b6aa0..dbc15dd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -33,3 +33,4 @@ jobs: # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - name: Update dependency graph uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + From 5565b7d4710280259cf74ca9485c61e14e70d995 Mon Sep 17 00:00:00 2001 From: T Murali Date: Sun, 20 Apr 2025 16:24:14 -0400 Subject: [PATCH 03/10] Update maven.yml --- .github/workflows/maven.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index dbc15dd..4460d45 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,8 +29,4 @@ jobs: cache: maven - name: Build with Maven run: mvn -B package --file pom.xml - - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 - + From d053bdf34332dc4bc6cdaac1098590e35b7094e5 Mon Sep 17 00:00:00 2001 From: T Murali Date: Sun, 20 Apr 2025 16:32:42 -0400 Subject: [PATCH 04/10] Update maven.yml Updated JDK to use corretto --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4460d45..50cd2ae 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,7 +25,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: '17' - distribution: 'temurin' + distribution: 'corretto' cache: maven - name: Build with Maven run: mvn -B package --file pom.xml From cd3090d7c86ae3bf3d56f8fb461b76c8edb59c1d Mon Sep 17 00:00:00 2001 From: T Murali Date: Mon, 22 Sep 2025 21:51:48 -0400 Subject: [PATCH 05/10] Add Nexus deployment step to Maven workflow --- .github/workflows/maven.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 50cd2ae..87e4542 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -30,3 +30,11 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml + - name: Deploy to Nexus + run: | + mvn deploy -DskipTests \ + -DaltDeploymentRepository=nexus::default::${{ secrets.NEXUS_URL }}/repository/maven-releases/ \ + -Dusername=${{ secrets.NEXUS_USERNAME }} \ + -Dpassword=${{ secrets.NEXUS_PASSWORD }} + env: + MAVEN_OPTS: "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true" From 9b063ad30e1ab9190702af82a2a0f8987a29bdf1 Mon Sep 17 00:00:00 2001 From: T Murali Date: Mon, 22 Sep 2025 21:55:21 -0400 Subject: [PATCH 06/10] Update Nexus deployment repository in maven.yml Fixed the target Nexu repo --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 87e4542..920c24e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -33,7 +33,7 @@ jobs: - name: Deploy to Nexus run: | mvn deploy -DskipTests \ - -DaltDeploymentRepository=nexus::default::${{ secrets.NEXUS_URL }}/repository/maven-releases/ \ + -DaltDeploymentRepository=nexus::default::${{ secrets.NEXUS_URL }}/repository/tm-maven-releases/ \ -Dusername=${{ secrets.NEXUS_USERNAME }} \ -Dpassword=${{ secrets.NEXUS_PASSWORD }} env: From addbf5dfdf61fd7800fc301b7fcbfd25553c4c54 Mon Sep 17 00:00:00 2001 From: T Murali Date: Mon, 22 Sep 2025 22:01:55 -0400 Subject: [PATCH 07/10] Update Maven workflow to include settings.xml creation --- .github/workflows/maven.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 920c24e..f6b4239 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -30,11 +30,27 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - - name: Deploy to Nexus + - name: Create Maven settings.xml run: | - mvn deploy -DskipTests \ - -DaltDeploymentRepository=nexus::default::${{ secrets.NEXUS_URL }}/repository/tm-maven-releases/ \ - -Dusername=${{ secrets.NEXUS_USERNAME }} \ - -Dpassword=${{ secrets.NEXUS_PASSWORD }} + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml << EOF + + + + nexus-releases + ${{ secrets.NEXUS_USERNAME }} + ${{ secrets.NEXUS_PASSWORD }} + + + nexus-snapshots + ${{ secrets.NEXUS_USERNAME }} + ${{ secrets.NEXUS_PASSWORD }} + + + + EOF + + - name: Deploy to Nexus + run: mvn deploy -DskipTests env: MAVEN_OPTS: "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true" From f220eb88efff5a207a3d14a393bda704b1e3aeed Mon Sep 17 00:00:00 2001 From: T Murali Date: Mon, 22 Sep 2025 22:25:39 -0400 Subject: [PATCH 08/10] Add Nexus repository configuration to pom.xml --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index c57ba6e..f284599 100644 --- a/pom.xml +++ b/pom.xml @@ -80,6 +80,20 @@ + + + + nexus-releases + Nexus Release Repository + https://undenounced-elza-noncalumniating.ngrok-free.dev/repository/tm-maven-releases/ + + + nexus-snapshots + Nexus Snapshot Repository + https://undenounced-elza-noncalumniating.ngrok-free.dev/repository/maven-snapshots/ + + + From 290b903fd302fb994d703556ffa7de6bdd0a3b1b Mon Sep 17 00:00:00 2001 From: T Murali Date: Tue, 23 Sep 2025 02:46:37 -0400 Subject: [PATCH 09/10] Update Maven deploy command with Nexus repository --- .github/workflows/maven.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f6b4239..db5ed66 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -51,6 +51,8 @@ jobs: EOF - name: Deploy to Nexus - run: mvn deploy -DskipTests + run: | + mvn deploy -DskipTests \ + -DaltDeploymentRepository=nexus-releases::default::${{ secrets.NEXUS_URL }}/repository/tm-maven-releases/ env: MAVEN_OPTS: "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true" From 0512d144031e1d49b28742db1cb40fb0f17f37b5 Mon Sep 17 00:00:00 2001 From: T Murali Date: Tue, 23 Sep 2025 02:46:58 -0400 Subject: [PATCH 10/10] Remove distribution management from pom.xml --- pom.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pom.xml b/pom.xml index f284599..c57ba6e 100644 --- a/pom.xml +++ b/pom.xml @@ -80,20 +80,6 @@ - - - - nexus-releases - Nexus Release Repository - https://undenounced-elza-noncalumniating.ngrok-free.dev/repository/tm-maven-releases/ - - - nexus-snapshots - Nexus Snapshot Repository - https://undenounced-elza-noncalumniating.ngrok-free.dev/repository/maven-snapshots/ - - -