[maven-release-plugin] prepare release 0.37.0
[qpid-jms.git] / appveyor.yml
index 1475b4616b88796c8ac8235527fcf85fee9ecf91..baae25b35e93c66b985b4ee58eddecfab086e0d0 100644 (file)
@@ -1,22 +1,46 @@
 version: '{build}'
 skip_tags: true
 clone_depth: 30
+
 environment:
-  JAVA_HOME: C:\Program Files\Java\jdk1.7.0
+  JAVA_HOME: C:\Program Files\Java\jdk1.8.0
+
 install:
   - ps: |
       Add-Type -AssemblyName System.IO.Compression.FileSystem
-      if (!(Test-Path -Path "C:\maven\apache-maven-3.3.3" )) {
+      if (!(Test-Path -Path "C:\maven\apache-maven-3.3.9" )) {
         (new-object System.Net.WebClient).DownloadFile(
-          'http://www.us.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.zip',
+          'http://repo2.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip',
           'C:\maven-bin.zip'
         )
         [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
       }
-  - cmd: SET PATH=C:\maven\apache-maven-3.3.3\bin;%JAVA_HOME%\bin;%PATH%
+  - cmd: SET PATH=C:\maven\apache-maven-3.3.9\bin;%JAVA_HOME%\bin;%PATH%
+
 build_script:
   - mvn clean install -B -DskipTests
+
 test_script:
   - mvn clean install -B
+
+on_failure:
+  - ps: |
+      7z a -r surefire-reports.zip '**\target\surefire-reports\*'
+      Push-AppveyorArtifact surefire-reports.zip -DeploymentName 'Surefire Reports'
+
+on_finish:
+  - ps: |
+      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
+      $wc = New-Object 'System.Net.WebClient'
+      $dirs = Get-ChildItem -Filter surefire-reports -Recurse
+      ForEach ($dir in $dirs)
+      {
+        $files = Get-ChildItem -Path $dir.FullName -Filter TEST-*.xml
+        ForEach ($file in $files)
+        {
+          $wc.UploadFile($url, (Resolve-Path $file.FullName))
+        }
+      }
+
 cache:
-  - C:\maven\apache-maven-3.3.3
+  - C:\maven\apache-maven-3.3.9