You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ch...@apache.org on 2011/08/18 04:57:01 UTC

svn commit: r1159002 - in /lucene/dev/trunk: dev-tools/eclipse/ dev-tools/idea/lucene/contrib/demo/ dev-tools/idea/lucene/contrib/xml-query-parser/ dev-tools/maven/lucene/contrib/demo/ dev-tools/maven/lucene/contrib/xml-query-parser/ lucene/contrib/ lu...

Author: chrism
Date: Thu Aug 18 02:57:00 2011
New Revision: 1159002

URL: http://svn.apache.org/viewvc?rev=1159002&view=rev
Log:
LUCENE-3286: Moved xml qp's demo into demo contrib

Added:
    lucene/dev/trunk/lucene/contrib/demo/lib/
    lucene/dev/trunk/lucene/contrib/demo/lib/servlet-api-2.4.jar
      - copied unchanged from r1158994, lucene/dev/trunk/solr/lib/servlet-api-2.4.jar
    lucene/dev/trunk/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt
      - copied unchanged from r1158994, lucene/dev/trunk/solr/lib/servlet-api-LICENSE-ASL.txt
    lucene/dev/trunk/lucene/contrib/demo/lib/servlet-api-NOTICE.txt
      - copied unchanged from r1158994, lucene/dev/trunk/solr/lib/servlet-api-NOTICE.txt
    lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/
    lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java
      - copied, changed from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java
    lucene/dev/trunk/lucene/contrib/demo/src/resources/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/META-INF/
      - copied from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/WebContent/META-INF/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/
      - copied from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/index.jsp
      - copied unchanged from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/WebContent/index.jsp
    lucene/dev/trunk/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/stylesheet.css
      - copied unchanged from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/WebContent/stylesheet.css
Removed:
    lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/
Modified:
    lucene/dev/trunk/dev-tools/eclipse/dot.classpath
    lucene/dev/trunk/dev-tools/idea/lucene/contrib/demo/demo.iml
    lucene/dev/trunk/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml
    lucene/dev/trunk/dev-tools/maven/lucene/contrib/demo/pom.xml.template
    lucene/dev/trunk/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template
    lucene/dev/trunk/lucene/contrib/CHANGES.txt
    lucene/dev/trunk/lucene/contrib/contrib-build.xml
    lucene/dev/trunk/lucene/contrib/demo/build.xml
    lucene/dev/trunk/lucene/contrib/xml-query-parser/build.xml

Modified: lucene/dev/trunk/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/eclipse/dot.classpath?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/trunk/dev-tools/eclipse/dot.classpath Thu Aug 18 02:57:00 2011
@@ -4,6 +4,7 @@
 	<classpathentry kind="src" path="lucene/src/test-framework"/>
 	<classpathentry kind="src" path="lucene/src/test"/>
 	<classpathentry kind="src" path="lucene/contrib/demo/src/java"/>
+	<classpathentry kind="src" path="lucene/contrib/demo/src/resources"/>
 	<classpathentry kind="src" path="lucene/contrib/demo/src/test"/>
 	<classpathentry kind="src" path="lucene/contrib/highlighter/src/java"/>
 	<classpathentry kind="src" path="lucene/contrib/highlighter/src/test"/>

Modified: lucene/dev/trunk/dev-tools/idea/lucene/contrib/demo/demo.iml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/idea/lucene/contrib/demo/demo.iml?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/idea/lucene/contrib/demo/demo.iml (original)
+++ lucene/dev/trunk/dev-tools/idea/lucene/contrib/demo/demo.iml Thu Aug 18 02:57:00 2011
@@ -6,12 +6,23 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/resources" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/servlet-api-2.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntry type="module" module-name="analysis-common" />
+    <orderEntry type="module" module-name="xml-query-parser" />
     <orderEntry type="module" module-name="lucene" />
     <orderEntry type="module" module-name="queryparser" />
   </component>

Modified: lucene/dev/trunk/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml (original)
+++ lucene/dev/trunk/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml Thu Aug 18 02:57:00 2011
@@ -6,14 +6,11 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/demo/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/demo/WebContent" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" scope="TEST" name="JUnit" level="project" />
-    <orderEntry type="library" name="Servlet API 2.4" level="project" />
     <orderEntry type="module" module-name="queries-contrib" />
     <orderEntry type="module" module-name="misc" />
     <orderEntry type="module" module-name="analysis-common" />

Modified: lucene/dev/trunk/dev-tools/maven/lucene/contrib/demo/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/maven/lucene/contrib/demo/pom.xml.template?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/maven/lucene/contrib/demo/pom.xml.template (original)
+++ lucene/dev/trunk/dev-tools/maven/lucene/contrib/demo/pom.xml.template Thu Aug 18 02:57:00 2011
@@ -58,6 +58,16 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>lucene-xml-query-parser</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: lucene/dev/trunk/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template (original)
+++ lucene/dev/trunk/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template Thu Aug 18 02:57:00 2011
@@ -63,11 +63,6 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: lucene/dev/trunk/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/CHANGES.txt?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/contrib/CHANGES.txt Thu Aug 18 02:57:00 2011
@@ -13,6 +13,8 @@ Build
 
  * LUCENE-3285: Moved contrib/queryparser into modules/queryparser
 
+ * LUCENE-3285: Moved contrib/xml-query-parser's demo into contrib/demo
+
 New Features
 
  * LUCENE-2604: Added RegexpQuery support to contrib/queryparser.

