Apache Solr open-source search software
LUCENE-3286: Moved xml qp's demo into demo contrib
Christopher John Male04bd9ae73a88
diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpathindex 147664f6f31..3957ff95b16 100644--- a/dev-tools/eclipse/dot.classpath+++ b/dev-tools/eclipse/dot.classpath@@ -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"/>diff --git a/dev-tools/idea/lucene/contrib/demo/demo.iml b/dev-tools/idea/lucene/contrib/demo/demo.imlindex 6941a7fd0fc..fab85b19be5 100644--- a/dev-tools/idea/lucene/contrib/demo/demo.iml+++ b/dev-tools/idea/lucene/contrib/demo/demo.iml@@ -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>diff --git a/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml b/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.imlindex 80f15c2ec7e..8daaab04c25 100644--- a/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml+++ b/dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml@@ -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" />diff --git a/dev-tools/maven/lucene/contrib/demo/pom.xml.template b/dev-tools/maven/lucene/contrib/demo/pom.xml.templateindex 3834132307e..03ff8016d3f 100644--- a/dev-tools/maven/lucene/contrib/demo/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/demo/pom.xml.template@@ -57,6 +57,16 @@<artifactId>lucene-queryparser</artifactId><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>diff --git a/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template b/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.templateindex 909280ac134..7361a1b4f9e 100644--- a/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template+++ b/dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template@@ -62,11 +62,6 @@<artifactId>lucene-queryparser</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>diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txtindex 1b5f63c68f1..bb670e99d3c 100644--- a/lucene/contrib/CHANGES.txt+++ b/lucene/contrib/CHANGES.txt@@ -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.diff --git a/lucene/contrib/contrib-build.xml b/lucene/contrib/contrib-build.xmlindex c00b0ffd985..9bc7cb17cc4 100644--- a/lucene/contrib/contrib-build.xml+++ b/lucene/contrib/contrib-build.xml@@ -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>diff --git a/lucene/contrib/demo/build.xml b/lucene/contrib/demo/build.xmlindex f9a117e34ae..9a06ed9b0da 100644--- a/lucene/contrib/demo/build.xml+++ b/lucene/contrib/demo/build.xml@@ -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>diff --git a/lucene/contrib/demo/lib/servlet-api-2.4.jar b/lucene/contrib/demo/lib/servlet-api-2.4.jarnew file mode 100755index 00000000000..9e7f1e85a59--- /dev/null+++ b/lucene/contrib/demo/lib/servlet-api-2.4.jar@@ -0,0 +1,2 @@+AnyObjectId[018d6effad3823d0ea59f1b58ab154fc2652f418] was removed in git history.+Apache SVN contains full history.\ No newline at end of filediff --git a/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt b/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txtnew file mode 100644index 00000000000..5495b3c5123--- /dev/null+++ b/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt@@ -0,0 +1 @@+TODO: fill indiff --git a/lucene/contrib/demo/lib/servlet-api-NOTICE.txt b/lucene/contrib/demo/lib/servlet-api-NOTICE.txtnew file mode 100644index 00000000000..de6f8021188--- /dev/null+++ b/lucene/contrib/demo/lib/servlet-api-NOTICE.txt@@ -0,0 +1,5 @@+Apache Tomcat+Copyright 1999-2007 The Apache Software Foundation++This product includes software developed by+The Apache Software Foundation (http://www.apache.org/).diff --git a/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.javasimilarity index 99%rename from lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.javarename to lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.javaindex 5de44f5f8c7..6d76153de64 100644--- a/lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java+++ b/lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java@@ -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;diff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/META-INF/MANIFEST.MF b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/META-INF/MANIFEST.MFsimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/META-INF/MANIFEST.MFrename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/META-INF/MANIFEST.MFdiff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/data.tsv b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/data.tsvsimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/data.tsvrename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/data.tsvdiff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/query.xsl b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xslsimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/query.xslrename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xsldiff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/web.xml b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/web.xmlsimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/web.xmlrename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/web.xmldiff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/index.jsp b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/index.jspsimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/index.jsprename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/index.jspdiff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/stylesheet.css b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/stylesheet.csssimilarity index 100%rename from lucene/contrib/xml-query-parser/src/demo/WebContent/stylesheet.cssrename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/stylesheet.cssdiff --git a/lucene/contrib/xml-query-parser/build.xml b/lucene/contrib/xml-query-parser/build.xmlindex 8c1846b7594..c1bea22fb6f 100644--- a/lucene/contrib/xml-query-parser/build.xml+++ b/lucene/contrib/xml-query-parser/build.xml@@ -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>