openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1850399 - in /openwebbeans/meecrowave/trunk: meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/ meecrowave-core/src/main/java/org/apache/meecrowave/ meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/ meecrowave-...
Date Fri, 04 Jan 2019 16:12:42 GMT
Author: rmannibucau
Date: Fri Jan  4 16:12:42 2019
New Revision: 1850399

URL: http://svn.apache.org/viewvc?rev=1850399&view=rev
Log:
MEECROWAVE-171 config for jsp development mode

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/MeecrowaveConfiguration.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
    openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveExtension.java
    openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveTask.java
    openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MeecrowaveConfig.java
    openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/MeecrowaveConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/MeecrowaveConfiguration.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/MeecrowaveConfiguration.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-arquillian/src/main/java/org/apache/meecrowave/arquillian/MeecrowaveConfiguration.java
Fri Jan  4 16:12:42 2019
@@ -108,6 +108,7 @@ public class MeecrowaveConfiguration imp
     private String defaultSSLHostConfigName;
     private Integer webSessionTimeout;
     private String webSessionCookieConfig;
+    private boolean tomcatJspDevelopment;
 
     // configurable cause when set to Local arquillian bypass some protocol configuration
cause of container default
     private String arquillianProtocol = "Servlet 3.1";
@@ -233,6 +234,14 @@ public class MeecrowaveConfiguration imp
         return builder;
     }
 
+    public boolean isTomcatJspDevelopment() {
+        return tomcatJspDevelopment;
+    }
+
+    public void setTomcatJspDevelopment(final boolean tomcatJspDevelopment) {
+        this.tomcatJspDevelopment = tomcatJspDevelopment;
+    }
+
     public String getCxfServletParams() {
         return cxfServletParams;
     }

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=1850399&r1=1850398&r2=1850399&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
Fri Jan  4 16:12:42 2019
@@ -1310,6 +1310,9 @@ public class Meecrowave implements AutoC
         @CliOption(name = "tomcat-default-setup", description = "Add default servlet")
         private boolean tomcatAutoSetup = true;
 
+        @CliOption(name = "tomcat-default-setup-jsp-development", description = "Should JSP
support if available be set in development mode")
+        private boolean tomcatJspDevelopment = false;
+
         @CliOption(name = "use-shutdown-hook", description = "Use shutdown hook to automatically
stop the container on Ctrl+C")
         private boolean useShutdownHook = true;
 
@@ -1397,6 +1400,14 @@ public class Meecrowave implements AutoC
             }));
         }
 
+        public boolean isTomcatJspDevelopment() {
+            return tomcatJspDevelopment;
+        }
+
+        public void setTomcatJspDevelopment(final boolean tomcatJspDevelopment) {
+            this.tomcatJspDevelopment = tomcatJspDevelopment;
+        }
+
         public Integer getWebSessionTimeout() {
             return webSessionTimeout;
         }

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
Fri Jan  4 16:12:42 2019
@@ -18,18 +18,18 @@
  */
 package org.apache.meecrowave.tomcat;
 
-import org.apache.catalina.servlets.DefaultServlet;
-import org.apache.meecrowave.Meecrowave;
+import java.util.Set;
 
 import javax.servlet.ServletContainerInitializer;
 import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
 import javax.servlet.ServletRegistration;
-import java.util.Set;
+
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.meecrowave.Meecrowave;
 
 public class TomcatAutoInitializer implements ServletContainerInitializer {
     @Override
-    public void onStartup(final Set<Class<?>> c, final ServletContext ctx) throws
ServletException {
+    public void onStartup(final Set<Class<?>> c, final ServletContext ctx) {
         final Meecrowave.Builder builder = Meecrowave.Builder.class.cast(ctx.getAttribute("meecrowave.configuration"));
         if (!builder.isTomcatAutoSetup()) {
             return;
@@ -48,7 +48,7 @@ public class TomcatAutoInitializer imple
             if (jspDef != null) {
                 jspDef.setInitParameter("fork", "false");
                 jspDef.setInitParameter("xpoweredBy", "false");
-                jspDef.setInitParameter("development", "false");
+                jspDef.setInitParameter("development", Boolean.toString(builder.isTomcatJspDevelopment()));
                 jspDef.setLoadOnStartup(3);
                 jspDef.addMapping("*.jsp");
                 jspDef.addMapping("*.jspx");

Modified: openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveExtension.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveExtension.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveExtension.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveExtension.java
Fri Jan  4 16:12:42 2019
@@ -99,6 +99,15 @@ public class MeecrowaveExtension {
     private String defaultSSLHostConfigName;
     private Integer webSessionTimeout;
     private String webSessionCookieConfig;
+    private boolean tomcatJspDevelopment;
+
+    public boolean isTomcatJspDevelopment() {
+        return tomcatJspDevelopment;
+    }
+
+    public void setTomcatJspDevelopment(final boolean tomcatJspDevelopment) {
+        this.tomcatJspDevelopment = tomcatJspDevelopment;
+    }
 
     public Integer getWebSessionTimeout() {
         return webSessionTimeout;

Modified: openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveTask.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveTask.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveTask.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-gradle-plugin/src/main/java/org/apache/meecrowave/gradle/MeecrowaveTask.java
Fri Jan  4 16:12:42 2019
@@ -238,6 +238,10 @@ public class MeecrowaveTask extends Defa
 
     @Input
     @Optional
+    private boolean tomcatJspDevelopment = false;
+
+    @Input
+    @Optional
     private boolean useShutdownHook = true;
 
     @Input
@@ -1220,4 +1224,12 @@ public class MeecrowaveTask extends Defa
     public void setWebSessionCookieConfig(final String webSessionCookieConfig) {
         this.webSessionCookieConfig = webSessionCookieConfig;
     }
+
+    public boolean isTomcatJspDevelopment() {
+        return tomcatJspDevelopment;
+    }
+
+    public void setTomcatJspDevelopment(final boolean tomcatJspDevelopment) {
+        this.tomcatJspDevelopment = tomcatJspDevelopment;
+    }
 }

Modified: openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MeecrowaveConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MeecrowaveConfig.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MeecrowaveConfig.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MeecrowaveConfig.java
Fri Jan  4 16:12:42 2019
@@ -78,6 +78,7 @@ public @interface MeecrowaveConfig {
     boolean loggingGlobalSetup() default true;
     boolean tomcatScanning() default true;
     boolean tomcatAutoSetup() default true;
+    boolean tomcatJspDevelopmentMode() default false;
     boolean useShutdownHook() default true;
     String tomcatFilter() default "";
     boolean useTomcatDefaults() default true;

Modified: openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java?rev=1850399&r1=1850398&r2=1850399&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
Fri Jan  4 16:12:42 2019
@@ -112,6 +112,9 @@ public class MeecrowaveRunMojo extends A
     @Parameter(property = "meecrowave.tomcatAutoSetup", defaultValue = "true")
     private boolean tomcatAutoSetup;
 
+    @Parameter(property = "meecrowave.tomcatJspDevelopment", defaultValue = "false")
+    private boolean tomcatJspDevelopment;
+
     @Parameter(property = "meecrowave.skipHttp")
     private boolean skipHttp;
 



Mime
View raw message