You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2011/02/28 01:12:52 UTC

svn commit: r1075184 - in /lucene/dev/trunk/solr: build.xml src/webapp/web/admin/get-file.jsp src/webapp/web/admin/ping.jsp src/webapp/web/admin/ping.xsl src/webapp/web/admin/raw-schema.jsp

Author: uschindler
Date: Mon Feb 28 00:12:52 2011
New Revision: 1075184

URL: http://svn.apache.org/viewvc?rev=1075184&view=rev
Log:
SOLR-2392: Add a dummy-compile task using jspc task (imported from jetty's jasper) to check that all webapps's JSP files at least compile

Removed:
    lucene/dev/trunk/solr/src/webapp/web/admin/get-file.jsp
    lucene/dev/trunk/solr/src/webapp/web/admin/ping.jsp
    lucene/dev/trunk/solr/src/webapp/web/admin/ping.xsl
    lucene/dev/trunk/solr/src/webapp/web/admin/raw-schema.jsp
Modified:
    lucene/dev/trunk/solr/build.xml

Modified: lucene/dev/trunk/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/build.xml?rev=1075184&r1=1075183&r2=1075184&view=diff
==============================================================================
--- lucene/dev/trunk/solr/build.xml (original)
+++ lucene/dev/trunk/solr/build.xml Mon Feb 28 00:12:52 2011
@@ -379,7 +379,7 @@
   <!-- Run contrib unit tests. -->
   <target name="test"
         description="Runs the core unit tests."
-        depends="test-core, test-contrib" />
+        depends="test-core, test-contrib, test-jsp" />
 
   <target name="junit" depends="compileTests,junit-mkdir,junit-sequential,junit-parallel"/>
 
@@ -554,6 +554,37 @@
     </clover-report>
   </target>
 
+  <!-- ========================================================================= -->
+
+  <!-- Checks that all JSP files in the webapp compile successfully using Jetty's Jasper -->
+  <target name="test-jsp" depends="compile">
+    <property name="jsp.target" location="${dest}/jsp-temp" />
+    <taskdef classname="org.apache.jasper.JspC" name="jasper" >
+      <classpath>
+        <fileset dir="example/lib" includes="**/*.jar" />
+      </classpath>
+    </taskdef>
+    <delete dir="${jsp.target}" />
+    <mkdir dir="${jsp.target}" />
+    <jasper
+      uriroot="${src}/webapp/web"
+      outputDir="${jsp.target}" 
+      compile="false" 
+      verbose="1"
+      package="j"
+    />
+    <javac
+      srcdir="${jsp.target}"
+      destdir="${jsp.target}"
+      target="${java.compat.version}"
+      source="${java.compat.version}"
+      debug="off"
+      encoding="utf8"
+      includeAntRuntime="${javac.includeAntRuntime}"
+      classpathref="test.compile.classpath"
+    />
+  </target>
+
 
   <!-- ========================================================================= -->
   <!-- ===================== DISTRIBUTION-RELATED TASKS ======================== -->
@@ -568,7 +599,7 @@
   <!-- Creates the Solr WAR file. -->
   <target name="dist-war"
           description="Creates the Solr WAR Distribution file."
-          depends="compile, make-manifest, dist-jar, dist-solrj, lucene-jars-to-solr">
+          depends="compile, test-jsp, make-manifest, dist-jar, dist-solrj, lucene-jars-to-solr">
     <mkdir dir="${dist}" />
     <war destfile="${dist}/${fullnamever}.war"
          webxml="${web.xml}"