https://issues.apache.org/jira/browse/EXTSCRIPT-161, getting rid of the ChainLoader entry in the web.xml, this was the last mandatory entry, which now is picked up automatically by the impl.

git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk@1304313 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/WeavingContext.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/WeavingContext.java
index 5efa18e..713b9bf 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/WeavingContext.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/WeavingContext.java
@@ -281,7 +281,7 @@
         return false;
     }
 
-    public void initialFullScan()
+    public void fullScan()
     {
         for (ScriptingEngine engine : getEngines())
         {
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/monitor/ResourceMonitor.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/monitor/ResourceMonitor.java
index e80a340..88558e7 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/monitor/ResourceMonitor.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/monitor/ResourceMonitor.java
@@ -23,8 +23,6 @@
 
 import javax.servlet.ServletContext;
 import java.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -62,7 +60,6 @@
      * the classMap still is needed for various identification tasks which are reload
      * related
      */
-    Map<Integer, Boolean> _systemRecompileMap = new ConcurrentHashMap<Integer, Boolean>(8, 0.75f, 1);
 
     boolean _running = false;
     //    boolean _contextInitialized = false;
@@ -112,9 +109,9 @@
     public void run()
     {
 
-        while (_running)
+        while (!Thread.currentThread().isInterrupted())
         {
-            if (!_running) break;
+            if (Thread.currentThread().isInterrupted()) break;
             //we run the full scan on the classes to bring our data structures up to the task
             performMonitoringTask();
             sleep();
@@ -131,7 +128,7 @@
     {
         synchronized(WeavingContext.getInstance().recompileLock) {
             WeavingContext context = WeavingContext.getInstance();
-            context.initialFullScan();
+            context.fullScan();
 
             //we compile wherever needed, taints are now in place due to our scan already being performed
             if (context.compile())
diff --git a/extscript-core-root/extscript-core/src/main/resources/META-INF/services/org.apache.myfaces.webapp.StartupListener b/extscript-core-root/extscript-core/src/main/resources/META-INF/services/org.apache.myfaces.webapp.StartupListener
index e69de29..7fb31a4 100644
--- a/extscript-core-root/extscript-core/src/main/resources/META-INF/services/org.apache.myfaces.webapp.StartupListener
+++ b/extscript-core-root/extscript-core/src/main/resources/META-INF/services/org.apache.myfaces.webapp.StartupListener
@@ -0,0 +1 @@
+org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
\ No newline at end of file
diff --git a/extscript-core-root/extscript-core/src/main/scala/org/apache/myfaces/extensions/scripting/core/engine/compiler/ScalaCompiler.scala b/extscript-core-root/extscript-core/src/main/scala/org/apache/myfaces/extensions/scripting/core/engine/compiler/ScalaCompiler.scala
index 61b49ab..3f4b6e2 100644
--- a/extscript-core-root/extscript-core/src/main/scala/org/apache/myfaces/extensions/scripting/core/engine/compiler/ScalaCompiler.scala
+++ b/extscript-core-root/extscript-core/src/main/scala/org/apache/myfaces/extensions/scripting/core/engine/compiler/ScalaCompiler.scala
@@ -24,8 +24,7 @@
 import scala.tools.nsc.{Global, Settings}
 import scala.collection.JavaConversions._
 
-import org.apache.myfaces.extensions.scripting.core.common.util.{ClassUtils, FileUtils}
-import java.util.Collections
+import org.apache.myfaces.extensions.scripting.core.common.util.FileUtils
 
 /**
  *
diff --git a/extscript-core-root/extscript-core/src/test/java/org/apache/myfaces/extensions/scripting/scanningcore/context/InitialFullScanTest.java b/extscript-core-root/extscript-core/src/test/java/org/apache/myfaces/extensions/scripting/scanningcore/context/InitialFullScanTest.java
index 6a65e4a..a7ce6a9 100644
--- a/extscript-core-root/extscript-core/src/test/java/org/apache/myfaces/extensions/scripting/scanningcore/context/InitialFullScanTest.java
+++ b/extscript-core-root/extscript-core/src/test/java/org/apache/myfaces/extensions/scripting/scanningcore/context/InitialFullScanTest.java
@@ -75,7 +75,7 @@
                     groovyEngine.getSourcePaths().add(currentDirStr);
                 }
                 //we now scan for the files
-                WeavingContext.getInstance().initialFullScan();
+                WeavingContext.getInstance().fullScan();
 
             }
             catch (IOException e)
diff --git a/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml b/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml
index 74337ef..6b77e39 100644
--- a/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml
+++ b/extscript-examples/blog-example/src/main/webapp/WEB-INF/web.xml
@@ -25,7 +25,7 @@
 
     <description>Webproject.xml</description>
 
-
+   <!--
     <context-param>
         <description>
             Initializes the plugins for our groovy handlers
@@ -34,7 +34,7 @@
         <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
         </param-value>
     </context-param>
-
+    -->
 
     <context-param>
         <param-name>javax.faces.PROJECT_STAGE</param-name>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/web.xml b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/web.xml
index cc3db08..225f78d 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/web.xml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/web.xml
@@ -25,16 +25,6 @@
 
 
     <description>MyProject web.xml</description>
-    <context-param>
-        <description>
-            Initializes the plugins for our groovy handlers
-        </description>
-        <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
-        <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
-        </param-value>
-    </context-param>
-
-
 
     <context-param>
         <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
diff --git a/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml b/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
index 40e5079..837008c 100644
--- a/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
+++ b/extscript-examples/myfaces20-extscript-helloworld/src/main/webapp/WEB-INF/web.xml
@@ -25,21 +25,6 @@
 
     <description>Webproject.xml</description>
 
-
-    <!--
-    Note this entry is vital it plugs the ext-scripting system into
-    a myfaces extension point
-    -->
-    <context-param>
-        <description>
-            Initializes the plugins for our groovy handlers
-        </description>
-        <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
-        <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
-        </param-value>
-    </context-param>
-
-
     <!--
     <context-param>
         <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
diff --git a/pom.xml b/pom.xml
index d7ea8a4..70e2532 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     <!-- test -->
     <properties>
         <myfaces12.version>1.2.9</myfaces12.version>
-        <myfaces2.version>2.1.6</myfaces2.version>
+        <myfaces2.version>2.0.12-SNAPSHOT</myfaces2.version>
         <extval.version>2.0.5</extval.version>
         <groovy.version>1.7.2</groovy.version>
         <maven-scala-plugin.scalaVersion>2.15.2</maven-scala-plugin.scalaVersion>