incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1227233 - in /sling/trunk/maven/maven-jspc-plugin: pom.xml src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
Date Wed, 04 Jan 2012 17:37:47 GMT
Author: cziegeler
Date: Wed Jan  4 17:37:47 2012
New Revision: 1227233

URL: http://svn.apache.org/viewvc?rev=1227233&view=rev
Log:
SLING-2350 : Sling Maven JSPC Plugin depends on legacy Sling API lib which does not support
adaptable SlingHttpServletRequest objects

Modified:
    sling/trunk/maven/maven-jspc-plugin/pom.xml
    sling/trunk/maven/maven-jspc-plugin/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java

Modified: sling/trunk/maven/maven-jspc-plugin/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-jspc-plugin/pom.xml?rev=1227233&r1=1227232&r2=1227233&view=diff
==============================================================================
--- sling/trunk/maven/maven-jspc-plugin/pom.xml (original)
+++ sling/trunk/maven/maven-jspc-plugin/pom.xml Wed Jan  4 17:37:47 2012
@@ -67,8 +67,14 @@
 
         <dependency>
             <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.2.2</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.scripting.jsp</artifactId>
-            <version>2.0.2-incubator</version>
+            <version>2.0.18</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/maven/maven-jspc-plugin/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-jspc-plugin/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java?rev=1227233&r1=1227232&r2=1227233&view=diff
==============================================================================
--- sling/trunk/maven/maven-jspc-plugin/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
(original)
+++ sling/trunk/maven/maven-jspc-plugin/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
Wed Jan  4 17:37:47 2012
@@ -47,6 +47,7 @@ import org.apache.sling.scripting.jsp.ja
 import org.apache.sling.scripting.jsp.jasper.compiler.Compiler;
 import org.apache.sling.scripting.jsp.jasper.compiler.JspConfig;
 import org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext;
+import org.apache.sling.scripting.jsp.jasper.compiler.OriginalTldLocationsCache;
 import org.apache.sling.scripting.jsp.jasper.compiler.TagPluginManager;
 import org.apache.sling.scripting.jsp.jasper.compiler.TldLocationsCache;
 import org.apache.sling.scripting.jsp.jasper.xmlparser.TreeNode;
@@ -347,10 +348,6 @@ public class JspcMojo extends AbstractMo
             }
             Thread.currentThread().setContextClassLoader(loader);
 
-            // we only use the class loader and do not need the class path
-            clctxt.setClassLoader(loader);
-            clctxt.setClassPath(null);
-
             Compiler clc = clctxt.createCompiler();
 
             // If compile is set, generate both .java and .class, if
@@ -426,7 +423,7 @@ public class JspcMojo extends AbstractMo
         try {
             context = new JspCServletContext(getLog(), new URL("file:"
                 + uriSourceRoot.replace('\\', '/') + '/'));
-            tldLocationsCache = new TldLocationsCache(context, true);
+            tldLocationsCache = new OriginalTldLocationsCache(context, true);
         } catch (MalformedURLException me) {
             getLog().error("Cannot setup ServletContext", me);
         }
@@ -604,8 +601,7 @@ public class JspcMojo extends AbstractMo
      * @see org.apache.jasper.Options#getJspClassLoader()
      */
     public ClassLoader getJspClassLoader() {
-        // no JSP ClassLoader, use default
-        return null;
+        return this.loader;
     }
 
     /*



Mime
View raw message