You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/04/01 08:16:54 UTC

[maven-dependency-plugin] 01/01: Testing GitHub Actions.

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

slachiewicz pushed a commit to branch GITHUB_ACTIONS
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit d16e5119b2c63e660a87ab1b773833129bd63983
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Mon Aug 12 22:40:03 2019 +0200

    Testing GitHub Actions.
---
 .github/workflows/maven.yml                        | 101 +++++++++++++++++++++
 .../fromConfiguration/TestUnpackMojo.java          |   5 +-
 2 files changed, 103 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..a946e97
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,101 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# added comment to trigger build.
+name: MDEP
+on:
+  push:
+    branches:
+    - master
+    - GITHUB*
+  pull_request: 
+    branches:
+    - MDEP-*
+    - GITHUB*
+    
+jobs:
+  mdep_linux_8:
+    name: Ubuntu (OpenJDK 8)
+    runs-on: ubuntu-latest
+    container: maven:3.6.1-jdk-8-slim
+    steps:
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 10
+    - name: Build
+      run: mvn -V --no-transfer-progress -B clean verify -Prun-its
+      shell: bash
+      env:
+       LC_ALL: en_US.UTF-8
+  mdep_linux_11:
+    name: Ubuntu (OpenJDK 11)
+    runs-on: ubuntu-latest
+    container: maven:3.6.1-jdk-11-slim
+    steps:
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 10
+    - name: Build
+      run: mvn -V --no-transfer-progress -B clean verify -Prun-its
+      shell: bash
+      env:
+       LC_ALL: en_US.UTF-8
+  mdep_linux_12:
+    name: Ubuntu (OpenJDK 12)
+    runs-on: ubuntu-latest
+    container: maven:3.6.1-jdk-12
+    steps:
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 10
+    - name: Build
+      run: mvn -V --no-transfer-progress -B clean verify -Prun-its
+      shell: bash
+      env:
+       LC_ALL: en_US.UTF-8
+  mdep_linux_13:
+    name: Ubuntu (OpenJDK 13)
+    runs-on: ubuntu-latest
+    container: maven:3.6.1-jdk-13
+    steps:
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 10
+    - name: Build
+      run: mvn -V --no-transfer-progress -B clean verify -Prun-its
+      shell: bash
+      env:
+       LC_ALL: en_US.UTF-8
+  mdep_windows:
+    name: Windows
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 10
+   
+    - run: choco install openjdk --version 12.0.2
+      shell: bash
+    - name: Test
+      run: |
+        set -e
+        export JAVA_HOME="C:\Program Files\OpenJDK\jdk-12.0.2"
+        mvn -V --no-transfer-progress -B clean verify -Prun-its
+      
+      shell: bash
+      env:
+       LC_ALL: en_US.UTF-8
diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestUnpackMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestUnpackMojo.java
index 91b0640..d6803bc 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestUnpackMojo.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestUnpackMojo.java
@@ -541,7 +541,7 @@ public class TestUnpackMojo
         mojo.setSilent( false );
         stubFactory.setCreateFiles( true );
         Artifact artifact = stubFactory.getSnapshotArtifact();
-        assertTrue( artifact.getFile().setLastModified( now - 20000 ) );
+        assertTrue( artifact.getFile().setLastModified( now - 10000 ) );
 
         ArtifactItem item = new ArtifactItem( createArtifact( artifact ) );
 
@@ -554,8 +554,7 @@ public class TestUnpackMojo
         // round down to the last second
         long time = now;
         time = time - ( time % 1000 );
-        // go back 10 more seconds for linux
-        time -= 10000;
+
         // set to known value
         assertTrue( unpackedFile.setLastModified( time ) );
         // set source to be newer was 4s but test is brittle on MacOS if less than 5s