openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1830662 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Date Tue, 01 May 2018 09:05:08 GMT
Author: struberg
Date: Tue May  1 09:05:08 2018
New Revision: 1830662

URL: http://svn.apache.org/viewvc?rev=1830662&view=rev
Log:
MEECROWAVE-113 fix tempdir cleanup

re-apply taking meecrowave.base into consideration

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java?rev=1830662&r1=1830661&r2=1830662&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Tue May  1 09:05:08 2018
@@ -1033,8 +1033,16 @@ public class Meecrowave implements AutoC
             IO.mkdirs(dirFile);
             return dirFile.getAbsolutePath();
         }
+        List<String> lookupPaths = new ArrayList<>();
+        String mw_base = System.getProperty("meecrowave.base");
+        if (mw_base != null) {
+            lookupPaths.add(new File(mw_base, "temp").getAbsolutePath());
+        }
+        lookupPaths.add("target");
+        lookupPaths.add("build");
 
-        Optional<File> baseDir = Stream.of("target", "build")
+        new File(mw_base, "temp").getAbsolutePath();
+        Optional<File> baseDir = lookupPaths.stream()
                 .map(File::new)
                 .filter(File::isDirectory)
                 .findFirst();



Mime
View raw message