openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1766229 - /openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
Date Sat, 22 Oct 2016 19:41:56 GMT
Author: rmannibucau
Date: Sat Oct 22 19:41:56 2016
New Revision: 1766229

URL: http://svn.apache.org/viewvc?rev=1766229&view=rev
Log:
allow to deploy a war with mono rule

Modified:
    openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java

Modified: openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java?rev=1766229&r1=1766228&r2=1766229&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
(original)
+++ openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
Sat Oct 22 19:41:56 2016
@@ -24,6 +24,7 @@ import org.junit.runners.BlockJUnit4Clas
 import org.junit.runners.model.InitializationError;
 import org.junit.runners.model.Statement;
 
+import java.io.File;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 import java.util.List;
@@ -121,7 +122,12 @@ public class MonoMicrowave {
                     .orElseGet(() -> new Configuration() {
                     });
 
-            microwave.bake(runnerConfig.context());
+            final File war = runnerConfig.application();
+            if (war == null) {
+                microwave.bake(runnerConfig.context());
+            } else {
+                microwave.deployWebapp(runnerConfig.context(), runnerConfig.application());
+            }
             Runtime.getRuntime().addShutdownHook(new Thread() {
                 {
                     setName("Microwave-mono-rue-stopping");
@@ -139,5 +145,9 @@ public class MonoMicrowave {
         default String context() {
             return "";
         }
+
+        default File application() {
+            return null;
+        }
     }
 }



Mime
View raw message