diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath
index 147664f6f31..3957ff95b16 100644
--- a/dev-tools/eclipse/dot.classpath
+++ b/dev-tools/eclipse/dot.classpath
@@ -4,6 +4,7 @@
+
diff --git a/dev-tools/idea/lucene/contrib/demo/demo.iml b/dev-tools/idea/lucene/contrib/demo/demo.iml
index 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 @@
+
+
+
+
+
+
+
+
+
+
+
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.iml
index 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 @@
-
-
-
diff --git a/dev-tools/maven/lucene/contrib/demo/pom.xml.template b/dev-tools/maven/lucene/contrib/demo/pom.xml.template
index 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 @@
lucene-queryparser
${project.version}
+
+ ${project.groupId}
+ lucene-xml-query-parser
+ ${project.version}
+
+
+ javax.servlet
+ servlet-api
+ provided
+
junit
junit
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.template
index 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 @@
lucene-queryparser
${project.version}
-
- javax.servlet
- servlet-api
- provided
-
junit
junit
diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txt
index 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.xml
index c00b0ffd985..9bc7cb17cc4 100644
--- a/lucene/contrib/contrib-build.xml
+++ b/lucene/contrib/contrib-build.xml
@@ -283,4 +283,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lucene/contrib/demo/build.xml b/lucene/contrib/demo/build.xml
index f9a117e34ae..9a06ed9b0da 100644
--- a/lucene/contrib/demo/build.xml
+++ b/lucene/contrib/demo/build.xml
@@ -17,7 +17,7 @@
limitations under the License.
-->
-
+
Lucene Demo
@@ -33,7 +33,27 @@
+
+
-
+
+
+
+
+
+
+
+ Compiling XML QueryParser Demo WAR
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lucene/contrib/demo/lib/servlet-api-2.4.jar b/lucene/contrib/demo/lib/servlet-api-2.4.jar
new file mode 100755
index 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 file
diff --git a/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt b/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt
new file mode 100644
index 00000000000..5495b3c5123
--- /dev/null
+++ b/lucene/contrib/demo/lib/servlet-api-LICENSE-ASL.txt
@@ -0,0 +1 @@
+TODO: fill in
diff --git a/lucene/contrib/demo/lib/servlet-api-NOTICE.txt b/lucene/contrib/demo/lib/servlet-api-NOTICE.txt
new file mode 100644
index 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.java
similarity index 99%
rename from lucene/contrib/xml-query-parser/src/demo/java/org/apache/lucene/xmlparser/webdemo/FormBasedXmlQueryDemo.java
rename to lucene/contrib/demo/src/java/org/apache/lucene/demo/xmlparser/FormBasedXmlQueryDemo.java
index 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.MF
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/META-INF/MANIFEST.MF
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/META-INF/MANIFEST.MF
diff --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.tsv
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/data.tsv
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/data.tsv
diff --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.xsl
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/query.xsl
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xsl
diff --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.xml
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/WEB-INF/web.xml
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/web.xml
diff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/index.jsp b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/index.jsp
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/index.jsp
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/index.jsp
diff --git a/lucene/contrib/xml-query-parser/src/demo/WebContent/stylesheet.css b/lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/stylesheet.css
similarity index 100%
rename from lucene/contrib/xml-query-parser/src/demo/WebContent/stylesheet.css
rename to lucene/contrib/demo/src/resources/org/apache/lucene/demo/xmlparser/stylesheet.css
diff --git a/lucene/contrib/xml-query-parser/build.xml b/lucene/contrib/xml-query-parser/build.xml
index 8c1846b7594..c1bea22fb6f 100644
--- a/lucene/contrib/xml-query-parser/build.xml
+++ b/lucene/contrib/xml-query-parser/build.xml
@@ -25,9 +25,6 @@
-
-
-
@@ -35,41 +32,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- XML Parser compiling web demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-