deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwellm...@apache.org
Subject deltaspike git commit: DELTASPIKE-931 Integration tests fail when dependencies are class folders, not JARs
Date Tue, 16 Jun 2015 08:52:18 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master e224405e1 -> 029435236


DELTASPIKE-931 Integration tests fail when dependencies are class
folders, not JARs

make library names unique by appending a numeric suffix, if needed

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/02943523
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/02943523
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/02943523

Branch: refs/heads/master
Commit: 029435236c08e79f66f1461f8e684ea690c1b7cd
Parents: e224405
Author: Harald Wellmann <hwellmann@apache.org>
Authored: Tue Jun 16 10:52:03 2015 +0200
Committer: Harald Wellmann <hwellmann@apache.org>
Committed: Tue Jun 16 10:52:03 2015 +0200

----------------------------------------------------------------------
 .../apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/02943523/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java
----------------------------------------------------------------------
diff --git a/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java
b/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java
index bbdd068..d2d4043 100644
--- a/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java
+++ b/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/ShrinkWrapArchiveUtil.java
@@ -75,19 +75,23 @@ public class ShrinkWrapArchiveUtil
             Enumeration<URL> foundFiles = classLoader.getResources(markerFile);
 
             List<JavaArchive> archives = new ArrayList<JavaArchive>();
+            int numArchives = 0;
 
             while (foundFiles.hasMoreElements())
             {
                 URL foundFile = foundFiles.nextElement();
                 LOG.fine("Evaluating Java ClassPath URL " + foundFile.toExternalForm());
+                String suffix = (numArchives == 0) ? "" : Integer.toString(numArchives);
 
                 JavaArchive archive
-                    = createArchive(foundFile, markerFile, includeIfPackageExists, excludeIfPackageExists,
archiveName);
+                    = createArchive(foundFile, markerFile, includeIfPackageExists, excludeIfPackageExists,

+                        archiveName + suffix);
                 if (archive != null)
                 {
                     LOG.info("Test " + getTestName()
                             + " Adding Java ClassPath URL as JavaArchive " + foundFile.toExternalForm());
                     archives.add(archive);
+                    numArchives++;
                 }
             }
 
@@ -236,7 +240,7 @@ public class ShrinkWrapArchiveUtil
             return archiveEntries;
         }
 
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
 


Mime
View raw message