Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x b3ad65575 -> d240be66c


Normalize all the line endings


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

Branch: refs/heads/tomee-1.7.x
Commit: d240be66c81ab6ebd49eeac602baf3830e4cd4e7
Parents: b3ad655
Author: AndyGee <andy...@gmx.de>
Authored: Fri Jul 3 11:17:39 2015 +0200
Committer: AndyGee <andy...@gmx.de>
Committed: Fri Jul 3 11:17:39 2015 +0200

----------------------------------------------------------------------
 .gitattributes                                  |   1 +
 .../java/org/apache/tomee/embedded/Main.java    | 218 ++++-----
 .../org/apache/tomee/configs/catalina.policy    | 482 +++++++++----------
 .../apache/tomee/configs/catalina.properties    | 242 +++++-----
 .../java/org/apache/tomee/embedded/ABean.java   |  52 +-
 .../src/test/resources/META-INF/beans.xml       |  38 +-
 .../TomEEFacesConfigurationProvider.java        |  92 ++--
 .../TomEEFacesConfigurationProviderFactory.java | 156 +++---
 ...yfaces.spi.FacesConfigurationProviderFactory |   2 +-
 tomee/tomee-webaccess/src/main/java/readme.txt  |  10 +-
 .../src/main/webapp/app/js/view/growl.js        | 140 +++---
 tomee/tomee-webaccess/src/test/java/readme.txt  |  10 +-
 .../webapp/installer/InstallerServlet.java      | 162 +++----
 13 files changed, 803 insertions(+), 802 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Main.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Main.java 
