From 36d3a11d7be7180c3b0928c158fcf964e4480888 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 16:48:52 +0000 Subject: [PATCH 1/6] Create build.yml --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a5d49fd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml From 43eb1a5324938731d2691f9a6a648b537f650c46 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 16:51:57 +0000 Subject: [PATCH 2/6] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5d49fd..c05b17d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,4 +23,4 @@ jobs: distribution: 'adopt' cache: maven - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -s settings.xml -B package --file pom.xml From 1807a45ecfa8bbe989f9ef7f227d2b6fae550c16 Mon Sep 17 00:00:00 2001 From: Tom Lafford Date: Sat, 4 Dec 2021 17:08:31 +0000 Subject: [PATCH 3/6] Update build.yml --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c05b17d..1fb4a17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,5 +22,11 @@ jobs: java-version: '11' distribution: 'adopt' cache: maven + server-id: github + server-username: GITHUB_USER_REF + server-password: GITHUB_TOKEN_REF - name: Build with Maven + env: + GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} + GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} run: mvn -s settings.xml -B package --file pom.xml From a4c4c29629f0830f0c3278dbb92ad150a7e0a88a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 10:55:54 +0000 Subject: [PATCH 4/6] Copy dependencies --- pom.xml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 0828de6..f5158c2 100644 --- a/pom.xml +++ b/pom.xml @@ -34,11 +34,11 @@ GitHub OWNER Apache Maven Packages https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core - true - - - true - + true + + + true + @@ -72,6 +72,24 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory} + false + true + + + + From 883a894ed19d3628c274ded1abba83004235b844 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 11:10:32 +0000 Subject: [PATCH 5/6] Remove spring plugin --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f5158c2..c34d74d 100644 --- a/pom.xml +++ b/pom.xml @@ -69,8 +69,8 @@ - org.springframework.boot - spring-boot-maven-plugin + org.apache.maven.plugins + maven-surefire-plugin org.apache.maven.plugins From ce0a97ec9393ae6ac6456b4cb34af1b5ce1a0166 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Dec 2021 11:11:46 +0000 Subject: [PATCH 6/6] Remove duplicated action --- .github/workflows/build.yml | 32 -------------------------------- .github/workflows/maven.yml | 12 +++++++----- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1fb4a17..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,32 +0,0 @@ -# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - cache: maven - server-id: github - server-username: GITHUB_USER_REF - server-password: GITHUB_TOKEN_REF - - name: Build with Maven - env: - GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} - GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn -s settings.xml -B package --file pom.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e3dc4b..1fb4a17 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven +# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Java CI with Maven @@ -16,10 +16,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: '11' + distribution: 'adopt' + cache: maven server-id: github server-username: GITHUB_USER_REF server-password: GITHUB_TOKEN_REF @@ -27,4 +29,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn -s settings.xml -B package --file pom.xml