This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ec28d1d8852b3ffa58b1fce83bbaf2b07bce6eb4
Author: Nicolas Filotto <nfilo...@talend.com>
AuthorDate: Fri Feb 11 14:44:29 2022 +0100

    Use Maven daemon for the build pipeline
---
 .github/actions/install-mvnd/action.yml | 21 +++++++++++++++++++++
 .github/workflows/master-pr-build.yml   |  8 ++++++--
 .github/workflows/master-push-build.yml |  4 +++-
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/.github/actions/install-mvnd/action.yml 
b/.github/actions/install-mvnd/action.yml
new file mode 100644
index 0000000..a90d561
--- /dev/null
+++ b/.github/actions/install-mvnd/action.yml
@@ -0,0 +1,21 @@
+name: 'install-mvnd'
+description: 'Install the maven daemon'
+inputs:
+  version:
+    description: 'The version of the maven daemon to install'
+    required: true
+    default: '0.7.1'
+outputs:
+  mvnd-dir:
+    description: "The directory where the command mvnd is located"
+    value: ${{ steps.mvnd-location.outputs.mvnd-dir }}
+runs:
+  using: "composite"
+  steps:
+    - run: curl -fsSL -o mvnd.zip 
https://github.com/apache/maven-mvnd/releases/download/${{ inputs.version 
}}/mvnd-${{ inputs.version }}-linux-amd64.zip
+      shell: bash
+    - run: unzip mvnd.zip -d /tmp/
+      shell: bash
+    - id: mvnd-location
+      run: echo "::set-output name=mvnd-dir::/tmp/mvnd-${{ inputs.version 
}}-linux-amd64/bin"
+      shell: bash
diff --git a/.github/workflows/master-pr-build.yml 
b/.github/workflows/master-pr-build.yml
index 5072cf8..9851696 100644
--- a/.github/workflows/master-pr-build.yml
+++ b/.github/workflows/master-pr-build.yml
@@ -29,6 +29,8 @@ jobs:
     - uses: actions/checkout@v2
       with:
         persist-credentials: false
+    - id: install-mvnd
+      uses: ./.github/actions/install-mvnd
     - name: Set up JDK
       uses: actions/setup-java@v2
       with:
@@ -36,7 +38,7 @@ jobs:
         java-version: 11
         cache: 'maven'
     - name: mvn checkstyle
-      run: ./mvnw -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress  
-Dcheckstyle.failOnViolation=true checkstyle:checkstyle
+      run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 -V 
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress  
-Dcheckstyle.failOnViolation=true checkstyle:checkstyle
   build:
     runs-on: ubuntu-latest
     strategy:
@@ -47,6 +49,8 @@ jobs:
         with:
           persist-credentials: false
           fetch-depth: 0
+      - id: install-mvnd
+        uses: ./.github/actions/install-mvnd
       - name: Set up JDK ${{ matrix.java }}
         uses: actions/setup-java@v2
         with:
@@ -54,4 +58,4 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
       - name: maven build
-        run: ./mvnw -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress 
-Pfastinstall -Dcheckstyle.skip=true -DskipTests install
+        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 
-V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress 
-Pfastinstall -Dcheckstyle.skip=true -DskipTests install
diff --git a/.github/workflows/master-push-build.yml 
b/.github/workflows/master-push-build.yml
index 25135c7..5d10bd5 100644
--- a/.github/workflows/master-push-build.yml
+++ b/.github/workflows/master-push-build.yml
@@ -31,6 +31,8 @@ jobs:
       - uses: actions/checkout@v2
         with:
           persist-credentials: false
+      - id: install-mvnd
+        uses: ./.github/actions/install-mvnd
       - name: Set up JDK ${{ matrix.java }}
         uses: actions/setup-java@v2
         with:
@@ -38,7 +40,7 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
       - name: mvn sourcecheck
-        run: ./mvnw -V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress 
-Psourcecheck -Dcheckstyle.failOnViolation=true -DskipTests 
checkstyle:checkstyle verify
+        run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -Dmvnd.threads=2 
-V -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress 
-Psourcecheck -Dcheckstyle.failOnViolation=true -DskipTests 
checkstyle:checkstyle verify
       - name: Create Pull Request
         uses: peter-evans/create-pull-request@v3
         with:

Reply via email to