Modified: lucene/dev/trunk/lucene/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/contrib-build.xml?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/contrib-build.xml (original)
+++ lucene/dev/trunk/lucene/contrib/contrib-build.xml Thu Aug 18 02:57:00 2011
@@ -283,4 +283,15 @@
     </ant>
     <property name="suggest.uptodate" value="true"/>
   </target>
+
+  <property name="xml-query-parser.jar" value="${common.dir}/build/contrib/xml-query-parser/lucene-xml-query-parser-${version}.jar"/>
+  <target name="check-xml-query-parser-uptodate" unless="xml-query-parser.uptodate">
+    <contrib-uptodate name="xml-query-parser" jarfile="${xml-query-parser.jar}" property="xml-query-parser.uptodate"/>
+  </target>
+  <target name="jar-xml-query-parser" unless="xml-query-parser.uptodate" depends="check-xml-query-parser-uptodate">
+    <ant dir="${common.dir}/contrib/xml-query-parser" target="jar-core" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="xml-query-parser.uptodate" value="true"/>
+  </target>
 </project>

Modified: lucene/dev/trunk/lucene/contrib/demo/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/demo/build.xml?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/demo/build.xml (original)
+++ lucene/dev/trunk/lucene/contrib/demo/build.xml Thu Aug 18 02:57:00 2011
@@ -17,7 +17,7 @@
     limitations under the License.
  -->
 
-<project name="demo" default="jar-core" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+<project name="demo" default="default" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
 
   <description>
     Lucene Demo
@@ -33,7 +33,27 @@
 	 <pathelement path="${analyzers-common.jar}"/>
    <pathelement path="${queryparser.jar}"/>
    <pathelement path="${lucene-core.jar}"/>
+   <pathelement path="${xml-query-parser.jar}"/>
+   <pathelement location="lib/servlet-api-2.4.jar"/>
   </path>
 
-  <target name="compile-core" depends="jar-analyzers-common,jar-queryparser,common.compile-core" />
+  <target name="compile-core" depends="jar-analyzers-common,jar-queryparser,jar-xml-query-parser,common.compile-core" />
+
+  <target name="default" depends="jar-core,build-web-demo"/>
+
+  <target name="build-artifacts-and-tests" depends="jar, compile-test,build-web-demo" />
+
+  <target name="build-web-demo"  description="Compiles demo">
+    <echo>Compiling XML QueryParser Demo WAR</echo>
+
+    <war destfile="${build.dir}/lucene-xml-query-demo.war" webxml="src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/web.xml">
+      <fileset dir="src/resources/org/apache/lucene/demo/xmlparser/"/>
+      <lib dir="${build.dir}">
+        <include name="${final.name}.jar"/>
+      </lib>
+      <lib file="${queries.jar}"/>
+      <lib file="${lucene-core.jar}"/>
+    </war>
+  </target>
+  
 </project>

Copied: lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java (from r1158994, lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java)
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java?p2=lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java&p1=lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java&r1=1158994&r2=1159002&rev=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java (original)
+++ lucene/dev/trunk/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java Thu Aug 18 02:57:00 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.lucene.xmlparser.webdemo;
+package org.apache.lucene.demo.xmlparser;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;

Modified: lucene/dev/trunk/lucene/contrib/xml-query-parser/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/xml-query-parser/build.xml?rev=1159002&r1=1159001&r2=1159002&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/xml-query-parser/build.xml (original)
+++ lucene/dev/trunk/lucene/contrib/xml-query-parser/build.xml Thu Aug 18 02:57:00 2011
@@ -25,9 +25,6 @@
 
   <import file="../contrib-build.xml"/>
 
-  <property name="servlet.jar" location="${common.dir}/lib/servlet-api-2.4.jar"/>
-  <available property="servlet.jar.present" type="file" file="${servlet.jar}"/>
-
   <path id="classpath">
     <pathelement path="${queries-contrib.jar}"/>
     <pathelement path="${queryparser.jar}"/>
@@ -35,41 +32,5 @@
     <path refid="base.classpath"/>
   </path>
 
-  <path id="web-classpath">
-    <pathelement path="${queries-contrib.jar}"/>
-    <pathelement path="${queryparser.jar}"/>
-    <pathelement path="${queries.jar}"/>
-    <pathelement path="${servlet.jar}"/>
-    <pathelement path="${build.dir}/${final.name}.jar"/>
-    <path refid="base.classpath"/>
-  </path>
-
   <target name="compile-core" depends="jar-queries-contrib,jar-queryparser,jar-queries,common.compile-core" />
-
-  <!-- override contrib-build.xml target to also build web demo -->
-  <target name="build-artifacts-and-tests" depends="jar, compile-test,build-web-demo" />
-
-  <target name="default" depends="jar-lucene-core,jar-core,build-web-demo"/>
-
-  <target name="build-web-demo"  description="Compiles demo" if="servlet.jar.present">
-
-    <echo>XML Parser compiling web demo</echo>
-
-    <compile
-      srcdir="src/demo/java"
-      destdir="${build.dir}/classes/webdemo">
-      <classpath refid="web-classpath"/>
-    </compile>
-
-    <war destfile="${build.dir}/xml-query-demo.war" webxml="src/demo/WebContent/WEB-INF/web.xml">
-      <fileset dir="src/demo/WebContent"/>
-      <lib dir="${build.dir}">
-        <include name="${final.name}.jar"/>
-      </lib>
-      <lib file="${queries.jar}"/>
-      <lib file="${lucene-core.jar}"/>
-      <classes dir="${build.dir}/classes/webdemo"/>
-    </war>
-
-  </target>
 </project>