b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Main.java
index 4a11336..4b34b03 100644
--- a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Main.java
+++ b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Main.java
@@ -1,109 +1,109 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.tomee.embedded;
-
-import java.io.File;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.PosixParser;
-import org.apache.openejb.loader.ProvisioningUtil;
-
-public class Main {
-    public static final String PORT = "port";
-    public static final String SHUTDOWN = "shutdown";
-    public static final String PATH = "path";
-    public static final String CONTEXT = "context";
-    public static final String DIRECTORY = "directory";
-
-    public static void main(final String[] args) {
-        final CommandLineParser parser = new PosixParser();
-        final Options options = createOptions();
-
-        // parse command line
-        final CommandLine line;
-        try {
-            line = parser.parse(options, args, true);
-        } catch (final ParseException exp) {
-            new HelpFormatter().printHelp("java -jar tomee-embedded-user.jar", 
options);
-            return;
-        }
-
-        // run TomEE
-        try {
-            final Container container = new 
Container(createConfiguration(line));
-            if (line.hasOption(PATH)) {
-                final String[] contexts;
-                if (line.hasOption(CONTEXT)) {
-                    contexts = line.getOptionValues(CONTEXT);
-                } else {
-                    contexts = null;
-                }
-                int i = 0;
-                for (final String path : line.getOptionValues(PATH)) {
-                    final File file = new 
File(ProvisioningUtil.realLocation(path));
-                    if (!file.exists()) {
-                        System.err.println(file.getAbsolutePath() + " does not 
exist, skipping");
-                        continue;
-                    }
-
-                    String name = file.getName().replaceAll("\\.[A-Za-z]+$", 
"");
-                    if (contexts != null) {
-                        name = contexts[i++];
-                    }
-                    container.deploy(name, file, true);
-                }
-            }
-
-            Runtime.getRuntime().addShutdownHook(new Thread() {
-                @Override
-                public void run() {
-                    try {
-                        container.stop();
-                    } catch (final Exception e) {
-                        e.printStackTrace(); // just log the exception
-                    }
-                }
-            });
-            container.await();
-        } catch (final Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private static Options createOptions() {
-        final Options options = new Options();
-        options.addOption(null, PATH, true, "");
-        options.addOption(null, CONTEXT, true, "Context name for applications 
(same order than paths)");
-        options.addOption("p", PORT, true, "TomEE http port");
-        options.addOption("s", SHUTDOWN, true, "TomEE shutdown port");
-        options.addOption("d", DIRECTORY, true, "TomEE shutdown port");
-        return options;
-    }
-
-    private static Configuration createConfiguration(final CommandLine args) {
-        final Configuration config = new Configuration();
-        config.setDir(System.getProperty("java.io.tmpdir"));
-        config.setHttpPort(Integer.parseInt(args.getOptionValue(PORT, 
"8080")));
-        config.setStopPort(Integer.parseInt(args.getOptionValue(SHUTDOWN, 
"8005")));
-        config.setDir(args.getOptionValue(DIRECTORY, new File(new File("."), 
"apache-tomee").getAbsolutePath()));
-        return config;
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomee.embedded;
+
+import java.io.File;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.cli.PosixParser;
+import org.apache.openejb.loader.ProvisioningUtil;
+
+public class Main {
+    public static final String PORT = "port";
+    public static final String SHUTDOWN = "shutdown";
+    public static final String PATH = "path";
+    public static final String CONTEXT = "context";
+    public static final String DIRECTORY = "directory";
+
+    public static void main(final String[] args) {
+        final CommandLineParser parser = new PosixParser();
+        final Options options = createOptions();
+
+        // parse command line
+        final CommandLine line;
+        try {
+            line = parser.parse(options, args, true);
+        } catch (final ParseException exp) {
+            new HelpFormatter().printHelp("java -jar tomee-embedded-user.jar", 
options);
+            return;
+        }
+
+        // run TomEE
+        try {
+            final Container container = new 
Container(createConfiguration(line));
+            if (line.hasOption(PATH)) {
+                final String[] contexts;
+                if (line.hasOption(CONTEXT)) {
+                    contexts = line.getOptionValues(CONTEXT);
+                } else {
+                    contexts = null;
+                }
+                int i = 0;
+                for (final String path : line.getOptionValues(PATH)) {
+                    final File file = new 
File(ProvisioningUtil.realLocation(path));
+                    if (!file.exists()) {
+                        System.err.println(file.getAbsolutePath() + " does not 
exist, skipping");
+                        continue;
+                    }
+
+                    String name = file.getName().replaceAll("\\.[A-Za-z]+$", 
"");
+                    if (contexts != null) {
+                        name = contexts[i++];
+                    }
+                    container.deploy(name, file, true);
+                }
+            }
+
+            Runtime.getRuntime().addShutdownHook(new Thread() {
+                @Override
+                public void run() {
+                    try {
+                        container.stop();
+                    } catch (final Exception e) {
+                        e.printStackTrace(); // just log the exception
+                    }
+                }
+            });
+            container.await();
+        } catch (final Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static Options createOptions() {
+        final Options options = new Options();
+        options.addOption(null, PATH, true, "");
+        options.addOption(null, CONTEXT, true, "Context name for applications 
(same order than paths)");
+        options.addOption("p", PORT, true, "TomEE http port");
+        options.addOption("s", SHUTDOWN, true, "TomEE shutdown port");
+        options.addOption("d", DIRECTORY, true, "TomEE shutdown port");
+        return options;
+    }
+
+    private static Configuration createConfiguration(final CommandLine args) {
+        final Configuration config = new Configuration();
+        config.setDir(System.getProperty("java.io.tmpdir"));
+        config.setHttpPort(Integer.parseInt(args.getOptionValue(PORT, 
"8080")));
+        config.setStopPort(Integer.parseInt(args.getOptionValue(SHUTDOWN, 
"8005")));
+        config.setDir(args.getOptionValue(DIRECTORY, new File(new File("."), 
"apache-tomee").getAbsolutePath()));
+        return config;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.policy
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.policy
 
b/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.policy
index 1d8fcef..f5a4247 100644
--- 
a/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.policy
+++ 
b/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.policy
@@ -1,241 +1,241 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// ============================================================================
-// catalina.policy - Security Policy Permissions for Tomcat 7
-//
-// This file contains a default set of security policies to be enforced (by the
-// JVM) when Catalina is executed with the "-security" option.  In addition
-// to the permissions granted here, the following additional permissions are
-// granted specific to each web application:
-//
-// * Read access to its document root directory
-// * Read, write and delete access to its working directory
-//
-// $Id: catalina.policy 1079755 2011-03-09 11:38:38Z markt $
-// ============================================================================
-
-
-// ========== SYSTEM CODE PERMISSIONS =========================================
-
-
-// These permissions apply to javac
-grant codeBase "file:${java.home}/lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions
-grant codeBase "file:${java.home}/jre/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/../lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions when
-// ${java.home} points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-
-// ========== CATALINA CODE PERMISSIONS =======================================
-
-
-// These permissions apply to the daemon code
-grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the logging API
-// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
-// update this section accordingly.
-//  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
-        permission java.io.FilePermission
-         
"${java.home}${file.separator}lib${file.separator}logging.properties", "read"; 
-
-        permission java.io.FilePermission
-         
"${catalina.base}${file.separator}conf${file.separator}logging.properties", 
"read";
-        permission java.io.FilePermission
-         "${catalina.base}${file.separator}logs", "read, write";
-        permission java.io.FilePermission
-         "${catalina.base}${file.separator}logs${file.separator}*", "read, 
write";
-
-        permission java.lang.RuntimePermission "shutdownHooks";
-        permission java.lang.RuntimePermission "getClassLoader";
-        permission java.lang.RuntimePermission "setContextClassLoader";
-
-        permission java.util.logging.LoggingPermission "control";
-
-        permission java.util.PropertyPermission 
"java.util.logging.config.class", "read";
-        permission java.util.PropertyPermission 
"java.util.logging.config.file", "read";
-        permission java.util.PropertyPermission "catalina.base", "read";
-
-        // Note: To enable per context logging configuration, permit read 
access to
-        // the appropriate file. Be sure that the logging configuration is
-        // secure before enabling such access.
-        // E.g. for the examples web application:
-        // permission java.io.FilePermission "${catalina.base}${file.separator}
-        //  webapps${file.separator}examples${file.separator}WEB-INF
-        //  ${file.separator}classes${file.separator}logging.properties", 
"read";
-};
-
-// These permissions apply to the server startup code
-grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the servlet API classes
-// and those that are shared across all class loaders
-// located in the "lib" directory
-grant codeBase "file:${catalina.home}/lib/-" {
-        permission java.security.AllPermission;
-};
-
-
-// If using a per instance lib directory, i.e. ${catalina.base}/lib,
-// then the following permission will need to be uncommented
-// grant codeBase "file:${catalina.base}/lib/-" {
-//         permission java.security.AllPermission;
-// };
-
-
-// ========== WEB APPLICATION PERMISSIONS =====================================
-
-
-// These permissions are granted by default to all web applications
-// In addition, a web application will be given a read FilePermission
-// and JndiPermission for all files and directories in its document root.
-grant {
-    // Required for JNDI lookup of named JDBC DataSource's and
-    // javamail named MimePart DataSource used to send mail
-    permission java.util.PropertyPermission "java.home", "read";
-    permission java.util.PropertyPermission "java.naming.*", "read";
-    permission java.util.PropertyPermission "javax.sql.*", "read";
-
-    // OS Specific properties to allow read access
-    permission java.util.PropertyPermission "os.name", "read";
-    permission java.util.PropertyPermission "os.version", "read";
-    permission java.util.PropertyPermission "os.arch", "read";
-    permission java.util.PropertyPermission "file.separator", "read";
-    permission java.util.PropertyPermission "path.separator", "read";
-    permission java.util.PropertyPermission "line.separator", "read";
-
-    // JVM properties to allow read access
-    permission java.util.PropertyPermission "java.version", "read";
-    permission java.util.PropertyPermission "java.vendor", "read";
-    permission java.util.PropertyPermission "java.vendor.url", "read";
-    permission java.util.PropertyPermission "java.class.version", "read";
-    permission java.util.PropertyPermission "java.specification.version", 
"read";
-    permission java.util.PropertyPermission "java.specification.vendor", 
"read";
-    permission java.util.PropertyPermission "java.specification.name", "read";
-
-    permission java.util.PropertyPermission "java.vm.specification.version", 
"read";
-    permission java.util.PropertyPermission "java.vm.specification.vendor", 
"read";
-    permission java.util.PropertyPermission "java.vm.specification.name", 
"read";
-    permission java.util.PropertyPermission "java.vm.version", "read";
-    permission java.util.PropertyPermission "java.vm.vendor", "read";
-    permission java.util.PropertyPermission "java.vm.name", "read";
-
-    // Required for OpenJMX
-    permission java.lang.RuntimePermission "getAttribute";
-
-    // Allow read of JAXP compliant XML parser debug
-    permission java.util.PropertyPermission "jaxp.debug", "read";
-
-    // All JSPs need to be able to read this package
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat";
-
-    // Precompiled JSPs need access to these packages.
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.el";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.runtime";
-    permission java.lang.RuntimePermission
-     "accessClassInPackage.org.apache.jasper.runtime.*";
-
-    // Precompiled JSPs need access to these system properties.
-    permission java.util.PropertyPermission
-     "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read";
-    permission java.util.PropertyPermission
-     "org.apache.el.parser.COERCE_TO_ZERO", "read";
-
-    // The cookie code needs these.
-    permission java.util.PropertyPermission
-     "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
-    permission java.util.PropertyPermission
-     "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
-    permission java.util.PropertyPermission
-     "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
-
-    // Applications using Comet need to be able to access this package
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.comet";
-};
-
-
-// The Manager application needs access to the following packages to support 
the
-// session display functionality. These settings support the following
-// configurations:
-// - default CATALINA_HOME == CATALINA_BASE
-// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
-// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
-grant codeBase "file:${catalina.base}/webapps/manager/-" {
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
-};
-grant codeBase "file:${catalina.home}/webapps/manager/-" {
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
-    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
-};
-
-// You can assign additional permissions to particular web applications by
-// adding additional "grant" entries here, based on the code base for that
-// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
-//
-// Different permissions can be granted to JSP pages, classes loaded from
-// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
-// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
-//
-// For instance, assume that the standard "examples" application
-// included a JDBC driver that needed to establish a network connection to the
-// corresponding database and used the scrape taglib to get the weather from
-// the NOAA web server.  You might create a "grant" entries like this:
-//
-// The permissions granted to the context root directory apply to JSP pages.
-// grant codeBase "file:${catalina.base}/webapps/examples/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-//
-// The permissions granted to the context WEB-INF/classes directory
-// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
-// };
-//
-// The permission granted to your JDBC driver
-// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
-// };
-// The permission granted to the scrape taglib
-// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// ============================================================================
+// catalina.policy - Security Policy Permissions for Tomcat 7
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option.  In addition
+// to the permissions granted here, the following additional permissions are
+// granted specific to each web application:
+//
+// * Read access to its document root directory
+// * Read, write and delete access to its working directory
+//
+// $Id: catalina.policy 1079755 2011-03-09 11:38:38Z markt $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+        permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the logging API
+// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
+// update this section accordingly.
+//  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+        permission java.io.FilePermission
+         
"${java.home}${file.separator}lib${file.separator}logging.properties", "read"; 
+
+        permission java.io.FilePermission
+         
"${catalina.base}${file.separator}conf${file.separator}logging.properties", 
"read";
+        permission java.io.FilePermission
+         "${catalina.base}${file.separator}logs", "read, write";
+        permission java.io.FilePermission
+         "${catalina.base}${file.separator}logs${file.separator}*", "read, 
write";
+
+        permission java.lang.RuntimePermission "shutdownHooks";
+        permission java.lang.RuntimePermission "getClassLoader";
+        permission java.lang.RuntimePermission "setContextClassLoader";
+
+        permission java.util.logging.LoggingPermission "control";
+
+        permission java.util.PropertyPermission 
"java.util.logging.config.class", "read";
+        permission java.util.PropertyPermission 
"java.util.logging.config.file", "read";
+        permission java.util.PropertyPermission "catalina.base", "read";
+
+        // Note: To enable per context logging configuration, permit read 
access to
+        // the appropriate file. Be sure that the logging configuration is
+        // secure before enabling such access.
+        // E.g. for the examples web application:
+        // permission java.io.FilePermission "${catalina.base}${file.separator}
+        //  webapps${file.separator}examples${file.separator}WEB-INF
+        //  ${file.separator}classes${file.separator}logging.properties", 
"read";
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "lib" directory
+grant codeBase "file:${catalina.home}/lib/-" {
+        permission java.security.AllPermission;
+};
+
+
+// If using a per instance lib directory, i.e. ${catalina.base}/lib,
+// then the following permission will need to be uncommented
+// grant codeBase "file:${catalina.base}/lib/-" {
+//         permission java.security.AllPermission;
+// };
+
+
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+    // Required for JNDI lookup of named JDBC DataSource's and
+    // javamail named MimePart DataSource used to send mail
+    permission java.util.PropertyPermission "java.home", "read";
+    permission java.util.PropertyPermission "java.naming.*", "read";
+    permission java.util.PropertyPermission "javax.sql.*", "read";
+
+    // OS Specific properties to allow read access
+    permission java.util.PropertyPermission "os.name", "read";
+    permission java.util.PropertyPermission "os.version", "read";
+    permission java.util.PropertyPermission "os.arch", "read";
+    permission java.util.PropertyPermission "file.separator", "read";
+    permission java.util.PropertyPermission "path.separator", "read";
+    permission java.util.PropertyPermission "line.separator", "read";
+
+    // JVM properties to allow read access
+    permission java.util.PropertyPermission "java.version", "read";
+    permission java.util.PropertyPermission "java.vendor", "read";
+    permission java.util.PropertyPermission "java.vendor.url", "read";
+    permission java.util.PropertyPermission "java.class.version", "read";
+    permission java.util.PropertyPermission "java.specification.version", 
"read";
+    permission java.util.PropertyPermission "java.specification.vendor", 
"read";
+    permission java.util.PropertyPermission "java.specification.name", "read";
+
+    permission java.util.PropertyPermission "java.vm.specification.version", 
"read";
+    permission java.util.PropertyPermission "java.vm.specification.vendor", 
"read";
+    permission java.util.PropertyPermission "java.vm.specification.name", 
"read";
+    permission java.util.PropertyPermission "java.vm.version", "read";
+    permission java.util.PropertyPermission "java.vm.vendor", "read";
+    permission java.util.PropertyPermission "java.vm.name", "read";
+
+    // Required for OpenJMX
+    permission java.lang.RuntimePermission "getAttribute";
+
+    // Allow read of JAXP compliant XML parser debug
+    permission java.util.PropertyPermission "jaxp.debug", "read";
+
+    // All JSPs need to be able to read this package
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat";
+
+    // Precompiled JSPs need access to these packages.
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.el";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.runtime";
+    permission java.lang.RuntimePermission
+     "accessClassInPackage.org.apache.jasper.runtime.*";
+
+    // Precompiled JSPs need access to these system properties.
+    permission java.util.PropertyPermission
+     "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read";
+    permission java.util.PropertyPermission
+     "org.apache.el.parser.COERCE_TO_ZERO", "read";
+
+    // The cookie code needs these.
+    permission java.util.PropertyPermission
+     "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
+    permission java.util.PropertyPermission
+     "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
+    permission java.util.PropertyPermission
+     "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
+
+    // Applications using Comet need to be able to access this package
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.comet";
+};
+
+
+// The Manager application needs access to the following packages to support 
the
+// session display functionality. These settings support the following
+// configurations:
+// - default CATALINA_HOME == CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
+grant codeBase "file:${catalina.base}/webapps/manager/-" {
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
+};
+grant codeBase "file:${catalina.home}/webapps/manager/-" {
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
+    permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
+};
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server.  You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.base}/webapps/examples/-" {
+//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
+//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.properties
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.properties
 
b/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.properties
index 5089043..ff86449 100644
--- 
a/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.properties
+++ 
b/tomee/tomee-embedded/src/main/resources/org/apache/tomee/configs/catalina.properties
@@ -1,122 +1,122 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, no packages are restricted for definition, and none of
-# the class loaders supplied with the JDK call checkPackageDefinition.
-#
-package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
-
-#
-#
-# List of comma-separated paths defining the contents of the "common" 
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank,the JVM system loader will be used as Catalina's "common" 
-# loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class 
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository
-common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
-
-#
-# List of comma-separated paths defining the contents of the "server" 
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank, the "common" loader will be used as Catalina's "server" 
-# loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class 
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository
-server.loader=
-
-#
-# List of comma-separated paths defining the contents of the "shared" 
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
-# the "common" loader will be used as Catalina's "shared" loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class 
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository 
-# Please note that for single jars, e.g. bar.jar, you need the URL form
-# starting with file:.
-shared.loader=
-
-# List of JAR files that should not be scanned for configuration information
-# such as web fragments, TLD files etc. It must be a comma separated list of
-# JAR file names.
-# The JARs listed below include:
-# - Tomcat Bootstrap JARs
-# - Tomcat API JARs
-# - Catalina JARs
-# - Jasper JARs
-# - Tomcat JARs
-# - Common non-Tomcat JARs
-# - Sun JDK JARs
-# - Apple JDK JARs
-tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
-bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
-annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
-catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
-jasper.jar,jasper-el.jar,ecj-*.jar,\
-tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
-tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
-commons-beanutils*.jar,commons-collections*.jar,commons-dbcp*.jar,\
-commons-digester*.jar,commons-fileupload*.jar,commons-logging*.jar,\
-commons-pool*.jar,\
-bcprov-*.jar,\
-ant.jar,jmx.jar,jmx-tools.jar,\
-xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
-dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,\
-apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
-j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
-mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
-hsqldb-*,openejb-core-*,xbean-*,derby*,mbean-annotation-*,\
-javassit*,commons-*,swizzle-stream-*,serp-*,geronimo-javamail-*,geronimo-mail-*,\
-openejb-jee-*,openejb-core-*,openejb-loader-*,openejb-api-*,openejb-derby*,\
-openwebbeans-ejb-*,openwebbeans-impl-*,\
-bval-*,\
-tomee-loader-*,openejb-javaagent-*,openejb-ejbd-*,scannotation-*,openejb-server-*,\
-openjpa-*,quartz-*,openejb-http-*,kahadb-*
-
-#
-# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000
-
-http.port=${tomcatHttpPort}
-shutdown.port=${tomcatShutdownPort}
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common" 
+# loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server" 
+# loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared" 
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+#     "foo": Add this folder as a class repository
+#     "foo/*.jar": Add all the JARs of the specified folder as class 
+#                  repositories
+#     "foo/bar.jar": Add bar.jar as a class repository 
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+# List of JAR files that should not be scanned for configuration information
+# such as web fragments, TLD files etc. It must be a comma separated list of
+# JAR file names.
+# The JARs listed below include:
+# - Tomcat Bootstrap JARs
+# - Tomcat API JARs
+# - Catalina JARs
+# - Jasper JARs
+# - Tomcat JARs
+# - Common non-Tomcat JARs
+# - Sun JDK JARs
+# - Apple JDK JARs
+tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
+bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
+annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
+catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
+jasper.jar,jasper-el.jar,ecj-*.jar,\
+tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
+tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
+commons-beanutils*.jar,commons-collections*.jar,commons-dbcp*.jar,\
+commons-digester*.jar,commons-fileupload*.jar,commons-logging*.jar,\
+commons-pool*.jar,\
+bcprov-*.jar,\
+ant.jar,jmx.jar,jmx-tools.jar,\
+xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
+dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,\
+apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
+j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
+mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
+hsqldb-*,openejb-core-*,xbean-*,derby*,mbean-annotation-*,\
+javassit*,commons-*,swizzle-stream-*,serp-*,geronimo-javamail-*,geronimo-mail-*,\
+openejb-jee-*,openejb-core-*,openejb-loader-*,openejb-api-*,openejb-derby*,\
+openwebbeans-ejb-*,openwebbeans-impl-*,\
+bval-*,\
+tomee-loader-*,openejb-javaagent-*,openejb-ejbd-*,scannotation-*,openejb-server-*,\
+openjpa-*,quartz-*,openejb-http-*,kahadb-*
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
+
+http.port=${tomcatHttpPort}
+shutdown.port=${tomcatShutdownPort}
 shutdown.command=${tomcatShutdownCommand}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/ABean.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/ABean.java 
b/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/ABean.java
index abbc097..8f828b9 100644
--- a/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/ABean.java
+++ b/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/ABean.java
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.tomee.embedded;
-
-import javax.ejb.Singleton;
-
-@Singleton
-public class ABean {
-    public String embedded() {
-        return "ok";
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomee.embedded;
+
+import javax.ejb.Singleton;
+
+@Singleton
+public class ABean {
+    public String embedded() {
+        return "ok";
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-embedded/src/test/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/tomee/tomee-embedded/src/test/resources/META-INF/beans.xml 
b/tomee/tomee-embedded/src/test/resources/META-INF/beans.xml
index e0d7a63..b1514dd 100644
--- a/tomee/tomee-embedded/src/test/resources/META-INF/beans.xml
+++ b/tomee/tomee-embedded/src/test/resources/META-INF/beans.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<beans />
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans />

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProvider.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProvider.java
 
b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProvider.java
index 0e2e7f0..4ed8b9e 100644
--- 
a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProvider.java
+++ 
b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProvider.java
@@ -1,46 +1,46 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.tomee.myfaces;
-
-import org.apache.myfaces.config.DefaultFacesConfigurationProvider;
-import org.apache.myfaces.config.element.FacesConfig;
-import org.apache.openejb.loader.IO;
-
-import javax.faces.context.ExternalContext;
-import java.io.InputStream;
-
-public class TomEEFacesConfigurationProvider extends 
DefaultFacesConfigurationProvider {
-    @Override
-    public FacesConfig getWebAppFacesConfig(final ExternalContext ectx) {
-        final InputStream stream = 
ectx.getResourceAsStream("/WEB-INF/faces-config.xml");
-        if (stream != null && isEmpty(stream)) {
-            return new 
org.apache.myfaces.config.impl.digester.elements.FacesConfig();
-        }
-        // we can't just check the emptyness after the exception
-        // because otherwise an exception is logged because of the parser 
error handler
-        return super.getWebAppFacesConfig(ectx);
-    }
-
-    private static boolean isEmpty(final InputStream stream) {
-        try {
-            final String content = IO.slurp(stream);
-            return content.trim().length() == 0;
-        } catch (final Exception e) {
-            return false;
-        }
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomee.myfaces;
+
+import org.apache.myfaces.config.DefaultFacesConfigurationProvider;
+import org.apache.myfaces.config.element.FacesConfig;
+import org.apache.openejb.loader.IO;
+
+import javax.faces.context.ExternalContext;
+import java.io.InputStream;
+
+public class TomEEFacesConfigurationProvider extends 
DefaultFacesConfigurationProvider {
+    @Override
+    public FacesConfig getWebAppFacesConfig(final ExternalContext ectx) {
+        final InputStream stream = 
ectx.getResourceAsStream("/WEB-INF/faces-config.xml");
+        if (stream != null && isEmpty(stream)) {
+            return new 
org.apache.myfaces.config.impl.digester.elements.FacesConfig();
+        }
+        // we can't just check the emptyness after the exception
+        // because otherwise an exception is logged because of the parser 
error handler
+        return super.getWebAppFacesConfig(ectx);
+    }
+
+    private static boolean isEmpty(final InputStream stream) {
+        try {
+            final String content = IO.slurp(stream);
+            return content.trim().length() == 0;
+        } catch (final Exception e) {
+            return false;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProviderFactory.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProviderFactory.java
 
b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProviderFactory.java
index 9da15ed..b150e6c 100644
--- 
a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProviderFactory.java
+++ 
b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEFacesConfigurationProviderFactory.java
@@ -1,78 +1,78 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.tomee.myfaces;
-
-import org.apache.myfaces.shared.util.ClassUtils;
-import org.apache.myfaces.spi.FacesConfigurationProvider;
-import org.apache.myfaces.spi.ServiceProviderFinderFactory;
-import org.apache.myfaces.spi.impl.DefaultFacesConfigurationProviderFactory;
-
-import javax.faces.FacesException;
-import javax.faces.context.ExternalContext;
-import java.lang.reflect.InvocationTargetException;
-import java.security.PrivilegedActionException;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-// fork to be able to not fail on empty faces-config.xml
-public class TomEEFacesConfigurationProviderFactory extends 
DefaultFacesConfigurationProviderFactory {
-    public static final String FACES_CONFIGURATION_PROVIDER = 
FacesConfigurationProvider.class.getName();
-    public static final String FACES_CONFIGURATION_PROVIDER_LIST = 
FacesConfigurationProvider.class.getName()+".LIST";
-    public static final String FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY = 
FacesConfigurationProvider.class.getName() + ".INSTANCE";
-
-    private Logger getLogger() {
-        return 
Logger.getLogger(DefaultFacesConfigurationProviderFactory.class.getName());
-    }
-
-    @Override
-    public FacesConfigurationProvider getFacesConfigurationProvider(final 
ExternalContext externalContext) {
-        FacesConfigurationProvider returnValue = (FacesConfigurationProvider) 
externalContext.getApplicationMap().get(FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY);
-        if (returnValue == null) {
-            final ExternalContext extContext = externalContext;
-            try {
-                returnValue = 
resolveFacesConfigurationProviderFromService(extContext);
-                
externalContext.getApplicationMap().put(FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY,
 returnValue);
-            } catch (final ClassNotFoundException e) {
-                // ignore
-            } catch (final NoClassDefFoundError e) {
-                // ignore
-            } catch (final InstantiationException e) {
-                getLogger().log(Level.SEVERE, "", e);
-            } catch (final IllegalAccessException e) {
-                getLogger().log(Level.SEVERE, "", e);
-            } catch (final InvocationTargetException e) {
-                getLogger().log(Level.SEVERE, "", e);
-            } catch (final PrivilegedActionException e) {
-                throw new FacesException(e);
-            }
-        }
-
-
-        return returnValue;
-    }
-
-    private FacesConfigurationProvider 
resolveFacesConfigurationProviderFromService(final ExternalContext 
externalContext)
-            throws ClassNotFoundException, NoClassDefFoundError, 
InstantiationException, IllegalAccessException, InvocationTargetException, 
PrivilegedActionException {
-        List<String> classList = (List<String>) 
externalContext.getApplicationMap().get(FACES_CONFIGURATION_PROVIDER_LIST);
-        if (classList == null) {
-            classList = 
ServiceProviderFinderFactory.getServiceProviderFinder(externalContext).getServiceProviderList(FACES_CONFIGURATION_PROVIDER);
-            
externalContext.getApplicationMap().put(FACES_CONFIGURATION_PROVIDER_LIST, 
classList);
-        }
-        return 
ClassUtils.buildApplicationObject(FacesConfigurationProvider.class, classList, 
new TomEEFacesConfigurationProvider());
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomee.myfaces;
+
+import org.apache.myfaces.shared.util.ClassUtils;
+import org.apache.myfaces.spi.FacesConfigurationProvider;
+import org.apache.myfaces.spi.ServiceProviderFinderFactory;
+import org.apache.myfaces.spi.impl.DefaultFacesConfigurationProviderFactory;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import java.lang.reflect.InvocationTargetException;
+import java.security.PrivilegedActionException;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+// fork to be able to not fail on empty faces-config.xml
+public class TomEEFacesConfigurationProviderFactory extends 
DefaultFacesConfigurationProviderFactory {
+    public static final String FACES_CONFIGURATION_PROVIDER = 
FacesConfigurationProvider.class.getName();
+    public static final String FACES_CONFIGURATION_PROVIDER_LIST = 
FacesConfigurationProvider.class.getName()+".LIST";
+    public static final String FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY = 
FacesConfigurationProvider.class.getName() + ".INSTANCE";
+
+    private Logger getLogger() {
+        return 
Logger.getLogger(DefaultFacesConfigurationProviderFactory.class.getName());
+    }
+
+    @Override
+    public FacesConfigurationProvider getFacesConfigurationProvider(final 
ExternalContext externalContext) {
+        FacesConfigurationProvider returnValue = (FacesConfigurationProvider) 
externalContext.getApplicationMap().get(FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY);
+        if (returnValue == null) {
+            final ExternalContext extContext = externalContext;
+            try {
+                returnValue = 
resolveFacesConfigurationProviderFromService(extContext);
+                
externalContext.getApplicationMap().put(FACES_CONFIGURATION_PROVIDER_INSTANCE_KEY,
 returnValue);
+            } catch (final ClassNotFoundException e) {
+                // ignore
+            } catch (final NoClassDefFoundError e) {
+                // ignore
+            } catch (final InstantiationException e) {
+                getLogger().log(Level.SEVERE, "", e);
+            } catch (final IllegalAccessException e) {
+                getLogger().log(Level.SEVERE, "", e);
+            } catch (final InvocationTargetException e) {
+                getLogger().log(Level.SEVERE, "", e);
+            } catch (final PrivilegedActionException e) {
+                throw new FacesException(e);
+            }
+        }
+
+
+        return returnValue;
+    }
+
+    private FacesConfigurationProvider 
resolveFacesConfigurationProviderFromService(final ExternalContext 
externalContext)
+            throws ClassNotFoundException, NoClassDefFoundError, 
InstantiationException, IllegalAccessException, InvocationTargetException, 
PrivilegedActionException {
+        List<String> classList = (List<String>) 
externalContext.getApplicationMap().get(FACES_CONFIGURATION_PROVIDER_LIST);
+        if (classList == null) {
+            classList = 
ServiceProviderFinderFactory.getServiceProviderFinder(externalContext).getServiceProviderList(FACES_CONFIGURATION_PROVIDER);
+            
externalContext.getApplicationMap().put(FACES_CONFIGURATION_PROVIDER_LIST, 
classList);
+        }
+        return 
ClassUtils.buildApplicationObject(FacesConfigurationProvider.class, classList, 
new TomEEFacesConfigurationProvider());
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.FacesConfigurationProviderFactory
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.FacesConfigurationProviderFactory
 
b/tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.FacesConfigurationProviderFactory
index 8d058c7..e5b0160 100644
--- 
a/tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.FacesConfigurationProviderFactory
+++ 
b/tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.FacesConfigurationProviderFactory
@@ -1 +1 @@
-org.apache.tomee.myfaces.TomEEFacesConfigurationProviderFactory
+org.apache.tomee.myfaces.TomEEFacesConfigurationProviderFactory

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-webaccess/src/main/java/readme.txt
----------------------------------------------------------------------
diff --git a/tomee/tomee-webaccess/src/main/java/readme.txt 
b/tomee/tomee-webaccess/src/main/java/readme.txt
index 59bd2de..f3a6d76 100644
--- a/tomee/tomee-webaccess/src/main/java/readme.txt
+++ b/tomee/tomee-webaccess/src/main/java/readme.txt
@@ -1,6 +1,6 @@
-If there is at least one file (Java or not) in src/main/java,
-then all files in src/main/groovy will be found.
-If, however, src/main/java is empty, then src/main/groovy will be ignored.
-You can get around this by placing an empty file in src/main/java just so that 
src/main/groovy
-will be recognized. The same is true for src/test/java and src/test/groovy.
+If there is at least one file (Java or not) in src/main/java,
+then all files in src/main/groovy will be found.
+If, however, src/main/java is empty, then src/main/groovy will be ignored.
+You can get around this by placing an empty file in src/main/java just so that 
src/main/groovy
+will be recognized. The same is true for src/test/java and src/test/groovy.
 This is actually a workaround for GRECLIPSE-1221.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-webaccess/src/main/webapp/app/js/view/growl.js
----------------------------------------------------------------------
diff --git a/tomee/tomee-webaccess/src/main/webapp/app/js/view/growl.js 
b/tomee/tomee-webaccess/src/main/webapp/app/js/view/growl.js
index 7510997..a147ed9 100644
--- a/tomee/tomee-webaccess/src/main/webapp/app/js/view/growl.js
+++ b/tomee/tomee-webaccess/src/main/webapp/app/js/view/growl.js
@@ -1,70 +1,70 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-(function () {
-    'use strict';
-
-    var deps = ['app/js/templates', 'lib/underscore'];
-    define(deps, function (templates, underscore) {
-
-        var GrowlContainerView = Backbone.View.extend({
-            el: 'body',
-            render: function () {
-                if (this.options.isRendered) {
-                    return this;
-                }
-
-                var me = this;
-                var container = $(templates.getValue('growl-container', {}));
-                me.$el.append(container[0]);
-                me.containerEl = $(container[0]);
-
-                // render it only once
-                this.options.isRendered = true;
-                return this;
-            }
-        });
-        var container = new GrowlContainerView({});
-
-        function showNotification(messageType, messageText) {
-            container.render();
-
-            var alert = $(templates.getValue('growl', {
-                messageType: messageType,
-                messageText: messageText
-            }));
-
-            container.containerEl.append(alert[0]);
-            alert.fadeIn();
-            var faceOutCallback = function () {
-                alert.fadeOut(null, function () {
-                    try {
-                        alert.remove();
-                    } catch (ignore) { /* noop */
-                    }
-                });
-            };
-            var faceOut = underscore.debounce(faceOutCallback, 5000);
-            faceOut();
-        }
-
-        return {
-            showNotification: showNotification
-        };
-    });
-}());
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+(function () {
+    'use strict';
+
+    var deps = ['app/js/templates', 'lib/underscore'];
+    define(deps, function (templates, underscore) {
+
+        var GrowlContainerView = Backbone.View.extend({
+            el: 'body',
+            render: function () {
+                if (this.options.isRendered) {
+                    return this;
+                }
+
+                var me = this;
+                var container = $(templates.getValue('growl-container', {}));
+                me.$el.append(container[0]);
+                me.containerEl = $(container[0]);
+
+                // render it only once
+                this.options.isRendered = true;
+                return this;
+            }
+        });
+        var container = new GrowlContainerView({});
+
+        function showNotification(messageType, messageText) {
+            container.render();
+
+            var alert = $(templates.getValue('growl', {
+                messageType: messageType,
+                messageText: messageText
+            }));
+
+            container.containerEl.append(alert[0]);
+            alert.fadeIn();
+            var faceOutCallback = function () {
+                alert.fadeOut(null, function () {
+                    try {
+                        alert.remove();
+                    } catch (ignore) { /* noop */
+                    }
+                });
+            };
+            var faceOut = underscore.debounce(faceOutCallback, 5000);
+            faceOut();
+        }
+
+        return {
+            showNotification: showNotification
+        };
+    });
+}());

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-webaccess/src/test/java/readme.txt
----------------------------------------------------------------------
diff --git a/tomee/tomee-webaccess/src/test/java/readme.txt 
b/tomee/tomee-webaccess/src/test/java/readme.txt
index 59bd2de..f3a6d76 100644
--- a/tomee/tomee-webaccess/src/test/java/readme.txt
+++ b/tomee/tomee-webaccess/src/test/java/readme.txt
@@ -1,6 +1,6 @@
-If there is at least one file (Java or not) in src/main/java,
-then all files in src/main/groovy will be found.
-If, however, src/main/java is empty, then src/main/groovy will be ignored.
-You can get around this by placing an empty file in src/main/java just so that 
src/main/groovy
-will be recognized. The same is true for src/test/java and src/test/groovy.
+If there is at least one file (Java or not) in src/main/java,
+then all files in src/main/groovy will be found.
+If, however, src/main/java is empty, then src/main/groovy will be ignored.
+You can get around this by placing an empty file in src/main/java just so that 
src/main/groovy
+will be recognized. The same is true for src/test/java and src/test/groovy.
 This is actually a workaround for GRECLIPSE-1221.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/d240be66/tomee/tomee-webapp/src/main/java/org/apache/tomee/webapp/installer/InstallerServlet.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-webapp/src/main/java/org/apache/tomee/webapp/installer/InstallerServlet.java
 
b/tomee/tomee-webapp/src/main/java/org/apache/tomee/webapp/installer/InstallerServlet.java
index d5cf64b..8bf7aac 100644
--- 
a/tomee/tomee-webapp/src/main/java/org/apache/tomee/webapp/installer/InstallerServlet.java
+++ 
b/tomee/tomee-webapp/src/main/java/org/apache/tomee/webapp/installer/InstallerServlet.java
@@ -1,81 +1,81 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tomee.webapp.installer;
-
-import org.apache.tomee.installer.Installer;
-import org.apache.tomee.installer.Paths;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-public class InstallerServlet extends HttpServlet {
-
-    private String escape(final String str) {
-        if (str == null) {
-            return "";
-        }
-        return str.replaceAll("\"", "\\\\\"").replaceAll("\\\\", "\\\\\\\\");
-    }
-
-    private String getJsonList(final List<Map<String, String>> list) {
-        final StringBuffer sb = new StringBuffer();
-        for (final Map<String, String> entry : list) {
-            sb.append(String.format("{\"key\": \"%s\", \"value\": \"%s\"},",
-                    entry.get("key"), escape(entry.get("value"))
-            ));
-        }
-        if (!list.isEmpty()) {
-            sb.deleteCharAt(sb.length() - 1);
-        }
-        return "[" + sb.toString() + "]";
-    }
-
-    @Override
-    protected void doGet(final HttpServletRequest req, final 
HttpServletResponse resp) throws ServletException, IOException {
-        final ServletContext ctx = req.getServletContext();
-        final String rootPath = ctx.getRealPath("/");
-        final Runner installer = new Runner(new Installer(new Paths(new 
File(rootPath))));
-        resp.setContentType("application/json");
-        resp.getOutputStream().print(getJsonList(installer.execute(false)));
-    }
-
-    @Override
-    protected void doPost(final HttpServletRequest req, final 
HttpServletResponse resp) throws ServletException, IOException {
-        final ServletContext ctx = req.getServletContext();
-        final String rootPath = ctx.getRealPath("/");
-        final Runner installer = new Runner(new Installer(new Paths(new 
File(rootPath))));
-        if (req.getParameter("catalinaBaseDir") != null && 
"".equals(req.getParameter("catalinaBaseDir").trim())) {
-            
installer.setCatalinaBaseDir(req.getParameter("catalinaBaseDir").trim());
-        }
-        if (req.getParameter("catalinaHome") != null && 
"".equals(req.getParameter("catalinaHome").trim())) {
-            installer.setCatalinaHome(req.getParameter("catalinaHome").trim());
-        }
-        if (req.getParameter("serverXmlFile") != null && 
"".equals(req.getParameter("serverXmlFile").trim())) {
-            
installer.setServerXmlFile(req.getParameter("serverXmlFile").trim());
-        }
-        resp.setContentType("application/json");
-        resp.getOutputStream().print(getJsonList(installer.execute(true)));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomee.webapp.installer;
+
+import org.apache.tomee.installer.Installer;
+import org.apache.tomee.installer.Paths;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+public class InstallerServlet extends HttpServlet {
+
+    private String escape(final String str) {
+        if (str == null) {
+            return "";
+        }
+        return str.replaceAll("\"", "\\\\\"").replaceAll("\\\\", "\\\\\\\\");
+    }
+
+    private String getJsonList(final List<Map<String, String>> list) {
+        final StringBuffer sb = new StringBuffer();
+        for (final Map<String, String> entry : list) {
+            sb.append(String.format("{\"key\": \"%s\", \"value\": \"%s\"},",
+                    entry.get("key"), escape(entry.get("value"))
+            ));
+        }
+        if (!list.isEmpty()) {
+            sb.deleteCharAt(sb.length() - 1);
+        }
+        return "[" + sb.toString() + "]";
+    }
+
+    @Override
+    protected void doGet(final HttpServletRequest req, final 
HttpServletResponse resp) throws ServletException, IOException {
+        final ServletContext ctx = req.getServletContext();
+        final String rootPath = ctx.getRealPath("/");
+        final Runner installer = new Runner(new Installer(new Paths(new 
File(rootPath))));
+        resp.setContentType("application/json");
+        resp.getOutputStream().print(getJsonList(installer.execute(false)));
+    }
+
+    @Override
+    protected void doPost(final HttpServletRequest req, final 
HttpServletResponse resp) throws ServletException, IOException {
+        final ServletContext ctx = req.getServletContext();
+        final String rootPath = ctx.getRealPath("/");
+        final Runner installer = new Runner(new Installer(new Paths(new 
File(rootPath))));
+        if (req.getParameter("catalinaBaseDir") != null && 
"".equals(req.getParameter("catalinaBaseDir").trim())) {
+            
installer.setCatalinaBaseDir(req.getParameter("catalinaBaseDir").trim());
+        }
+        if (req.getParameter("catalinaHome") != null && 
"".equals(req.getParameter("catalinaHome").trim())) {
+            installer.setCatalinaHome(req.getParameter("catalinaHome").trim());
+        }
+        if (req.getParameter("serverXmlFile") != null && 
"".equals(req.getParameter("serverXmlFile").trim())) {
+            
installer.setServerXmlFile(req.getParameter("serverXmlFile").trim());
+        }
+        resp.setContentType("application/json");
+        resp.getOutputStream().print(getJsonList(installer.execute(true)));
+    }
+}

Reply via email to