From e5aefbd34f48cc091a2f550aa372048fb697595b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Mon, 26 Oct 2020 19:46:34 +0100 Subject: [PATCH 01/10] Add hello-strongbox-maven --- .github/workflows/gh-registry.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 4615ca4..7d47a86 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -70,3 +70,20 @@ jobs: working-directory: 'hello-strongbox-npm' env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish-hello-strongbox-maven: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-java@v1 + with: + java-version: 1.11 + - name: 'Copy Settings' + run: cp ~/.m2/settings.xml settings.xml + - name: Maven install + run: mvn -Dmaven.compiler.s ource=11 -Dmaven.compiler.target=11 install + working-directory: 'hello-strongbox-maven' + # This is seperate so it may only be deployed conditionally + - name: Maven deploy + run: mvn -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 deploy + working-directory: 'hello-strongbox-maven' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 5c9a2574652fec633dd16f7a3dcc8301051a1aa3 Mon Sep 17 00:00:00 2001 From: Martin Todorov Date: Tue, 27 Oct 2020 18:57:37 +0000 Subject: [PATCH 02/10] Update .github/workflows/gh-registry.yml --- .github/workflows/gh-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 7d47a86..f494afb 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -86,4 +86,4 @@ jobs: run: mvn -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 deploy working-directory: 'hello-strongbox-maven' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5172512906113a5d4dd63c05a34ea1cb563a5791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 20:50:53 +0100 Subject: [PATCH 03/10] Use Java 8 instead of 11 --- .github/workflows/gh-registry.yml | 6 +++--- hello-strongbox-maven/pom.xml | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 7d47a86..825e457 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -75,15 +75,15 @@ jobs: steps: - uses: actions/setup-java@v1 with: - java-version: 1.11 + java-version: 1.8 - name: 'Copy Settings' run: cp ~/.m2/settings.xml settings.xml - name: Maven install - run: mvn -Dmaven.compiler.s ource=11 -Dmaven.compiler.target=11 install + run: mvn clean install working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 deploy + run: mvn deploy working-directory: 'hello-strongbox-maven' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/hello-strongbox-maven/pom.xml b/hello-strongbox-maven/pom.xml index 3caf7af..be4d887 100644 --- a/hello-strongbox-maven/pom.xml +++ b/hello-strongbox-maven/pom.xml @@ -43,4 +43,17 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + From d8a26fe423a0004d7fc9a5ad8cc0e1573ab3ab18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 21:27:05 +0100 Subject: [PATCH 04/10] Add checkout and stuff --- .github/workflows/gh-registry.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 41d871e..bc6ce91 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -73,6 +73,7 @@ jobs: publish-hello-strongbox-maven: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: java-version: 1.8 @@ -83,7 +84,7 @@ jobs: working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn deploy + run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ env.GITHUB_REPOSITORY }} deploy working-directory: 'hello-strongbox-maven' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 5ae0eafea67df9f4cdc9f66984376227d9f14ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 21:39:32 +0100 Subject: [PATCH 05/10] . --- .github/workflows/gh-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index bc6ce91..6bcd392 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -84,7 +84,7 @@ jobs: working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ env.GITHUB_REPOSITORY }} deploy + run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy working-directory: 'hello-strongbox-maven' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e6f03f5649453864dcd53dab955b39b01e7d12f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 21:44:27 +0100 Subject: [PATCH 06/10] . --- .github/workflows/gh-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 6bcd392..e24b780 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -84,7 +84,7 @@ jobs: working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy + run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/bjoernakamanf/strongbox-examples deploy working-directory: 'hello-strongbox-maven' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 8fc95224f69a75c5099a9dab2c627611650ffac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 21:49:29 +0100 Subject: [PATCH 07/10] Revert back. Should work now --- .github/workflows/gh-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index e24b780..6bcd392 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -84,7 +84,7 @@ jobs: working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/bjoernakamanf/strongbox-examples deploy + run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy working-directory: 'hello-strongbox-maven' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From d680fa25a48c73c3e45ad7079e66af4922802c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Wed, 28 Oct 2020 21:54:01 +0100 Subject: [PATCH 08/10] Remove cp settings --- .github/workflows/gh-registry.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 6bcd392..95cbfc3 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -77,8 +77,6 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 1.8 - - name: 'Copy Settings' - run: cp ~/.m2/settings.xml settings.xml - name: Maven install run: mvn clean install working-directory: 'hello-strongbox-maven' From a70b3ff35a95993969aa0c1e30bc518d988b892a Mon Sep 17 00:00:00 2001 From: Martin Todorov Date: Thu, 29 Oct 2020 10:50:25 +0000 Subject: [PATCH 09/10] Update .github/workflows/gh-registry.yml --- .github/workflows/gh-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 95cbfc3..db2fd3f 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -85,4 +85,4 @@ jobs: run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy working-directory: 'hello-strongbox-maven' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 901cde7ebc4ad82a7bc415649135d8100a2a347a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Heinrichs?= Date: Fri, 13 Nov 2020 09:43:35 +0100 Subject: [PATCH 10/10] Configure ci-friendly versions for maven See strongbox/strongbox#1927 --- .github/workflows/gh-registry.yml | 6 ++++-- hello-strongbox-maven/pom.xml | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-registry.yml b/.github/workflows/gh-registry.yml index 95cbfc3..08d319f 100644 --- a/.github/workflows/gh-registry.yml +++ b/.github/workflows/gh-registry.yml @@ -77,12 +77,14 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 1.8 + # generate GitHub Package Registry ci-friendly version to avoid collision + - run: echo "GPR_VERSION=$(date '+%Y%m%d.%H%M')" >> $GITHUB_ENV - name: Maven install - run: mvn clean install + run: mvn -Dgpr.version=$GPR_VERSION clean install working-directory: 'hello-strongbox-maven' # This is seperate so it may only be deployed conditionally - name: Maven deploy - run: mvn -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy + run: mvn -Dgpr.version=$GPR_VERSION -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/$GITHUB_REPOSITORY deploy working-directory: 'hello-strongbox-maven' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/hello-strongbox-maven/pom.xml b/hello-strongbox-maven/pom.xml index be4d887..5556155 100644 --- a/hello-strongbox-maven/pom.xml +++ b/hello-strongbox-maven/pom.xml @@ -7,10 +7,18 @@ org.carlspring.strongbox.examples hello-strongbox-maven - 1.0-SNAPSHOT + ${gpr.version} 2019 + + + + + + 1.0-SNAPSHOT + + junit