tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: TOMEE-1638 fixing subdirectory in java script mode
Date Mon, 19 Oct 2015 09:26:26 GMT
Repository: tomee
Updated Branches:
  refs/heads/master f68661c08 -> d68c149c8


TOMEE-1638 fixing subdirectory in java script mode


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

Branch: refs/heads/master
Commit: d68c149c8881be5129816733a4cb8766cec49737
Parents: f68661c
Author: Romain Manni-Bucau <rmannibu@gmail.com>
Authored: Mon Oct 19 11:26:17 2015 +0200
Committer: Romain Manni-Bucau <rmannibu@gmail.com>
Committed: Mon Oct 19 11:26:17 2015 +0200

----------------------------------------------------------------------
 .../openejb/maven/plugin/runner/ExecRunner.java    | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/d68c149c/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java
----------------------------------------------------------------------
diff --git a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java
b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java
index 8cb5eff..44daac3 100644
--- a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java
+++ b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java
@@ -77,8 +77,21 @@ public class ExecRunner {
         }
 
         final File[] extracted = distribOutput.listFiles();
-        if (extracted != null && extracted.length == 1) {
-            distribOutput = extracted[0];
+        if (extracted != null) {
+            File newRoot = null;
+            for (final File e : extracted) {
+                if (e.isDirectory()) {
+                    if (newRoot == null) {
+                        newRoot = e;
+                    } else {
+                        newRoot = null;
+                        break;
+                    }
+                }
+            }
+            if (newRoot != null) {
+                distribOutput = newRoot;
+            }
         }
         final File[] scripts = new File(distribOutput, "bin").listFiles();
         if (scripts != null) { // dont use filefilter to avoid dependency issue


Mime
View raw message