You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/10/26 23:39:56 UTC
svn commit: r1189490 - in /lucene/dev/branches/branch_3x: dev-tools/eclipse/
dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/
dev-tools/idea/solr/contrib/velocity/ dev-tools/maven/solr/contrib/
dev-tools/maven/solr/contrib/velocity/ dev-tools/mave...
Author: sarowe
Date: Wed Oct 26 21:39:54 2011
New Revision: 1189490
URL: http://svn.apache.org/viewvc?rev=1189490&view=rev
Log:
SOLR-2588: backported velocity contrib to branch_3x
Added:
lucene/dev/branches/branch_3x/dev-tools/idea/.idea/libraries/Solr_velocity_library.xml (with props)
lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/
lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/velocity.iml (with props)
lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/
lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/pom.xml.template (with props)
lucene/dev/branches/branch_3x/solr/contrib/velocity/ (with props)
lucene/dev/branches/branch_3x/solr/contrib/velocity/build.xml (with props)
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-1.6.1.jar
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-1.6.1.jar
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-LICENSE-ASL.txt
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-LICENSE-ASL.txt
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-NOTICE.txt
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-NOTICE.txt
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-tools-2.0-beta3.jar
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-tools-2.0-beta3.jar
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-tools-LICENSE-ASL.txt
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-tools-LICENSE-ASL.txt
lucene/dev/branches/branch_3x/solr/contrib/velocity/lib/velocity-tools-NOTICE.txt
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/lib/velocity-tools-NOTICE.txt
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java
- copied, changed from r1189429, lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/PageTool.java
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/SolrParamResourceLoader.java
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/SolrParamResourceLoader.java
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/VelocityResponseWriter.java
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/overview.html
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/schema.xml (with props)
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/solrconfig.xml (with props)
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/velocity/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/velocity/VM_global_library.vm
- copied unchanged from r1189429, lucene/dev/branches/branch_3x/solr/core/src/test-files/solr/conf/velocity/VM_global_library.vm
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/
lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
- copied, changed from r1189429, lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
Removed:
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/PageTool.java
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/SolrParamResourceLoader.java
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/VelocityResponseWriter.java
lucene/dev/branches/branch_3x/solr/core/src/test-files/solr/conf/velocity/
lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
lucene/dev/branches/branch_3x/solr/lib/velocity-1.6.1.jar
lucene/dev/branches/branch_3x/solr/lib/velocity-LICENSE-ASL.txt
lucene/dev/branches/branch_3x/solr/lib/velocity-NOTICE.txt
lucene/dev/branches/branch_3x/solr/lib/velocity-tools-2.0-beta3.jar
lucene/dev/branches/branch_3x/solr/lib/velocity-tools-LICENSE-ASL.txt
lucene/dev/branches/branch_3x/solr/lib/velocity-tools-NOTICE.txt
Modified:
lucene/dev/branches/branch_3x/dev-tools/eclipse/dot.classpath
lucene/dev/branches/branch_3x/dev-tools/idea/.idea/ant.xml
lucene/dev/branches/branch_3x/dev-tools/idea/.idea/modules.xml
lucene/dev/branches/branch_3x/dev-tools/idea/.idea/workspace.xml
lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/pom.xml.template
lucene/dev/branches/branch_3x/dev-tools/maven/solr/core/pom.xml.template
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrCore.java
lucene/dev/branches/branch_3x/solr/example/solr/conf/solrconfig.xml
lucene/dev/branches/branch_3x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
Modified: lucene/dev/branches/branch_3x/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/eclipse/dot.classpath?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/branches/branch_3x/dev-tools/eclipse/dot.classpath Wed Oct 26 21:39:54 2011
@@ -70,13 +70,16 @@
<classpathentry kind="src" path="solr/contrib/extraction/src/test"/>
<classpathentry kind="src" path="solr/contrib/extraction/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/langid/src/java"/>
+ <classpathentry kind="src" path="solr/contrib/langid/src/resources"/>
<classpathentry kind="src" path="solr/contrib/langid/src/test"/>
<classpathentry kind="src" path="solr/contrib/langid/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/uima/src/java"/>
<classpathentry kind="src" path="solr/contrib/uima/src/resources"/>
<classpathentry kind="src" path="solr/contrib/uima/src/test"/>
<classpathentry kind="src" path="solr/contrib/uima/src/test-files"/>
- <classpathentry kind="src" path="solr/contrib/langid/src/resources"/>
+ <classpathentry kind="src" path="solr/contrib/velocity/src/java"/>
+ <classpathentry kind="src" path="solr/contrib/velocity/src/test"/>
+ <classpathentry kind="src" path="solr/contrib/velocity/src/test-files"/>
<classpathentry kind="lib" path="lucene/lib/ant-1.7.1.jar"/>
<classpathentry kind="lib" path="lucene/lib/ant-junit-1.7.1.jar"/>
<classpathentry kind="lib" path="lucene/lib/junit-4.7.jar"/>
@@ -144,14 +147,16 @@
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-core-0.10.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-parsers-0.10.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/xmlbeans-2.3.0.jar"/>
+ <classpathentry kind="lib" path="solr/contrib/langid/lib/jsonic-1.2.0.jar"/>
+ <classpathentry kind="lib" path="solr/contrib/langid/lib/langdetect-r111-java5.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/commons-digester-2.0.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/uima-an-alchemy-2.3.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/uima-an-calais-2.3.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/uima-an-tagger-2.3.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/uima-an-wst-2.3.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/uima/lib/uimaj-core-2.3.1.jar"/>
- <classpathentry kind="lib" path="solr/contrib/langid/lib/jsonic-1.2.0.jar"/>
- <classpathentry kind="lib" path="solr/contrib/langid/lib/langdetect-r111-java5.jar"/>
+ <classpathentry kind="lib" path="solr/contrib/velocity/lib/velocity-1.6.1.jar"/>
+ <classpathentry kind="lib" path="solr/contrib/velocity/lib/velocity-tools-2.0-beta3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: lucene/dev/branches/branch_3x/dev-tools/idea/.idea/ant.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/idea/.idea/ant.xml?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/idea/.idea/ant.xml (original)
+++ lucene/dev/branches/branch_3x/dev-tools/idea/.idea/ant.xml Wed Oct 26 21:39:54 2011
@@ -31,6 +31,7 @@
<buildFile url="file://$PROJECT_DIR$/solr/contrib/extraction/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/langid/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/uima/build.xml" />
+ <buildFile url="file://$PROJECT_DIR$/solr/contrib/velocity/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/solrj/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/test-framework/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/webapp/build.xml" />
Added: lucene/dev/branches/branch_3x/dev-tools/idea/.idea/libraries/Solr_velocity_library.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/idea/.idea/libraries/Solr_velocity_library.xml?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/idea/.idea/libraries/Solr_velocity_library.xml (added)
+++ lucene/dev/branches/branch_3x/dev-tools/idea/.idea/libraries/Solr_velocity_library.xml Wed Oct 26 21:39:54 2011
@@ -0,0 +1,10 @@
+<component name="libraryTable">
+ <library name="Solr velocity library">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/solr/contrib/velocity/lib" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/solr/contrib/velocity/lib" recursive="false" />
+ </library>
+</component>
Modified: lucene/dev/branches/branch_3x/dev-tools/idea/.idea/modules.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/idea/.idea/modules.xml?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/idea/.idea/modules.xml (original)
+++ lucene/dev/branches/branch_3x/dev-tools/idea/.idea/modules.xml Wed Oct 26 21:39:54 2011
@@ -31,6 +31,7 @@
<module filepath="$PROJECT_DIR$/solr/contrib/extraction/extraction.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/langid/langid.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/uima/uima.iml" />
+ <module filepath="$PROJECT_DIR$/solr/contrib/velocity/velocity.iml" />
</modules>
</component>
</project>
Modified: lucene/dev/branches/branch_3x/dev-tools/idea/.idea/workspace.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/idea/.idea/workspace.xml?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/idea/.idea/workspace.xml (original)
+++ lucene/dev/branches/branch_3x/dev-tools/idea/.idea/workspace.xml Wed Oct 26 21:39:54 2011
@@ -197,7 +197,14 @@
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
- <list size="28">
+ <configuration default="false" name="velocity contrib" type="JUnit" factoryName="JUnit">
+ <module name="velocity" />
+ <option name="TEST_OBJECT" value="package" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/solr-velocity" />
+ <option name="VM_PARAMETERS" value="-ea" />
+ <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
+ </configuration>
+ <list size="29">
<item index="0" class="java.lang.String" itemvalue="JUnit.analysis-extras contrib" />
<item index="1" class="java.lang.String" itemvalue="JUnit.benchmark contrib" />
<item index="2" class="java.lang.String" itemvalue="JUnit.clustering contrib" />
@@ -225,7 +232,8 @@
<item index="24" class="java.lang.String" itemvalue="JUnit.spellchecker contrib" />
<item index="25" class="java.lang.String" itemvalue="JUnit.stempel analyzer contrib" />
<item index="26" class="java.lang.String" itemvalue="JUnit.uima contrib" />
- <item index="27" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" />
+ <item index="27" class="java.lang.String" itemvalue="JUnit.velocity contrib" />
+ <item index="28" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" />
</list>
</component>
</project>
Added: lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/velocity.iml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/velocity.iml?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/velocity.iml (added)
+++ lucene/dev/branches/branch_3x/dev-tools/idea/solr/contrib/velocity/velocity.iml Wed Oct 26 21:39:54 2011
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/../../build/contrib/solr-velocity/classes/java" />
+ <output-test url="file://$MODULE_DIR$/../../build/contrib/solr-velocity/classes/test" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="Solr library" level="project" />
+ <orderEntry type="library" name="Solr velocity library" level="project" />
+ <orderEntry type="module" module-name="solr" />
+ <orderEntry type="module" module-name="lucene" scope="TEST" />
+ </component>
+</module>
+
Modified: lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/pom.xml.template?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/pom.xml.template (original)
+++ lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/pom.xml.template Wed Oct 26 21:39:54 2011
@@ -38,6 +38,7 @@
<module>extraction</module>
<module>langid</module>
<module>uima</module>
+ <module>velocity</module>
</modules>
<build>
<directory>../build/solr-contrib-aggregator</directory>
Added: lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/pom.xml.template?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/pom.xml.template (added)
+++ lucene/dev/branches/branch_3x/dev-tools/maven/solr/contrib/velocity/pom.xml.template Wed Oct 26 21:39:54 2011
@@ -0,0 +1,101 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-parent</artifactId>
+ <version>@version@</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-velocity</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache Solr Velocity</name>
+ <description>Apache Solr Velocity</description>
+ <properties>
+ <module-directory>solr/contrib/velocity</module-directory>
+ <build-directory>../../build/contrib/solr-velocity</build-directory>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>solr-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>solr-test-framework</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-test-framework</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity-tools</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <directory>${build-directory}</directory>
+ <outputDirectory>${build-directory}/classes/java</outputDirectory>
+ <testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
+ <sourceDirectory>src/java</sourceDirectory>
+ <testSourceDirectory>src/test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>src/test-files</directory>
+ </testResource>
+ <testResource>
+ <directory>../../core/src/test-files</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <java.util.logging.config.file>../../../../testlogging.properties</java.util.logging.config.file>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: lucene/dev/branches/branch_3x/dev-tools/maven/solr/core/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/maven/solr/core/pom.xml.template?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/maven/solr/core/pom.xml.template (original)
+++ lucene/dev/branches/branch_3x/dev-tools/maven/solr/core/pom.xml.template Wed Oct 26 21:39:54 2011
@@ -116,14 +116,6 @@
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- </dependency>
- <dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<optional>true</optional> <!-- Only used for tests and one command-line utility: JettySolrRunner -->
Added: lucene/dev/branches/branch_3x/solr/contrib/velocity/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/build.xml?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/velocity/build.xml (added)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/build.xml Wed Oct 26 21:39:54 2011
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<project name="solr-velocity" default="default">
+
+ <description>
+ Solr Velocity Response Writer
+ </description>
+
+ <import file="../contrib-build.xml"/>
+
+</project>
Copied: lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java (from r1189429, lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/PageTool.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java?p2=lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java&p1=lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/PageTool.java&r1=1189429&r2=1189490&rev=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/response/PageTool.java (original)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java Wed Oct 26 21:39:54 2011
@@ -22,6 +22,11 @@ import org.apache.solr.response.SolrQuer
import org.apache.solr.search.DocSlice;
import org.apache.solr.common.SolrDocumentList;
+/**
+ * This class is used by the Velocity response writer to provide a consistent paging tool for use by templates.
+ *
+ * TODO: add more details
+ */
public class PageTool {
private long start;
private int results_per_page = 10;
Added: lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/overview.html?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/overview.html (added)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/src/java/overview.html Wed Oct 26 21:39:54 2011
@@ -0,0 +1,5 @@
+<html>
+<body>
+Apache Solr Search Server: Velocity Response Writer contrib
+</body>
+</html>
Added: lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/schema.xml?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/schema.xml (added)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/schema.xml Wed Oct 26 21:39:54 2011
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<schema name="minimal-velocity" version="1.4">
+ <types>
+ <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
+ </types>
+
+
+ <fields>
+ <field name="id" type="string" indexed="true" stored="true" required="true" />
+ <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
+ </fields>
+
+ <uniqueKey>id</uniqueKey>
+
+ <defaultSearchField>id</defaultSearchField>
+
+ <solrQueryParser defaultOperator="OR"/>
+
+</schema>
Added: lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/solrconfig.xml?rev=1189490&view=auto
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/solrconfig.xml (added)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test-files/velocity/solr/conf/solrconfig.xml Wed Oct 26 21:39:54 2011
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ For more details about configurations options that may appear in
+ this file, see http://wiki.apache.org/solr/SolrConfigXml.
+-->
+<config>
+ <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
+
+ <lib dir="../../contrib/velocity/lib" />
+ <lib dir="../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
+ <dataDir>${solr.data.dir:}</dataDir>
+
+
+ <directoryFactory name="DirectoryFactory"
+ class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
+
+
+ <indexDefaults>
+ <useCompoundFile>false</useCompoundFile>
+ <mergeFactor>10</mergeFactor>
+ <ramBufferSizeMB>32</ramBufferSizeMB>
+ <maxFieldLength>10000</maxFieldLength>
+ <writeLockTimeout>1000</writeLockTimeout>
+ <commitLockTimeout>10000</commitLockTimeout>
+ <lockType>native</lockType>
+ </indexDefaults>
+
+ <mainIndex>
+ <useCompoundFile>false</useCompoundFile>
+ <ramBufferSizeMB>32</ramBufferSizeMB>
+ <mergeFactor>10</mergeFactor>
+ <unlockOnStartup>false</unlockOnStartup>
+ <reopenReaders>true</reopenReaders>
+ <deletionPolicy class="solr.SolrDeletionPolicy">
+ <str name="maxCommitsToKeep">1</str>
+ <str name="maxOptimizedCommitsToKeep">0</str>
+ </deletionPolicy>
+ <infoStream file="INFOSTREAM.txt">false</infoStream>
+ </mainIndex>
+
+ <updateHandler class="solr.DirectUpdateHandler2">
+ </updateHandler>
+
+ <query>
+ <maxBooleanClauses>1024</maxBooleanClauses>
+ <filterCache class="solr.FastLRUCache"
+ size="512"
+ initialSize="512"
+ autowarmCount="0"/>
+ <queryResultCache class="solr.LRUCache"
+ size="512"
+ initialSize="512"
+ autowarmCount="0"/>
+ <documentCache class="solr.LRUCache"
+ size="512"
+ initialSize="512"
+ autowarmCount="0"/>
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
+
+ <queryResultWindowSize>20</queryResultWindowSize>
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
+ <listener event="newSearcher" class="solr.QuerySenderListener">
+ <arr name="queries">
+ </arr>
+ </listener>
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
+ <arr name="queries">
+ <lst>
+ <str name="q">static firstSearcher warming in solrconfig.xml</str>
+ </lst>
+ </arr>
+ </listener>
+ <useColdSearcher>false</useColdSearcher>
+ <maxWarmingSearchers>2</maxWarmingSearchers>
+
+ </query>
+ <requestDispatcher handleSelect="true" >
+ <requestParsers enableRemoteStreaming="true"
+ multipartUploadLimitInKB="2048000" />
+ <httpCaching never304="true" />
+ </requestDispatcher>
+
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
+ <lst name="defaults">
+ <str name="echoParams">explicit</str>
+ <int name="rows">10</int>
+ </lst>
+ </requestHandler>
+
+
+ <requestHandler name="/update"
+ class="solr.XmlUpdateRequestHandler">
+ </requestHandler>
+ <!-- Binary Update Request Handler
+ http://wiki.apache.org/solr/javabin
+ -->
+ <requestHandler name="/update/javabin"
+ class="solr.BinaryUpdateRequestHandler" />
+ <requestHandler name="/update/json"
+ class="solr.JsonUpdateRequestHandler"
+ startup="lazy" />
+ <!--
+ <queryResponseWriter name="xml"
+ default="true"
+ class="solr.XMLResponseWriter" />
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
+ <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
+ <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
+ <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
+ <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
+ <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
+ -->
+
+ <!-- Legacy config for the admin interface -->
+ <admin>
+ <defaultQuery>*:*</defaultQuery>
+ </admin>
+
+</config>
Copied: lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java (from r1189429, lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java?p2=lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java&p1=lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java&r1=1189429&r2=1189490&rev=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java (original)
+++ lucene/dev/branches/branch_3x/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java Wed Oct 26 21:39:54 2011
@@ -17,21 +17,32 @@
package org.apache.solr.velocity;
+import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.response.VelocityResponseWriter;
import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.util.AbstractSolrTestCase;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
import java.io.StringWriter;
import java.io.IOException;
-public class VelocityResponseWriterTest extends AbstractSolrTestCase {
- @Override
- public String getSchemaFile() { return "schema.xml"; }
- @Override
- public String getSolrConfigFile() { return "solrconfig.xml"; }
+public class VelocityResponseWriterTest extends SolrTestCaseJ4 {
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ initCore("solrconfig.xml", "schema.xml", getFile("velocity/solr").getAbsolutePath());
+ }
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ clearIndex();
+ assertU(commit());
+ }
+ @Test
public void testTemplateName() throws IOException {
org.apache.solr.response.VelocityResponseWriter vrw = new VelocityResponseWriter();
SolrQueryRequest req = req("v.template","custom", "v.template.custom","$response.response.response_data");
@@ -41,4 +52,6 @@ public class VelocityResponseWriterTest
vrw.write(buf, req, rsp);
assertEquals("testing", buf.toString());
}
+
+ // TODO: add test that works with true Solr requests and wt=velocity to ensure the test tests that it's registered properly, etc
}
Modified: lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrCore.java Wed Oct 26 21:39:54 2011
@@ -1453,7 +1453,6 @@ public final class SolrCore implements S
m.put("ruby", new RubyResponseWriter());
m.put("raw", new RawResponseWriter());
m.put("javabin", new BinaryResponseWriter());
- m.put("velocity", new VelocityResponseWriter());
m.put("csv", new CSVResponseWriter());
DEFAULT_RESPONSE_WRITERS = Collections.unmodifiableMap(m);
}
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/solrconfig.xml?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/solrconfig.xml Wed Oct 26 21:39:54 2011
@@ -63,11 +63,15 @@
<lib dir="./lib" />
-->
+
<!-- A dir option by itself adds any files found in the directory to
the classpath, this is useful for including all jars in a
directory.
-->
<lib dir="../../contrib/extraction/lib" />
+ <lib dir="../../contrib/clustering/lib/" />
+ <lib dir="../../contrib/velocity/lib" />
+
<!-- When a regex is specified in addition to a directory, only the
files in that directory which completely match the regex
(anchored on both ends) will be included.
@@ -75,12 +79,15 @@
<lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
+ <lib dir="../../dist/" regex="apache-solr-langid-\d.*\.jar" />
+ <lib dir="../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
<!-- If a dir option (with or without a regex) is used and nothing
is found that matches, it will be ignored
-->
<lib dir="../../contrib/clustering/lib/" />
- <lib dir="/total/crap/dir/ignored" />
+ <lib dir="/total/crap/dir/ignored" />
+
<!-- an exact path can be used to specify a specific file. This
will cause a serious error to be logged if it can't be loaded.
-->
@@ -1529,15 +1536,15 @@
<queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
<queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
<queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
- <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
<queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
-->
<!--
Custom response writers can be declared as needed...
-->
- <!--
- <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
- -->
+ <!-- The solr.velocity.enabled flag is used by Solr's test cases so that this response writer is not
+ loaded (causing an error if contrib/velocity has not been built fully) -->
+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" enable="${solr.velocity.enabled:true}"/>
+
<!-- XSLT response writer transforms the XML output by any xslt file found
in Solr's conf/xslt directory. Changes to xslt files are checked for
Modified: lucene/dev/branches/branch_3x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java (original)
+++ lucene/dev/branches/branch_3x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java Wed Oct 26 21:39:54 2011
@@ -55,6 +55,9 @@ public class JettyWebappTest extends Luc
System.setProperty("solr.data.dir", dataDir.getCanonicalPath());
String path = ExternalPaths.WEBAPP_HOME;
+ // disable VelocityResponseWriter from example configuration
+ System.setProperty("solr.velocity.enabled", "false");
+
server = new Server(port);
// insecure: only use for tests!!!!
server.setSessionIdManager(new HashSessionIdManager(new Random(random.nextLong())));
Modified: lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java (original)
+++ lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java Wed Oct 26 21:39:54 2011
@@ -47,6 +47,9 @@ abstract public class SolrJettyTestBase
System.setProperty( "solr.solr.home", solrHome);
System.setProperty( "solr.data.dir", dataDir.getCanonicalPath() );
+ // disable VelocityResponseWriter from example configuration
+ System.setProperty("solr.velocity.enabled", "false");
+
context = context==null ? "/solr" : context;
SolrJettyTestBase.context = context;
jetty = new JettySolrRunner( context, 0, configFile );
Modified: lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1189490&r1=1189489&r2=1189490&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/branches/branch_3x/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Wed Oct 26 21:39:54 2011
@@ -110,6 +110,7 @@ public abstract class SolrTestCaseJ4 ext
if (solrHome != null) {
System.setProperty("solr.solr.home", solrHome);
}
+ System.setProperty("solr.velocity.enabled", "false");
initCore();
}