SOLR-2452: Rewrote Solr build system (tighter integration with the Lucene build system) and restructured Solr internal and contrib modules

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1144761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2011-07-09 23:01:53 +00:00
commit 429093b236
1420 changed files with 2600 additions and 3309 deletions

View File

@ -51,32 +51,32 @@
<classpathentry kind="src" path="modules/queries/src/test"/>
<classpathentry kind="src" path="modules/suggest/src/java"/>
<classpathentry kind="src" path="modules/suggest/src/test"/>
<classpathentry kind="src" path="solr/src/java"/>
<classpathentry kind="src" path="solr/src/webapp/src"/>
<classpathentry kind="src" path="solr/src/common"/>
<classpathentry kind="src" path="solr/src/solrj"/>
<classpathentry kind="src" path="solr/src/test-framework"/>
<classpathentry kind="src" path="solr/src/test"/>
<classpathentry kind="src" path="solr/src/test-files"/>
<classpathentry kind="src" path="solr/core/src/java"/>
<classpathentry kind="src" path="solr/core/src/test"/>
<classpathentry kind="src" path="solr/core/src/test-files"/>
<classpathentry kind="src" path="solr/solrj/src/java"/>
<classpathentry kind="src" path="solr/solrj/src/test"/>
<classpathentry kind="src" path="solr/solrj/src/test-files"/>
<classpathentry kind="src" path="solr/test-framework/src/java"/>
<classpathentry kind="src" path="solr/contrib/analysis-extras/src/java"/>
<classpathentry kind="src" path="solr/contrib/analysis-extras/src/test"/>
<classpathentry kind="src" path="solr/contrib/analysis-extras/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/main/java"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/test/java"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/test/resources"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/main/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/test/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/test/resources"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/extras/main/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/extras/test/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/extras/test/resources"/>
<classpathentry kind="src" path="solr/contrib/extraction/src/main/java"/>
<classpathentry kind="src" path="solr/contrib/extraction/src/test/java"/>
<classpathentry kind="src" path="solr/contrib/extraction/src/test/resources"/>
<classpathentry kind="src" path="solr/contrib/uima/src/main/java"/>
<classpathentry kind="src" path="solr/contrib/uima/src/main/resources"/>
<classpathentry kind="src" path="solr/contrib/uima/src/test/java"/>
<classpathentry kind="src" path="solr/contrib/uima/src/test/resources"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/java"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/test"/>
<classpathentry kind="src" path="solr/contrib/clustering/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/test"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler-extras/src/java"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler-extras/src/test"/>
<classpathentry kind="src" path="solr/contrib/dataimporthandler-extras/src/test-files"/>
<classpathentry kind="src" path="solr/contrib/extraction/src/java"/>
<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/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="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"/>

View File

@ -25,10 +25,15 @@
<buildFile url="file://$PROJECT_DIR$/modules/join/build.xml" />
<buildFile url="file://$PROJECT_DIR$/modules/suggest/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/core/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/analysis-extras/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/clustering/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/dataimporthandler/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/dataimporthandler-extras/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/extraction/build.xml" />
<buildFile url="file://$PROJECT_DIR$/solr/contrib/uima/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" />
</component>
</project>

View File

@ -30,7 +30,7 @@
<module filepath="$PROJECT_DIR$/solr/contrib/analysis-extras/analysis-extras.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/clustering/clustering.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/dataimporthandler/dataimporthandler.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/dataimporthandler/src/extras/extras.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/dataimporthandler-extras/dataimporthandler-extras.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/extraction/extraction.iml" />
<module filepath="$PROJECT_DIR$/solr/contrib/uima/uima.iml" />
</modules>

View File

@ -4,7 +4,7 @@
<configuration default="false" name="analysis-extras contrib" type="JUnit" factoryName="JUnit">
<module name="analysis-extras" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/analysis-extras/build" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/analysis-extras" />
<option name="VM_PARAMETERS" value="-ea -Dtests.luceneMatchVersion=4.0 -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
@ -18,7 +18,7 @@
<configuration default="false" name="clustering contrib" type="JUnit" factoryName="JUnit">
<module name="clustering" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/clustering/build" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/clustering" />
<option name="VM_PARAMETERS" value="-ea -Dtests.luceneMatchVersion=4.0 -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
@ -32,21 +32,21 @@
<configuration default="false" name="dataimporthandler contrib" type="JUnit" factoryName="JUnit">
<module name="dataimporthandler" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/dataimporthandler/target" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/dataimporthandler" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
<configuration default="false" name="dataimporthandler-extras contrib" type="JUnit" factoryName="JUnit">
<module name="dataimporthandler-extras" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/dataimporthandler-extras" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
<configuration default="false" name="extraction contrib" type="JUnit" factoryName="JUnit">
<module name="extraction" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/extraction/build" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
<configuration default="false" name="extras from dataimporthandler contrib" type="JUnit" factoryName="JUnit">
<module name="extras" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/dataimporthandler/target/extras" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/extraction" />
<option name="VM_PARAMETERS" value="-ea -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
@ -186,7 +186,7 @@
<configuration default="false" name="uima contrib" type="JUnit" factoryName="JUnit">
<module name="uima" />
<option name="TEST_OBJECT" value="package" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/uima/build" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/build/contrib/uima" />
<option name="VM_PARAMETERS" value="-ea -Dtests.luceneMatchVersion=4.0 -DtempDir=temp -Djetty.testMode=1 -Djetty.insecurerandom=1 -Dsolr.directoryFactory=org.apache.solr.core.MockDirectoryFactory" />
<option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
</configuration>
@ -210,8 +210,8 @@
<item index="2" class="java.lang.String" itemvalue="JUnit.clustering contrib" />
<item index="3" class="java.lang.String" itemvalue="JUnit.common analysis module" />
<item index="4" class="java.lang.String" itemvalue="JUnit.dataimporthandler contrib" />
<item index="5" class="java.lang.String" itemvalue="JUnit.extraction contrib" />
<item index="6" class="java.lang.String" itemvalue="JUnit.extras from dataimporthandler contrib" />
<item index="5" class="java.lang.String" itemvalue="JUnit.dataimporthandler-extras contrib" />
<item index="6" class="java.lang.String" itemvalue="JUnit.extraction contrib" />
<item index="7" class="java.lang.String" itemvalue="JUnit.facet module" />
<item index="8" class="java.lang.String" itemvalue="JUnit.grouping module" />
<item index="9" class="java.lang.String" itemvalue="JUnit.highlighter contrib" />

View File

@ -7,7 +7,6 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/work" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes" />
<output-test url="file://$MODULE_DIR$/build/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/analysis-extras/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/analysis-extras/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/lucene-libs" />
<sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes" />
<output-test url="file://$MODULE_DIR$/build/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/clustering/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/clustering/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../../target/extras/classes" />
<output-test url="file://$MODULE_DIR$/../../target/extras/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/dataimporthandler-extras/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/dataimporthandler-extras/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/dataimporthandler/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/dataimporthandler/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/webapp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/webapp" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes" />
<output-test url="file://$MODULE_DIR$/build/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/extraction/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/extraction/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<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" />

View File

@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes" />
<output-test url="file://$MODULE_DIR$/build/test-classes" />
<output url="file://$MODULE_DIR$/../../build/contrib/uima/classes/java" />
<output-test url="file://$MODULE_DIR$/../../build/contrib/uima/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<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" />
<sourceFolder url="file://$MODULE_DIR$/src/resources" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@ -1,21 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/solr" />
<output-test url="file://$MODULE_DIR$/build/tests" />
<output url="file://$MODULE_DIR$/../build/solr-idea/classes/java" />
<output-test url="file://$MODULE_DIR$/../build/solr-idea/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/solrj" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/common" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/webapp/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/webapp/web" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<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/test-framework" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/solrj/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/core/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/core/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/core/src/test-files" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/solrj/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/solrj/src/test-files" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/test-framework/src/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
<excludeFolder url="file://$MODULE_DIR$/lucene-libs" />
<excludeFolder url="file://$MODULE_DIR$/package" />
</content>
<orderEntry type="inheritedJdk" />

View File

@ -33,7 +33,7 @@
<description>Apache Solr Analysis Extras</description>
<properties>
<module-directory>solr/contrib/analysis-extras</module-directory>
<build-directory>build</build-directory>
<build-directory>../../build/contrib/analysis-extras</build-directory>
</properties>
<dependencies>
<dependency>
@ -91,8 +91,8 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
@ -100,7 +100,7 @@
<directory>src/test-files</directory>
</testResource>
<testResource>
<directory>../../src/test-files</directory>
<directory>../../core/src/test-files</directory>
</testResource>
</testResources>
<plugins>

View File

@ -33,7 +33,7 @@
<description>Apache Solr Clustering</description>
<properties>
<module-directory>solr/contrib/clustering</module-directory>
<build-directory>build</build-directory>
<build-directory>../../build/contrib/clustering</build-directory>
</properties>
<dependencies>
<dependency>
@ -116,14 +116,16 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<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/resources</directory>
<directory>src/test-files</directory>
</testResource>
<testResource>
<directory>../../src/test-files</directory>
<directory>../../core/src/test-files</directory>
</testResource>
</testResources>
<plugins>

View File

@ -24,7 +24,7 @@
<groupId>org.apache.solr</groupId>
<artifactId>solr-parent</artifactId>
<version>@version@</version>
<relativePath>../../../../pom.xml</relativePath>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.apache.solr</groupId>
<artifactId>solr-dataimporthandler-extras</artifactId>
@ -32,8 +32,8 @@
<name>Apache Solr DataImportHandler Extras</name>
<description>Apache Solr DataImportHandler Extras</description>
<properties>
<module-directory>solr/contrib/dataimporthandler/src/extras</module-directory>
<build-directory>../../target/extras</build-directory>
<module-directory>solr/contrib/dataimporthandler-extras</module-directory>
<build-directory>../../build/contrib/dataimporthandler-extras</build-directory>
</properties>
<dependencies>
<dependency>
@ -102,16 +102,16 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<sourceDirectory>main/java</sourceDirectory>
<testSourceDirectory>test/java</testSourceDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
<testResource>
<directory>test/resources</directory>
<directory>src/test-files</directory>
</testResource>
<testResource>
<directory>../../../../src/test-files</directory>
<directory>../../core/src/test-files</directory>
</testResource>
</testResources>
<plugins>
@ -120,7 +120,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.config.file>../../../../../../testlogging.properties</java.util.logging.config.file>
<java.util.logging.config.file>../../../../testlogging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
</plugin>

View File

@ -27,22 +27,109 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.apache.solr</groupId>
<artifactId>solr-dataimporthandler-aggregator</artifactId>
<packaging>pom</packaging>
<name>Apache Solr DataImportHandler aggregator POM</name>
<description>Apache Solr DataImportHandler aggregator POM</description>
<modules>
<module>src</module>
<module>src/extras</module>
</modules>
<artifactId>solr-dataimporthandler</artifactId>
<packaging>jar</packaging>
<name>Apache Solr DataImportHandler</name>
<description>Apache Solr DataImportHandler</description>
<properties>
<module-directory>solr/contrib/dataimporthandler</module-directory>
<build-directory>../../build/contrib/dataimporthandler</build-directory>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>solr-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-test-framework</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>solr-solrj</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${project.version}</version>
</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>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<directory>target/solr-dataimporthandler-aggregator</directory>
<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-deploy-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
<systemPropertyVariables>
<java.util.logging.config.file>../../../../testlogging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>

View File

@ -1,137 +0,0 @@
<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-dataimporthandler</artifactId>
<packaging>jar</packaging>
<name>Apache Solr DataImportHandler</name>
<description>Apache Solr DataImportHandler</description>
<properties>
<module-directory>solr/contrib/dataimporthandler</module-directory>
<build-directory>../target</build-directory>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>solr-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-test-framework</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>solr-solrj</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${project.version}</version>
</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>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<sourceDirectory>main/java</sourceDirectory>
<testSourceDirectory>test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>test/resources</directory>
</testResource>
<testResource>
<directory>../../../src/test-files</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<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>

View File

@ -36,7 +36,7 @@
</description>
<properties>
<module-directory>solr/contrib/extraction</module-directory>
<build-directory>build</build-directory>
<build-directory>../../build/contrib/extraction</build-directory>
</properties>
<dependencies>
<dependency>
@ -91,14 +91,16 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<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/resources</directory>
<directory>src/test-files</directory>
</testResource>
<testResource>
<directory>../../src/test-files</directory>
<directory>../../core/src/test-files</directory>
</testResource>
</testResources>
<plugins>

View File

@ -34,6 +34,7 @@
<module>analysis-extras</module>
<module>clustering</module>
<module>dataimporthandler</module>
<module>dataimporthandler-extras</module>
<module>extraction</module>
<module>uima</module>
</modules>

View File

@ -33,7 +33,7 @@
<description>Apache Solr - UIMA integration</description>
<properties>
<module-directory>solr/contrib/uima</module-directory>
<build-directory>build</build-directory>
<build-directory>../../build/contrib/uima</build-directory>
</properties>
<dependencies>
<dependency>
@ -103,16 +103,18 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<testOutputDirectory>${build-directory}/test-classes</testOutputDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<directory>src/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<directory>src/test-files</directory>
</testResource>
</testResources>
<plugins>

View File

@ -33,7 +33,7 @@
<description>Apache Solr Core</description>
<properties>
<module-directory>solr</module-directory>
<build-directory>../build</build-directory>
<build-directory>../build/solr-maven</build-directory>
</properties>
<dependencies>
<dependency>
@ -184,34 +184,19 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/solr</outputDirectory>
<testOutputDirectory>${build-directory}/tests</testOutputDirectory>
<sourceDirectory>java</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
<testResource>
<directory>test-files</directory>
<directory>src/test-files</directory>
</testResource>
<testResource>
<directory>../solrj/src/test-files</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>webapp/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@ -257,14 +242,15 @@
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<id>add-sorlj-and-test-framework</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>test-framework</source>
<source>../test-framework/src/java</source>
<source>../solrj/src/test</source> <!-- solrj tests are run from solr-core -->
</sources>
</configuration>
</execution>

View File

@ -32,10 +32,10 @@
<name>Apache Solr parent POM</name>
<description>Apache Solr parent POM</description>
<modules>
<module>src</module>
<module>src/solrj</module>
<module>src/webapp</module>
<module>src/test-framework</module>
<module>core</module>
<module>solrj</module>
<module>webapp</module>
<module>test-framework</module>
<module>contrib</module>
</modules>
<properties>

View File

@ -24,7 +24,7 @@
<groupId>org.apache.solr</groupId>
<artifactId>solr-parent</artifactId>
<version>@version@</version>
<relativePath>../../pom.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
@ -32,8 +32,8 @@
<name>Apache Solr Solrj</name>
<description>Apache Solr Solrj</description>
<properties>
<module-directory>solr/src/solrj</module-directory>
<build-directory>../../build/solrj</build-directory>
<module-directory>solr/solrj</module-directory>
<build-directory>../build/solr-solrj</build-directory>
</properties>
<dependencies>
<dependency>
@ -41,6 +41,12 @@
<artifactId>lucene-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
@ -80,37 +86,17 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes</outputDirectory>
<sourceDirectory>.</sourceDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory/>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory/>
<testResources/>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../common</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Solrj tests are run from the solr-core build; -->
<!-- otherwise there would be a cyclic dependency, -->
<!-- since Solrj's tests depend on solr-core, and -->
<!-- solr-core depends on Solrj. -->
<skipTests>true</skipTests>
<skip>true</skip> <!-- Tests are run from solr-core module -->
</configuration>
</plugin>
</plugins>

View File

@ -24,7 +24,7 @@
<groupId>org.apache.solr</groupId>
<artifactId>solr-parent</artifactId>
<version>@version@</version>
<relativePath>../../pom.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.solr</groupId>
<artifactId>solr-test-framework</artifactId>
@ -32,8 +32,8 @@
<name>Apache Solr Test Framework</name>
<description>Apache Solr Test Framework</description>
<properties>
<module-directory>solr/src/test-framework</module-directory>
<build-directory>../../build</build-directory>
<module-directory>solr/test-framework</module-directory>
<build-directory>../build/solr-test-framework</build-directory>
</properties>
<dependencies>
<dependency>
@ -53,8 +53,10 @@
</dependencies>
<build>
<directory>${build-directory}</directory>
<outputDirectory>${build-directory}/classes/test-framework</outputDirectory>
<sourceDirectory>.</sourceDirectory>
<outputDirectory>${build-directory}/classes/java</outputDirectory>
<testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory/>
<resources>
<resource>
<directory>.</directory>

View File

@ -24,7 +24,7 @@
<groupId>org.apache.solr</groupId>
<artifactId>solr-parent</artifactId>
<version>@version@</version>
<relativePath>../../pom.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
@ -32,8 +32,8 @@
<name>Apache Solr Search Server</name>
<description>Apache Solr Search Server</description>
<properties>
<module-directory>solr/src/webapp</module-directory>
<build-directory>../../build/web</build-directory>
<module-directory>solr/webapp</module-directory>
<build-directory>../build</build-directory>
</properties>
<dependencies>
<dependency>
@ -107,6 +107,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>solr-solrj</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>

View File

@ -286,7 +286,7 @@
<patternset refid="binary.build.dist.patterns"/>
</zipfileset>
</zip>
<lucene-checksum file="${dist.dir}/lucene-${version}.zip"/>
<make-checksums file="${dist.dir}/lucene-${version}.zip"/>
</target>
<!-- ================================================================== -->
@ -311,7 +311,7 @@
<gzip zipfile="${dist.dir}/lucene-${version}.tgz"
src="${build.dir}/lucene-${version}.tar"
/>
<lucene-checksum file="${dist.dir}/lucene-${version}.tgz"/>
<make-checksums file="${dist.dir}/lucene-${version}.tgz"/>
</target>
<!-- ================================================================== -->
@ -340,70 +340,21 @@
<mkdir dir="${maven.dist.dir}"/>
</target>
<property name="svn.export.dir" location="${build.dir}/svn-export"/>
<!-- ================================================================== -->
<!-- Packages the sources from "svn export" with tar-gzip -->
<!-- ================================================================== -->
<target name="package-tgz-src" depends="init, init-dist, svn-export-source"
description="--> Generates the Lucene distribution as .tgz">
<target name="package-tgz-src" depends="init, init-dist"
description="--> Generates the Lucene source distribution from 'svn export' as .tgz">
<property name="source.package.file"
value="${dist.dir}/lucene-${version}-src.tgz"/>
<delete file="${source.package.file}"/>
<svn-export-source source.dir="."/>
<build-changes changes.src.dir="${svn.export.dir}/src/site/changes"
changes.target.dir="${svn.export.dir}/docs/changes"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir="${svn.export.dir}"/>
</tar>
<lucene-checksum file="${source.package.file}"/>
</target>
<!-- ================================================================== -->
<!-- Runs "svn export" in build/svn-export/ with the same URL -->
<!-- and revision as the current working copy. -->
<!-- ================================================================== -->
<target name="svn-export-source" depends="get-svn-info">
<delete dir="${svn.export.dir}" includeemptydirs="true" failonerror="false"/>
<mkdir dir="${build.dir}"/>
<exec dir="." executable="${svn.exe}" failonerror="true">
<arg value="export"/>
<arg value="--native-eol"/>
<arg value="LF"/>
<arg value="-r"/>
<arg value="${svn.Revision}"/>
<arg value="${svn.URL}"/>
<arg value="${svn.export.dir}"/>
</exec>
<build-changes changes.src.dir="${svn.export.dir}/src/site/changes" changes.target.dir="${svn.export.dir}/docs/changes"/>
</target>
<!-- ================================================================== -->
<!-- Populates properties svn.URL and svn.Revision using "svn info". -->
<!-- ================================================================== -->
<target name="get-svn-info" depends="check-svn">
<exec dir="." executable="${svn.exe}" outputproperty="svn.info" failonerror="true">
<arg value="info"/>
</exec>
<loadproperties>
<propertyresource name="svn.info"/>
<filterchain>
<linecontainsregexp>
<regexp pattern="(URL|Revision):"/>
</linecontainsregexp>
<replacestring from=": " to="="/>
<prefixlines prefix="svn."/>
</filterchain>
</loadproperties>
</target>
<target name="check-svn">
<sequential>
<exec dir="." executable="${svnversion.exe}" outputproperty="svn.ver"/>
<fail message="A subversion checkout is required for this target">
<condition>
<equals arg1="${svn.ver}" arg2="exported"/>
</condition>
</fail>
</sequential>
<make-checksums file="${source.package.file}"/>
</target>
<!-- ================================================================== -->
@ -413,28 +364,8 @@
<target name="dist-all" depends="dist, dist-src"/>
<property name="rc" value="rc0"/>
<property name="remote.staging.dir" value="public_html/staging_area/${rc}/${version}"/>
<property name="keyfile" value="${user.home}/.ssh/id_rsa"/>
<property name="scp.user" value="${user.name}"/>
<!--keys.dir is the location of the https://svn.apache.org/repos/asf/lucene/java/dist/ directory-->
<property name="keys.dir" value="${common.dir}/../../dist"/>
<target name="copy-to-stage">
<sshexec host="people.apache.org"
username="${scp.user}"
keyfile="${keyfile}"
command="mkdir -p ${remote.staging.dir}"/>
<echo>Uploading artifacts to ${scp.user}@people.apache.org:${remote.staging.dir}</echo>
<scp todir="${scp.user}@people.apache.org:${remote.staging.dir}"
username="${scp.user}"
keyfile="${keyfile}"
verbose="true"
>
<fileset dir="dist"/>
<fileset dir="${keys.dir}">
<include name="KEYS"/>
</fileset>
</scp>
<copy-to-stage-macro artifacts.dir="${dist.dir}"/>
</target>
<target name="prepare-release" depends="clean, dist-all, generate-maven-artifacts, sign-artifacts"/>
@ -477,43 +408,8 @@
<!-- ================================================================== -->
<!-- support for signing the artifacts using gpg -->
<!-- ================================================================== -->
<target name="clean-dist-signatures">
<delete failonerror="false">
<fileset dir="${dist.dir}">
<include name="**/*.asc"/>
</fileset>
</delete>
</target>
<target name="sign-artifacts" depends="clean-dist-signatures">
<available property="gpg.input.handler" classname="org.apache.tools.ant.input.SecureInputHandler"
value="org.apache.tools.ant.input.SecureInputHandler"/>
<!--else:--><property name="gpg.input.handler" value="org.apache.tools.ant.input.DefaultInputHandler"/>
<input message="Enter GPG keystore password: >" addproperty="gpg.passphrase">
<handler classname="${gpg.input.handler}" />
</input>
<apply executable="${gpg.exe}" inputstring="${gpg.passphrase}"
dest="${dist.dir}" type="file" maxparallel="1" verbose="yes">
<arg value="--passphrase-fd"/>
<arg value="0"/>
<arg value="--batch"/>
<arg value="--armor"/>
<arg value="--default-key"/>
<arg value="${gpg.key}"/>
<arg value="--output"/>
<targetfile/>
<arg value="--detach-sig"/>
<srcfile/>
<fileset dir="${dist.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<include name="**/*.tgz"/>
<include name="**/*.pom"/>
</fileset>
<globmapper from="*" to="*.asc"/>
</apply>
<target name="sign-artifacts">
<sign-artifacts-macro artifacts.dir="${dist.dir}"/>
</target>
<!-- ================================================================== -->
@ -602,19 +498,6 @@
</exec>
</target>
<macrodef name="contrib-crawl">
<attribute name="target" default=""/>
<attribute name="failonerror" default="true"/>
<sequential>
<subant target="@{target}" failonerror="@{failonerror}">
<property name="core.compiled" value="true"/>
<fileset dir="."
includes="contrib/*/build.xml"
/>
</subant>
</sequential>
</macrodef>
<target name="build-contrib" depends="compile-test"
description="Builds all contrib modules and their tests">
<contrib-crawl target="build-artifacts-and-tests"/>
@ -624,16 +507,6 @@
<contrib-crawl target="test" failonerror="true"/>
</target>
<!-- Macro for building checksum files -->
<macrodef name="lucene-checksum">
<attribute name="file"/>
<sequential>
<echo>Building checksums for '@{file}'</echo>
<checksum file="@{file}" algorithm="md5" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
<checksum file="@{file}" algorithm="sha1" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
</sequential>
</macrodef>
<!--
compile changes.txt into an html file
-->

View File

@ -26,7 +26,7 @@
<dirname file="${ant.file.common}" property="common.dir"/>
<property name="dev-tools.dir" value="${common.dir}/../dev-tools"/>
<property name="prettify.dir" value="${common.dir}/src/tools/prettify"/>
<property name="maven.build.dir" value="${common.dir}/build/maven"/>
<property name="maven.build.dir" value="${build.dir}/maven"/>
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
@ -39,6 +39,8 @@
<format property="current.year" pattern="yyyy"/>
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
<format property="TSTAMP" pattern="HH:mm:ss"/>
<!-- datetime format that is safe to treat as part of a dotted version -->
<format property="dateversion" pattern="yyyy.MM.dd.HH.mm.ss" />
</tstamp>
<property name="name" value="${ant.project.name}"/>
@ -92,6 +94,7 @@
<property name="tests.seed" value="random" />
<property name="tests.loggingfile" value="/dev/null"/>
<property name="tests.nightly" value="false" />
<property name="tests.cleanthreads.sysprop" value="perMethod"/>
<property name="javac.deprecation" value="off"/>
<property name="javac.debug" value="on"/>
@ -201,6 +204,11 @@
</and>
</condition>
<propertyset id="uptodate.and.compiled.properties" dynamic="true">
<propertyref regex=".*\.uptodate$$"/>
<propertyref regex=".*\.compiled$$"/>
</propertyset>
<target name="clean"
description="Removes contents of build and dist directories">
<delete dir="${build.dir}"/>
@ -325,10 +333,11 @@
<macrodef name="m2-deploy" description="Builds a Maven artifact">
<element name="artifact-attachments" optional="yes"/>
<attribute name="pom.xml" default="pom.xml"/>
<attribute name="jar.file" default="${build.dir}/${final.name}.jar"/>
<sequential>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
<artifact:pom id="maven.project" file="@{pom.xml}"/>
<artifact:deploy file="${build.dir}/${maven.project.build.finalName}.jar">
<artifact:deploy file="@{jar.file}">
<artifact-attachments/>
<remoteRepository url="${m2.repository.url}">
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/>
@ -342,13 +351,13 @@
<attribute name="pom.xml"/>
<attribute name="jar.file"/>
<sequential>
<copy file="@{pom.xml}" tofile="${maven.build.dir}/@{pom.xml}">
<copy file="@{pom.xml}" tofile="${maven.build.dir}/pom.xml">
<filterset begintoken="@" endtoken="@">
<filter token="version" value="${version}"/>
</filterset>
</copy>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
<artifact:pom id="maven.project" file="${maven.build.dir}/@{pom.xml}" />
<artifact:pom id="maven.project" file="${maven.build.dir}/pom.xml" />
<artifact:deploy file="@{jar.file}">
<remoteRepository url="${m2.repository.url}">
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/>
@ -359,35 +368,58 @@
</macrodef>
<macrodef name="build-manifest" description="Builds a manifest file">
<attribute name="title" default="Lucene Search Engine: ${ant.project.name}" />
<sequential>
<attribute name="title"/>
<attribute name="implementation.title"/>
<attribute name="spec.version"/>
<sequential>
<manifest file="${manifest.file}">
<!--
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html
http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/package-summary.html
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
-->
<!-- Don't set 'Manifest-Version' it identifies the version of the
manifest file format, and should always be 1.0 (the default)
Don't set 'Created-by' attribute, its purpose is
to identify the version of java used to build the jar,
which ant will do by default.
Ant will happily override these with bogus strings if you
tell it to, so don't.
NOTE: we don't use section info because all of our manifest data
applies to the entire jar/war ... no package specific info.
-->
<attribute name="Extension-Name" value="@{implementation.title}"/>
<attribute name="Specification-Title" value="@{title}"/>
<!-- spec version must match "digit+{.digit+}*" -->
<attribute name="Specification-Version" value="${spec.version}"/>
<attribute name="Specification-Vendor"
value="The Apache Software Foundation"/>
<attribute name="Implementation-Title" value="org.apache.lucene"/>
<!-- impl version can be any string -->
<attribute name="Implementation-Version"
value="${version} ${svnversion} - ${DSTAMP} ${TSTAMP}"/>
<attribute name="Implementation-Vendor"
value="The Apache Software Foundation"/>
<attribute name="X-Compile-Source-JDK"
value="${javac.source}"/>
<attribute name="X-Compile-Target-JDK"
value="${javac.target}"/>
</manifest>
</sequential>
<!-- spec version must match "digit+{.digit+}*" -->
<attribute name="Specification-Version" value="@{spec.version}"/>
<attribute name="Specification-Vendor"
value="The Apache Software Foundation"/>
<attribute name="Implementation-Title" value="@{implementation.title}"/>
<!-- impl version can be any string -->
<attribute name="Implementation-Version"
value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
<attribute name="Implementation-Vendor"
value="The Apache Software Foundation"/>
<attribute name="X-Compile-Source-JDK" value="${javac.source}"/>
<attribute name="X-Compile-Target-JDK" value="${javac.target}"/>
</manifest>
</sequential>
</macrodef>
<macrodef name="jarify" description="Builds a JAR file">
<attribute name="basedir" default="${build.dir}/classes/java"/>
<attribute name="destfile" default="${build.dir}/${final.name}.jar"/>
<attribute name="title" default="Lucene Search Engine: ${ant.project.name}"/>
<attribute name="excludes" default="**/pom.xml"/>
<element name="manifest-attributes" optional="yes"/>
<element name="metainf-includes" optional="yes"/>
<attribute name="excludes" default="**/pom.xml,**/*.iml"/>
<attribute name="metainf.source.dir" default="${common.dir}"/>
<attribute name="implementation.title" default="org.apache.lucene"/>
<attribute name="spec.version" default="${spec.version}"/>
<element name="nested" optional="true" implicit="true"/>
<sequential>
<!-- If possible, include the svnversion -->
<exec dir="." executable="${svnversion.exe}"
@ -395,21 +427,16 @@
<arg line="."/>
</exec>
<build-manifest title="@{title}"/>
<build-manifest title="@{title}"
implementation.title="@{implementation.title}"
spec.version="@{spec.version}"/>
<jar
destfile="@{destfile}"
basedir="@{basedir}"
manifest="${manifest.file}"
excludes="@{excludes}">
<manifest>
<manifest-attributes/>
</manifest>
<metainf dir="${common.dir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</metainf>
<metainf-includes/>
<jar destfile="@{destfile}"
basedir="@{basedir}"
manifest="${manifest.file}"
excludes="@{excludes}">
<metainf dir="@{metainf.source.dir}" includes="LICENSE.txt,NOTICE.txt"/>
<nested />
</jar>
</sequential>
</macrodef>
@ -509,7 +536,7 @@
<!-- set the Version that tests should run against -->
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<!-- for lucene we can be strict, and we don't want false fails even across methods -->
<sysproperty key="tests.cleanthreads" value="perMethod"/>
<sysproperty key="tests.cleanthreads" value="${tests.cleanthreads.sysprop}"/>
<!-- logging config file -->
<sysproperty key="java.util.logging.config.file" value="${tests.loggingfile}"/>
<!-- set whether or not nightly tests should run -->
@ -523,6 +550,8 @@
<sysproperty key="testmethod" value="${testmethod}"/>
<sysproperty key="jetty.testMode" value="1"/>
<sysproperty key="jetty.insecurerandom" value="1"/>
<sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
<formatter type="xml"/>
<formatter classname="${junit.details.formatter}" usefile="false"/>
@ -770,7 +799,7 @@
<record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
<javadoc
overview="@{overview}"
packagenames="org.apache.lucene.*"
packagenames="org.apache.lucene.*,org.apache.solr.*"
destdir="@{destdir}"
access="${javadoc.access}"
encoding="${build.encoding}"
@ -824,6 +853,16 @@
</sequential>
</macrodef>
<macrodef name="contrib-crawl">
<attribute name="target" default=""/>
<attribute name="failonerror" default="true"/>
<sequential>
<subant target="@{target}" failonerror="@{failonerror}" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="." includes="contrib/*/build.xml"/>
</subant>
</sequential>
</macrodef>
<!-- VALIDATION work -->
@ -845,10 +884,127 @@
<target name="validate-lucene" depends="check-legal-lucene" unless="validated-lucene"/>
<!-- Generic placeholder target for if we add other validation tasks -->
<target name="validate" depends="validate-lucene"/>
<property name="svn.export.dir" location="${build.dir}/svn-export"/>
<macrodef name="svn-export-source"
description="Runs 'svn export' with the same URL and revision as the current working copy.">
<attribute name="source.dir"/>
<sequential>
<delete dir="${svn.export.dir}" includeemptydirs="true" failonerror="false"/>
<get-svn-info directory="@{source.dir}"/>
<exec dir="@{source.dir}" executable="${svn.exe}" failonerror="true">
<arg value="export"/>
<arg value="--native-eol"/>
<arg value="LF"/>
<arg value="-r"/>
<arg value="${svn.Revision}"/>
<arg value="${svn.URL}"/>
<arg value="${svn.export.dir}"/>
</exec>
</sequential>
</macrodef>
<macrodef name="get-svn-info"
description="Populates properties svn.URL and svn.Revision using 'svn info'.">
<attribute name="directory"/>
<sequential>
<exec dir="." executable="${svnversion.exe}" outputproperty="svn.ver"/>
<fail message="A subversion checkout is required for this target">
<condition>
<equals arg1="${svn.ver}" arg2="exported"/>
</condition>
</fail>
<exec dir="@{directory}" executable="${svn.exe}" outputproperty="svn.info" failonerror="true">
<arg value="info"/>
</exec>
<loadproperties>
<propertyresource name="svn.info"/>
<filterchain>
<linecontainsregexp>
<regexp pattern="(URL|Revision):"/>
</linecontainsregexp>
<replacestring from=": " to="="/>
<prefixlines prefix="svn."/>
</filterchain>
</loadproperties>
</sequential>
</macrodef>
<macrodef name="make-checksums" description="Macro for building checksum files">
<attribute name="file"/>
<sequential>
<echo>Building checksums for '@{file}'</echo>
<checksum file="@{file}" algorithm="md5" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
<checksum file="@{file}" algorithm="sha1" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
</sequential>
</macrodef>
<macrodef name="sign-artifacts-macro">
<attribute name="artifacts.dir"/>
<sequential>
<delete failonerror="false">
<fileset dir="@{artifacts.dir}">
<include name="**/*.asc"/>
</fileset>
</delete>
<available property="gpg.input.handler" classname="org.apache.tools.ant.input.SecureInputHandler"
value="org.apache.tools.ant.input.SecureInputHandler"/>
<!--else:--><property name="gpg.input.handler" value="org.apache.tools.ant.input.DefaultInputHandler"/>
<input message="Enter GPG keystore password: >" addproperty="gpg.passphrase">
<handler classname="${gpg.input.handler}" />
</input>
<apply executable="${gpg.exe}" inputstring="${gpg.passphrase}"
dest="@{artifacts.dir}" type="file" maxparallel="1" verbose="yes">
<arg value="--passphrase-fd"/>
<arg value="0"/>
<arg value="--batch"/>
<arg value="--armor"/>
<arg value="--default-key"/>
<arg value="${gpg.key}"/>
<arg value="--output"/>
<targetfile/>
<arg value="--detach-sig"/>
<srcfile/>
<fileset dir="@{artifacts.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<include name="**/*.tgz"/>
<include name="**/*.pom"/>
</fileset>
<globmapper from="*" to="*.asc"/>
</apply>
</sequential>
</macrodef>
<property name="rc" value="rc0"/>
<property name="remote.staging.dir" value="public_html/staging_area/${rc}/${version}"/>
<property name="keyfile" value="${user.home}/.ssh/id_rsa"/>
<property name="scp.user" value="${user.name}"/>
<!--keys.dir is the location of the https://svn.apache.org/repos/asf/lucene/java/dist/ directory-->
<property name="keys.dir" value="${common.dir}/../../dist"/>
<macrodef name="copy-to-stage-macro">
<attribute name="artifacts.dir"/>
<sequential>
<sshexec host="people.apache.org"
username="${scp.user}"
keyfile="${keyfile}"
command="mkdir -p ${remote.staging.dir}"/>
<echo>Uploading artifacts to ${scp.user}@people.apache.org:${remote.staging.dir}</echo>
<scp todir="${scp.user}@people.apache.org:${remote.staging.dir}"
username="${scp.user}"
keyfile="${keyfile}"
verbose="true">
<fileset dir="${artifacts.dir}"/>
<fileset dir="${keys.dir}">
<include name="KEYS"/>
</fileset>
</scp>
</sequential>
</macrodef>
</project>

View File

@ -55,7 +55,9 @@
</path>
<target name="build-lucene" unless="core.compiled">
<ant dir="${common.dir}" target="compile-test" inheritAll="false"/>
<ant dir="${common.dir}" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<!-- set the property for this ant execution to speed up later tasks depending on this -->
<property name="core.compiled" value="true"/>
</target>

View File

@ -37,7 +37,9 @@
</uptodate>
</target>
<target name="jar-lucene" depends="build-lucene" unless="lucene.jar.uptodate">
<ant dir="${common.dir}" target="jar-core" inheritAll="false"/>
<ant dir="${common.dir}" target="jar-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="init" depends="contrib-build.init,lucene-jar-uptodate,jar-lucene"/>

View File

@ -38,11 +38,15 @@
<target name="build-memory" unless="memory.uptodate">
<echo>Highlighter building dependency contrib/memory</echo>
<ant antfile="../memory/build.xml" target="default" inheritall="false" dir="../memory" />
<ant antfile="../memory/build.xml" target="default" inheritall="false" dir="../memory">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="build-queries" unless="queries.uptodate">
<echo>Highlighter building dependency contrib/queries</echo>
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries" />
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
</project>

View File

@ -36,7 +36,10 @@
<target name="build-queries" unless="queries.uptodate">
<echo>Misc building dependency ${queries.jar}</echo>
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries" />
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queries.uptodate" value="true"/>
</target>
</project>

View File

@ -47,7 +47,10 @@
<target name="build-queries" unless="queries.uptodate">
<echo>XML Parser building dependency ${queries.jar}</echo>
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries" />
<ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="queries.uptodate" value="true"/>
</target>
<!-- override contrib-build.xml target to also build web demo -->

View File

@ -60,7 +60,9 @@
<target name="build-analyzers-common" unless="analyzers-common.uptodate">
<echo>ICU building dependency ${analyzers-common.jar}</echo>
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common" />
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<property name="gennorm2.src.dir" value="src/data/utr30"/>

View File

@ -59,6 +59,8 @@
<target name="build-analyzers-common" unless="analyzers-common.uptodate">
<echo>phonetic building dependency ${analyzers-common.jar}</echo>
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common" />
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
</project>

View File

@ -49,6 +49,8 @@
<target name="build-analyzers-common" unless="analyzers-common.uptodate">
<echo>Smartcn building dependency ${analyzers-common.jar}</echo>
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common" />
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
</project>

View File

@ -48,6 +48,9 @@
<target name="build-analyzers-common" unless="analyzers-common.uptodate">
<echo>Stempel building dependency ${analyzers-common.jar}</echo>
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common" />
<ant antfile="../common/build.xml" target="default" inheritall="false" dir="../common">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="analyzers-common.uptodate" value="true"/>
</target>
</project>

View File

@ -264,6 +264,28 @@ Other Changes
* SOLR-1825: SolrQuery.addFacetQuery now enables facets automatically, like
addFacetField (Chris Male)
* SOLR-2452: Rewrote the Solr build system:
- Integrated more fully with the Lucene build system: generalized the
Lucene build system and eliminated duplication.
- Converted all Solr contribs to the Lucene/Solr conventional src/ layout:
java/, resources/, test/, and test-files/.
- Created a new Solr-internal module named "core" by moving the java/,
test/, and test-files/ directories from solr/src/ to solr/core/src/.
- Merged solr/src/webapp/src/ into solr/core/src/java/.
- Eliminated solr/src/ by moving all its directories up one level;
renamed solr/src/site/ to solr/site-src/ because solr/site/ already
exists.
- Merged solr/src/common/ into solr/solrj/src/java/.
- Moved o.a.s.client.solrj.* and o.a.s.common.* tests from
solr/src/test/ to solr/solrj/src/test/.
- Made the solrj tests not depend on the solr core tests by moving
some classes from solr/src/test/ to solr/test-framework/src/java/.
- Each internal module (core/, solrj/, test-framework/, and webapp/)
now has its own build.xml, from which it is possible to run
module-specific targets. solr/build.xml delegates all build
tasks (via <ant dir="internal-module-dir"> calls) to these
modules' build.xml files.
Documentation
----------------------

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
limitations under the License.
-->
<project name="common-solr" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<project name="common-solr" default="default">
<description>
This file is designed for importing into a main build file, and not intended
for standalone use.
@ -23,592 +23,167 @@
<dirname file="${ant.file.common-solr}" property="common-solr.dir"/>
<!-- change this together with the default and test's solrconfig.xml after starting a new development branch: -->
<property name="tests.luceneMatchVersion" value="4.0"/>
<!-- Initialize property values: allow easy customization via build.properties -->
<property file="build.properties" />
<property name="Name" value="Solr" />
<property name="version" value="4.0-SNAPSHOT"/>
<property name="fullname" value="apache-${ant.project.name}"/>
<property name="fullnamever" value="${fullname}-${version}"/>
<property name="final.name" value="${fullnamever}"/>
<property name="name" value="${ant.project.name}"/>
<!-- solr uses 1.6 -->
<property name="javac.source" value="1.6"/>
<property name="javac.target" value="1.6"/>
<property name="dev-tools.dir" value="${solr-path}/../dev-tools"/>
<property name="prettify.dir" value="${solr-path}/../lucene/src/tools/prettify"/>
<property name="package.dir" location="package"/>
<tstamp>
<format property="year" pattern="yyyy"/>
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
<format property="TSTAMP" pattern="HH:mm:ss"/>
<!-- datetime format that is safe to treat as part of a dotted version -->
<format property="dateversion" pattern="yyyy.MM.dd.HH.mm.ss" />
</tstamp>
<property name="junit.details" value="1"/>
<!-- default arguments to pass to jvm executing tests -->
<property name="args" value="" />
<!-- TODO: measure toning this down by default to 1 -->
<property name="tests.threadspercpu" value="2"/>
<condition property="tests.sequential">
<or>
<isset property="testcase"/>
<equals arg1="${tests.threadspercpu}" arg2="0"/>
</or>
</condition>
<property name="tests.multiplier" value="1" />
<property name="tests.codecprovider" value="random" />
<property name="tests.codec" value="randomPerField" />
<property name="tests.locale" value="random" />
<property name="tests.timezone" value="random" />
<property name="tests.iter" value="1" />
<property name="tests.seed" value="random" />
<property name="tests.nightly" value="false" />
<property name="tests.verbose" value="false" />
<property name="tests.directory" value="random" />
<condition property="dir.prop" value="-Dsolr.directoryFactory=solr.StandardDirectoryFactory">
<isset property="use.fsdir"/>
</condition>
<!-- Example directory -->
<property name="dest" value="${common-solr.dir}/build" />
<property name="build.dir" location="${dest}/${ant.project.name}"/>
<property name="dist" location="${common-solr.dir}/dist"/>
<property name="package.dir" location="${common-solr.dir}/package"/>
<property name="maven.dist.dir" location="${package.dir}/maven"/>
<property name="lucene-libs" location="${dest}/lucene-libs" />
<property name="manifest.file" location="${dest}/META-INF/MANIFEST.MF"/>
<property name="tests.userdir" value="src/test-files"/>
<property name="example" value="${common-solr.dir}/example" />
<!--
we attempt to exec svnversion to get details build information
for jar manifests. this property can be set at runtime to an
explicit path as needed, or ant will just try to find it in the
default PATH. (this is useful for Hudson)
-->
<property name="svnversion.exe" value="svnversion" />
<property name="svn.exe" value="svn" />
<property name="javadoc.dir" location="${build.dir}/docs/api"/>
<property name="javadoc.link" value="http://java.sun.com/javase/6/docs/api/"/>
<property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
<property name="tests.threadspercpu" value="2"/>
<property name="tests.cleanthreads.sysprop" value="perClass"/>
<!-- Java Version we are compatible with -->
<property name="java.compat.version" value="1.6" />
<path id="additional.dependencies">
<fileset dir="${common-solr.dir}/lib" includes="**/*.jar"/>
<fileset dir="${common-solr.dir}/example/lib" includes="**/*.jar"/>
<fileset dir="lib" includes="**/*.jar" erroronmissingdir="false"/>
</path>
<!-- clover wants to run with -lib, otherwise we prefer a repeatable
classpath -->
<property name="javac.includeAntRuntime" value="${run.clover}"/>
<pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>
<!-- Solr Implementation Version -->
<!--
This can be any string value that does not include spaces
This will be used when creating build artifact file names.
<import file="${common-solr.dir}/../lucene/contrib/contrib-build.xml"/>
By default, this should be set to "X.Y.N-SNAPSHOT" where X.Y.N is
"1 greater" then the last version released (on this branch).
-->
<property name="version" value="4.0-SNAPSHOT" />
<!-- Solr Specification Version
<!-- Solr Specification Version -->
<!--
This will be used in the Manifest file, and therefore must
match the pattern "digit+{.digit+}*"
By default, this should be set to "X.Y.M.${dateversion}"
where X.Y.M is the last version released (on this branch).
-->
<property name="specversion" value="4.0.0.${dateversion}" />
<property name="solr.spec.version" value="4.0.0.${dateversion}" />
<!-- solr depends on the following modules/contribs -->
<module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"
property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/>
<module-uptodate name="analysis/phonetic" jarfile="${common.dir}/../modules/analysis/build/phonetic/lucene-analyzers-phonetic-${version}.jar"
property="analyzers-phonetic.uptodate" classpath.property="analyzers-phonetic.jar"/>
<module-uptodate name="suggest" jarfile="${common.dir}/../modules/suggest/build/lucene-suggest-${version}.jar"
property="suggest.uptodate" classpath.property="suggest.jar"/>
<module-uptodate name="grouping" jarfile="${common.dir}/../modules/grouping/build/lucene-grouping-${version}.jar"
property="grouping.uptodate" classpath.property="grouping.jar"/>
<module-uptodate name="queries" jarfile="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"
property="queries.uptodate" classpath.property="queries.jar"/>
<contrib-uptodate name="highlighter" property="highlighter.uptodate" classpath.property="highlighter.jar"/>
<contrib-uptodate name="memory" property="memory.uptodate" classpath.property="memory.jar"/>
<contrib-uptodate name="misc" property="misc.uptodate" classpath.property="misc.jar"/>
<contrib-uptodate name="queries-contrib" contrib-src-name="queries" property="queries-contrib.uptodate" classpath.property="queries-contrib.jar"/>
<contrib-uptodate name="spatial" property="spatial.uptodate" classpath.property="spatial.jar"/>
<!-- Type of checksum to compute for distribution files -->
<property name="checksum.algorithm" value="md5" />
<target name="compile-analyzers-common" unless="analyzers-common.uptodate">
<ant dir="${common.dir}/../modules/analysis/common" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-analyzers-phonetic" unless="analyzers-phonetic.uptodate">
<ant dir="${common.dir}/../modules/analysis/phonetic" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-suggest" unless="suggest.uptodate">
<ant dir="${common.dir}/../modules/suggest" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-grouping" unless="grouping.uptodate">
<ant dir="${common.dir}/../modules/grouping" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-queries" unless="queries.uptodate">
<ant dir="${common.dir}/../modules/queries" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-highlighter" unless="highlighter.uptodate">
<ant dir="${common.dir}/contrib/highlighter" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-memory" unless="memory.uptodate">
<ant dir="${common.dir}/contrib/memory" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-misc" unless="misc.uptodate">
<ant dir="${common.dir}/contrib/misc" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-queries-contrib" unless="queries-contrib.uptodate">
<ant dir="${common.dir}/contrib/queries" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-spatial" unless="spatial.uptodate">
<ant dir="${common.dir}/contrib/spatial" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- xml-query-parser contrib is required by the "luke" target -->
<target name="compile-xml-query-parser" unless="xml-query-parser.uptodate">
<ant dir="${common.dir}/contrib/xml-query-parser" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<property name="fullname" value="apache-${ant.project.name}"/>
<property name="fullnamever" value="apache-${ant.project.name}-${version}"/>
<!-- Destination for compiled classes and binaries -->
<property name="dest" value="build" />
<!-- Destination for Lucene jars -->
<property name="lucene-libs" location="lucene-libs" />
<!-- Javadoc properties -->
<property name="javadoc.years" value="2006 - ${year}" />
<property name="javadoc.access" value="protected"/>
<property name="javadoc.link.java"
value="http://download.oracle.com/javase/6/docs/api/"/>
<property name="javadoc.link.junit"
value="http://junit.sourceforge.net/javadoc/"/>
<property name="javadoc.link.lucene"
value="https://builds.apache.org/job/Lucene-trunk/javadoc/all/"/>
<property name="javadoc.packages" value="org.apache.solr.*"/>
<property name="build.docs" value="${dest}/docs"/>
<property name="build.javadoc" value="${common-solr.dir}/${build.docs}/api"/>
<property name="build.javadoc.solrj" value="${build.docs}/api-solrj"/>
<!-- JUnit properties -->
<property name="testmethod" value=""/>
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
<property name="junit.output.dir" location="${common-solr.dir}/${dest}/test-results"/>
<property name="junit.reports" location="${common-solr.dir}/${dest}/test-results/reports"/>
<property name="junit.formatter" value="plain"/>
<condition property="junit.details.formatter"
value="org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"
else="org.apache.lucene.util.LuceneJUnitResultFormatter">
<isset property="tests.sequential"/>
</condition>
<property name="junit.parallel.selector" value="org.apache.lucene.util.LuceneJUnitDividingSelector"/>
<!-- Maven properties -->
<property name="maven.build.dir" value="${basedir}/build/maven"/>
<property name="maven.dist.dir" value="${package.dir}/maven"/>
<property name="maven.dist.prefix" value="${maven.dist.dir}/org/apache/solr"/>
<!-- By default, "deploy" to a temporary directory (as well as installing
into your local repository). If you wish to deploy to a remote
repository, set this property to the URL of that repository. In
addition, if the repository requires authentication, you can set
properties "m2.repository.username" and either
"m2.repository.private.key" or "m2.repository.password" to define
your credentials.
-->
<property name="m2.repository.url" value="file://${maven.dist.dir}"/>
<property name="m2.repository.private.key" value="${user.home}/.ssh/id_dsa"/>
<path id="maven-ant-tasks.classpath">
<fileset dir="${common-solr.dir}/../lucene/lib">
<include name="maven-ant-tasks-*.jar"/>
</fileset>
<path id="solr.base.classpath">
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${analyzers-phonetic.jar}"/>
<pathelement path="${highlighter.jar}"/>
<pathelement path="${memory.jar}"/>
<pathelement path="${misc.jar}"/>
<pathelement path="${queries-contrib.jar}"/>
<pathelement path="${spatial.jar}"/>
<pathelement path="${suggest.jar}"/>
<pathelement path="${grouping.jar}"/>
<pathelement path="${queries.jar}"/>
<pathelement location="${common-solr.dir}/build/solr-solrj/classes/java"/>
<pathelement location="${common-solr.dir}/build/solr-core/classes/java"/>
<path refid="base.classpath"/>
</path>
<!-- End Maven Properties -->
<path id="classpath" refid="solr.base.classpath"/>
<available property="clover.present"
classname="com.cenqua.clover.tasks.CloverReportTask"
/>
<condition property="clover.enabled">
<and>
<isset property="run.clover"/>
<isset property="clover.present"/>
</and>
</condition>
<!-- Lucene -->
<path id="lucene.classpath">
<pathelement location="${common-solr.dir}/../lucene/build/classes/java" />
<pathelement location="${common-solr.dir}/../modules/analysis/build/common/classes/java" />
<pathelement location="${common-solr.dir}/../modules/analysis/build/phonetic/classes/java" />
<pathelement location="${common-solr.dir}/../modules/suggest/build/classes/java" />
<pathelement location="${common-solr.dir}/../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="${common-solr.dir}/../lucene/build/contrib/memory/classes/java" />
<pathelement location="${common-solr.dir}/../lucene/build/contrib/misc/classes/java" />
<pathelement location="${common-solr.dir}/../lucene/build/contrib/queries-contrib/classes/java" />
<pathelement location="${common-solr.dir}/../lucene/build/contrib/spatial/classes/java" />
<pathelement location="${common-solr.dir}/../modules/grouping/build/classes/java" />
<pathelement location="${common-solr.dir}/../modules/queries/build/classes/java" />
<path id="solr.test.base.classpath">
<pathelement path="${common-solr.dir}/build/solr-test-framework/classes/java"/>
<pathelement path="${common-solr.dir}/build/solr-core/classes/test"/>
<pathelement path="${tests.userdir}"/>
<path refid="test.base.classpath"/>
</path>
<target name="prep-lucene-jars">
<sequential>
<subant target="jar-core" inheritall="false" failonerror="true">
<fileset dir="../lucene/" includes="build.xml" />
</subant>
<subant target="jar" inheritall="false" failonerror="true">
<fileset dir="../modules/analysis/common" includes="build.xml" />
<fileset dir="../modules/analysis/phonetic" includes="build.xml" />
<fileset dir="../modules/suggest" includes="build.xml" />
<fileset dir="../lucene/contrib/highlighter" includes="build.xml" />
<fileset dir="../lucene/contrib/memory" includes="build.xml" />
<fileset dir="../lucene/contrib/misc" includes="build.xml" />
<fileset dir="../lucene/contrib/queries" includes="build.xml" />
<fileset dir="../lucene/contrib/spatial" includes="build.xml" />
<fileset dir="../modules/grouping" includes="build.xml" />
<fileset dir="../modules/queries" includes="build.xml" />
</subant>
</sequential>
</target>
<path id="test.classpath" refid="solr.test.base.classpath"/>
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
<mkdir dir="${lucene-libs}"/>
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset dir="../lucene/build/">
<include name="lucene-core-${version}.jar" />
</fileset>
<fileset dir="../modules/analysis/build/common">
<include name="lucene-analyzers-common-${version}.jar" />
</fileset>
<fileset dir="../modules/analysis/build/phonetic">
<include name="lucene-analyzers-phonetic-${version}.jar" />
</fileset>
<fileset dir="../modules/suggest/build">
<include name="lucene-suggest-${version}.jar" />
</fileset>
<fileset dir="../lucene/build/contrib/highlighter">
<include name="lucene-highlighter-${version}.jar" />
</fileset>
<fileset dir="../lucene/build/contrib/memory">
<include name="lucene-memory-${version}.jar" />
</fileset>
<fileset dir="../lucene/build/contrib/misc">
<include name="lucene-misc-${version}.jar" />
</fileset>
<fileset dir="../lucene/build/contrib/queries-contrib">
<include name="lucene-queries-contrib-${version}.jar" />
</fileset>
<fileset dir="../lucene/build/contrib/spatial">
<include name="lucene-spatial-${version}.jar" />
</fileset>
<fileset dir="../modules/grouping/build">
<include name="lucene-grouping-${version}.jar" />
</fileset>
<fileset dir="../modules/queries/build">
<include name="lucene-queries-${version}.jar" />
</fileset>
</copy>
</target>
<target name="compile-lucene" unless="lucene-compiled">
<property name="lucene-compiled" value="true"/>
<subant target="default">
<fileset dir="../modules/analysis/common" includes="build.xml"/>
<fileset dir="../modules/analysis/phonetic" includes="build.xml"/>
<fileset dir="../modules/suggest" includes="build.xml"/>
<fileset dir="../lucene/contrib/highlighter" includes="build.xml"/>
<fileset dir="../lucene/contrib/memory" includes="build.xml"/>
<fileset dir="../lucene/contrib/misc" includes="build.xml"/>
<fileset dir="../lucene/contrib/queries" includes="build.xml"/>
<fileset dir="../lucene/contrib/spatial" includes="build.xml"/>
<fileset dir="../modules/grouping" includes="build.xml"/>
<fileset dir="../modules/queries" includes="build.xml"/>
</subant>
</target>
<!-- Macro for compilation -->
<macrodef name="solr-javac">
<attribute name="destdir" />
<attribute name="classpathref" />
<element name="nested" optional="true" implicit="true" />
<sequential>
<mkdir dir="@{destdir}" />
<javac destdir="@{destdir}"
target="${java.compat.version}"
source="${java.compat.version}"
debug="on"
encoding="utf8"
includeAntRuntime="${javac.includeAntRuntime}"
sourcepath=""
classpathref="@{classpathref}">
<compilerarg line="-Xlint -Xlint:-deprecation -Xlint:-serial"/>
<nested />
</javac>
<macrodef name="solr-contrib-uptodate">
<attribute name="name"/>
<attribute name="property" default="@{name}.uptodate"/>
<attribute name="classpath.property" default="@{name}.jar"/>
<!-- set jarfile only, if the target jar file has no generic name -->
<attribute name="jarfile" default="${common-solr.dir}/build/contrib/@{name}/@{name}-${version}.jar"/>
<sequential>
<!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->
<property name="@{classpath.property}" location="@{jarfile}"/>
<uptodate property="@{property}" targetfile="@{jarfile}">
<srcfiles dir="${common-solr.dir}/contrib/@{name}/src/java" includes="**/*.java"/>
</uptodate>
</sequential>
</macrodef>
<!-- Macro for building Jars -->
<macrodef name="solr-jar">
<attribute name="destfile" />
<attribute name="basedir" default="." />
<attribute name="includes" default="org/apache/**" />
<attribute name="excludes" default="" />
<attribute name="manifest" default="${common-solr.dir}/${dest}/META-INF/MANIFEST.MF" />
<element name="nested" optional="true" implicit="true" />
<sequential>
<jar destfile="@{destfile}"
basedir="@{basedir}"
includes="@{includes}"
excludes="@{excludes}"
filesetmanifest="skip"
manifest="@{manifest}">
<metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/>
<nested />
</jar>
</sequential>
</macrodef>
<!-- Macro for building checksum files
This is only needed until the "format" option is supported
by ant's built in checksum task
-->
<macrodef name="solr-checksum">
<attribute name="file"/>
<sequential>
<echo>Building checksums for '@{file}'</echo>
<checksum file="@{file}" algorithm="md5" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
<checksum file="@{file}" algorithm="sha1" format="MD5SUM" forceoverwrite="yes" readbuffersize="65536"/>
</sequential>
</macrodef>
<macrodef name="contrib-crawl">
<attribute name="target" default=""/>
<attribute name="failonerror" default="true"/>
<sequential>
<subant target="@{target}" failonerror="@{failonerror}">
<property name="lucene-compiled" value="${lucene-compiled}"/>
<fileset dir="."
includes="contrib/*/build.xml"
/>
</subant>
</sequential>
</macrodef>
<property name="failonjavadocwarning" value="true"/>
<macrodef name="invoke-javadoc">
<element name="sources" optional="yes"/>
<attribute name="destdir"/>
<attribute name="title" default="${Name} ${version} API (${specversion})"/>
<sequential>
<mkdir dir="@{destdir}"/>
<copy todir="@{destdir}/prettify" overwrite="false">
<fileset dir="${prettify.dir}"/>
</copy>
<record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
<javadoc
packagenames="org.apache.solr.*"
failonerror="true"
destdir="@{destdir}"
access="${javadoc.access}"
encoding="utf-8"
author="true"
version="true"
use="true"
source="${ant.java.version}"
link="${javadoc.link.java}"
windowtitle="${Name} ${version} API"
doctitle="@{title}"
stylesheetfile="@{destdir}/prettify/stylesheet+prettify.css"
bottom="Copyright &amp;copy; ${year} Apache Software Foundation. All Rights Reserved.">
<tag name="todo" description="To Do:"/>
<tag name="uml.property" description="UML Property:"/>
<tag name="lucene.experimental"
description="WARNING: This API is experimental and might change in incompatible ways in the next release."/>
<tag name="lucene.internal"
description="NOTE: This API is for Lucene internal purposes only and might change in incompatible ways in the next release."/>
<link offline="true" packagelistLoc="${build.javadoc}"/>
<link href="${javadoc.link.java}"/>
<link href="${javadoc.link.junit}"/>
<link href="${javadoc.link.lucene}"/>
<header><![CDATA[
<script src="{@docRoot}/prettify/prettify.js" type="text/javascript"></script>
<script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>
]]></header>
<sources />
<classpath refid="javadoc.classpath"/>
</javadoc>
<record name="@{destdir}/log_javadoc.txt" action="stop"/>
<delete>
<fileset file="@{destdir}/log_javadoc.txt">
<not>
<containsregexp expression="\[javadoc\]\s*[1-9][0-9]*[\s]*warning"/>
</not>
</fileset>
</delete>
<fail message="Javadocs warnings were found!" >
<condition>
<and>
<available file="@{destdir}/log_javadoc.txt"/>
<istrue value="${failonjavadocwarning}"/>
</and>
</condition>
</fail>
</sequential>
</macrodef>
<!-- NOTE, the pom.xml MUST be a relative path. An absolute path may break the build on windows -->
<macrodef name="m2-deploy" description="Builds a Maven artifact">
<element name="artifact-attachments" optional="yes"/>
<attribute name="pom.xml" default="pom.xml"/>
<attribute name="jar.file" default="${jar.file}"/>
<sequential>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
<artifact:pom id="maven.project" file="@{pom.xml}"/>
<artifact:deploy file="@{jar.file}">
<artifact-attachments/>
<remoteRepository url="${m2.repository.url}">
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/>
</remoteRepository>
<pom refid="maven.project"/>
</artifact:deploy>
</sequential>
</macrodef>
<macrodef name="m2-deploy-with-pom-template" description="Builds a Maven artifact given a POM template">
<attribute name="pom.xml"/>
<attribute name="jar.file"/>
<sequential>
<copy file="@{pom.xml}" tofile="${maven.build.dir}/@{pom.xml}">
<filterset begintoken="@" endtoken="@">
<filter token="version" value="${version}"/>
</filterset>
</copy>
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/>
<artifact:pom id="maven.project" file="${maven.build.dir}/@{pom.xml}" />
<artifact:deploy file="@{jar.file}">
<remoteRepository url="${m2.repository.url}">
<authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/>
</remoteRepository>
<pom refid="maven.project"/>
</artifact:deploy>
</sequential>
</macrodef>
<property name="gpg.exe" value="gpg" />
<property name="gpg.key" value="CODE SIGNING KEY" />
<macrodef name="sign-artifact" description="Signs the artifact">
<attribute name="input.file"/>
<attribute name="output.file" default="@{input.file}.asc"/>
<attribute name="gpg.passphrase"/>
<sequential>
<echo >Signing @{input.file} Sig File: @{output.file}</echo>
<exec executable="${gpg.exe}" >
<arg value="--batch"/>
<arg value="--armor"/>
<arg value="--output"/>
<arg value="@{output.file}"/>
<arg value="--default-key"/>
<arg value="${gpg.key}"/>
<arg value="--passphrase"/>
<arg value="@{gpg.passphrase}"/>
<arg value="--detach-sig"/>
<arg value="@{input.file}"/>
</exec>
</sequential>
</macrodef>
<!--
We need to sign:
The POM
The library jar
The sources jar
the javadoc jar
-->
<macrodef name="sign-maven-artifacts" description="Signs maven artifacts">
<attribute name="artifact.id"/>
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
<attribute name="gpg.passphrase"/>
<sequential>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.jar" gpg.passphrase="@{gpg.passphrase}"/>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}-javadoc.jar" gpg.passphrase="@{gpg.passphrase}"/>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}-sources.jar" gpg.passphrase="@{gpg.passphrase}"/>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
</sequential>
</macrodef>
<macrodef name="sign-maven-war-artifacts" description="Signs maven artifacts">
<attribute name="artifact.id"/>
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
<attribute name="gpg.passphrase"/>
<sequential>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.war" gpg.passphrase="@{gpg.passphrase}"/>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
</sequential>
</macrodef>
<macrodef name="sign-maven-dependency-artifacts" description="Signs a maven artifact and its POM">
<attribute name="artifact.id"/>
<attribute name="prefix.dir" default="${maven.dist.prefix}"/>
<attribute name="gpg.passphrase"/>
<sequential>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.jar" gpg.passphrase="@{gpg.passphrase}"/>
<sign-artifact input.file="@{prefix.dir}/@{artifact.id}/${version}/@{artifact.id}-${version}.pom" gpg.passphrase="@{gpg.passphrase}"/>
</sequential>
</macrodef>
<!-- setup proxy for download tasks -->
<condition property="proxy.specified">
<or>
<isset property="proxy.host"/>
<isset property="proxy.port"/>
<isset property="proxy.user"/>
</or>
</condition>
<target name="proxy.setup" if="proxy.specified">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
</target>
<target name="clean-contrib"
description="Cleans all contrib modules and their tests">
<contrib-crawl target="clean"/>
</target>
<target name="build-contrib"
description="Builds all contrib modules and their tests">
<contrib-crawl target="build"/>
</target>
<target name="test-contrib" depends="build-contrib">
<contrib-crawl target="test" failonerror="true"/>
</target>
<target name="compile-test-contrib" depends="build-contrib">
<contrib-crawl target="compileTests" failonerror="true"/>
</target>
<target name="dist-contrib" description="Make the contribs ready for distribution">
<contrib-crawl target="dist" failonerror="true" />
</target>
<target name="example-contrib" description="Tell the contrib to add their stuff to examples">
<contrib-crawl target="example" failonerror="true" />
</target>
<!-- Creates a Manifest file for Jars and WARs -->
<target name="make-manifest">
<!-- If possible, include the svnversion -->
<exec dir="." executable="${svnversion.exe}" outputproperty="svnversion" failifexecutionfails="false">
<arg line="."/>
</exec>
<!-- no description, don't advertise -->
<mkdir dir="${dest}/META-INF/" />
<manifest mode="replace" file="${dest}/META-INF/MANIFEST.MF">
<!--
http://java.sun.com/j2se/1.6.0/docs/guide/jar/jar.html#JAR%20Manifest
http://java.sun.com/j2se/1.6.0/docs/guide/versioning/spec/versioning2.html
http://java.sun.com/j2se/1.6.0/docs/api/java/lang/Package.html
http://java.sun.com/j2se/1.6.0/docs/api/java/util/jar/package-summary.html
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
-->
<!-- Don't set 'Manifest-Version' it identifies the version of the
manifest file format, and should always be 1.0 (the default)
Don't set 'Created-by' attribute, its purpose is
to identify the version of java used to build the jar,
which ant will do by default.
Ant will happily override these with bogus strings if you
tell it to, so don't.
NOTE: we don't use section info because all of our manifest data
applies to the entire jar/war ... no package specific info.
-->
<attribute name="Extension-Name"
value="org.apache.solr"/>
<attribute name="Specification-Title"
value="Apache Solr Search Server"/>
<!-- spec version must match "digit+{.digit+}*" -->
<attribute name="Specification-Version"
value="${specversion}"/>
<attribute name="Specification-Vendor"
value="The Apache Software Foundation"/>
<attribute name="Implementation-Title"
value="org.apache.solr"/>
<!-- impl version can be any string -->
<attribute name="Implementation-Version"
value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
<attribute name="Implementation-Vendor"
value="The Apache Software Foundation"/>
<attribute name="X-Compile-Source-JDK"
value="${java.compat.version}"/>
<attribute name="X-Compile-Target-JDK"
value="${java.compat.version}"/>
</manifest>
</target>
<!-- Validation -->
<target name="validate" depends="validate-solr"/>
<target name="validate-solr" depends="check-legal-solr" unless="validated-solr"/>
@ -622,38 +197,163 @@
-->
<!-- Solr -->
<arg value="-c" />
<arg value="${basedir}/lib" />
<arg value="${common-solr.dir}/lib" />
<arg value="-c" />
<arg value="${basedir}/contrib/analysis-extras/lib" />
<arg value="${common-solr.dir}/contrib/analysis-extras/lib" />
<arg value="-c" />
<arg value="${basedir}/contrib/clustering/lib" />
<arg value="${common-solr.dir}/contrib/clustering/lib" />
<arg value="-c" />
<arg value="${basedir}/contrib/dataimporthandler/lib" />
<arg value="${common-solr.dir}/contrib/dataimporthandler/lib" />
<arg value="-c" />
<arg value="${basedir}/contrib/extraction/lib" />
<arg value="${common-solr.dir}/contrib/dataimporthandler-extras/lib" />
<arg value="-c" />
<arg value="${basedir}/contrib/uima/lib" />
<arg value="${common-solr.dir}/contrib/extraction/lib" />
<arg value="-c" />
<arg value="${basedir}/example/example-DIH/solr/db/lib" />
<arg value="${common-solr.dir}/contrib/uima/lib" />
<arg value="-c" />
<arg value="${basedir}/example/example-DIH/solr/mail/lib" />
<arg value="${common-solr.dir}/example/example-DIH/solr/db/lib" />
<arg value="-c" />
<arg value="${basedir}/example/example/lib" />
<arg value="${common-solr.dir}/example/example-DIH/solr/mail/lib" />
<arg value="-c" />
<arg value="${basedir}/src/test-files/solr/lib" />
<arg value="${common-solr.dir}/example/example/lib" />
<arg value="-c" />
<arg value="${common-solr.dir}/core/src/test-files/solr/lib" />
</java>
<property name="validated-solr" value="true"/>
</target>
<path id="tools.runtime.classpath">
<pathelement location="${common-solr.dir}/../lucene/build/classes/tools"/>
<pathelement location="${common.dir}/build/classes/tools"/>
</path>
<target name="compile-tools" description="Compile the Test Framework and Validation tools">
<sequential>
<subant target="compile-tools" inheritall="false" failonerror="true">
<fileset dir="${common-solr.dir}/../lucene" includes="build.xml" />
</subant>
</sequential>
<target name="init-dist" >
<mkdir dir="${build.dir}"/>
<mkdir dir="${package.dir}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${maven.dist.dir}"/>
</target>
<target name="prep-lucene-jars"
depends="compile-analyzers-common, compile-analyzers-phonetic, compile-suggest,
compile-highlighter, compile-memory, compile-misc, compile-queries-contrib,
compile-spatial, compile-grouping, compile-queries">
<ant dir="${common.dir}" target="default" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset file="${common.dir}/build/lucene-core-${version}.jar" />
<fileset file="${analyzers-common.jar}" />
<fileset file="${analyzers-phonetic.jar}" />
<fileset file="${suggest.jar}" />
<fileset file="${grouping.jar}" />
<fileset file="${common-module.jar}" />
<fileset file="${queries.jar}" />
<fileset file="${highlighter.jar}" />
<fileset file="${memory.jar}" />
<fileset file="${misc.jar}" />
<fileset file="${queries-contrib.jar}" />
<fileset file="${spatial.jar}" />
</copy>
</target>
<!-- Shared core/solrj/test-framework/contrib targets -->
<target name="jar-core" depends="compile-core">
<mkdir dir="${dest}/META-INF/"/>
<jarify title="Apache Solr Search Server: ${ant.project.name}"
metainf.source.dir="${common-solr.dir}"
implementation.title="org.apache.solr"
spec.version="${solr.spec.version}"/>
</target>
<target name="dist" depends="jar-core">
<copy file="${build.dir}/${fullnamever}.jar" todir="${dist}"/>
</target>
<target name="javadocs" depends="compile-core">
<sequential>
<mkdir dir="${javadoc.dir}"/>
<invoke-javadoc destdir="${javadoc.dir}"
title="${Name} ${version} ${name} API">
<sources>
<link href=""/>
<packageset dir="${src.dir}"/>
</sources>
</invoke-javadoc>
<jarify basedir="${javadoc.dir}"
destfile="${build.dir}/${final.name}-javadoc.jar"
title="Apache Solr Search Server: ${ant.project.name}"
metainf.source.dir="${common-solr.dir}"
implementation.title="org.apache.solr"
spec.version="${solr.spec.version}"/>
</sequential>
</target>
<target name="jar-src" depends="init">
<jarify basedir="${src.dir}"
destfile="${build.dir}/${final.name}-src.jar"
implementation.title="org.apache.solr"
metainf.source.dir="${common-solr.dir}"
spec.version="${solr.spec.version}"/>
</target>
<!-- Solr core targets -->
<target name="compile-solr-core" description="Compile Solr core." unless="solr.core.compiled">
<ant dir="${common-solr.dir}/core" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
</target>
<target name="compile-test-solr-core" description="Compile solr core tests">
<ant dir="${common-solr.dir}/core" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
</target>
<target name="dist-core" depends="init-dist"
description="Creates the Solr JAR Distribution file.">
<ant dir="${common-solr.dir}/core" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solrj targets -->
<target name="compile-solrj" description="Compile the java client." unless="solrj.compiled">
<ant dir="${common-solr.dir}/solrj" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solrj.compiled" value="true"/>
</target>
<target name="compile-test-solrj" description="Compile java client tests">
<ant dir="${common-solr.dir}/solrj" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solrj.compiled" value="true"/>
</target>
<target name="dist-solrj" depends="init-dist"
description="Creates the Solr-J JAR Distribution file.">
<ant dir="${common-solr.dir}/solrj" target="dist" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!-- Solr test-framework targets -->
<target name="compile-solr-test-framework" description="Compile the Solr test-framework" unless="solr.test.framework.compiled">
<ant dir="${common-solr.dir}/test-framework" target="compile-core" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.test.framework.compiled" value="true"/>
</target>
<!-- Solr contrib targets -->
<target name="build-contrib" depends="compile-test"
description="Builds all contrib modules and their tests">
<contrib-crawl target="build-artifacts-and-tests"/>
</target>
<target name="contribs-add-to-war">
<mkdir dir="${dest}/web"/>
<delete dir="${dest}/web" includes="**/*" failonerror="false"/>
<contrib-crawl target="add-to-war"/>
</target>
</project>

View File

@ -17,213 +17,55 @@
limitations under the License.
-->
<project name="solr-analysis-extras" default="build">
<property name="solr-path" value="../.."/>
<import file="../../common-build.xml"/>
<project name="solr-analysis-extras" default="default">
<description>
Additional analysis components
</description>
<property name="example.local" value="example"/>
<import file="../contrib-build.xml"/>
<!-- support for the additional analyzers modules -->
<path id="modules.classpath">
<pathelement location="${common-solr.dir}/../modules/analysis/build/icu/classes/java" />
<pathelement location="${common-solr.dir}/../modules/analysis/build/smartcn/classes/java" />
<pathelement location="${common-solr.dir}/../modules/analysis/build/stempel/classes/java" />
<module-uptodate name="analysis/icu" jarfile="${common.dir}/../modules/analysis/build/icu/lucene-analyzers-icu-${version}.jar"
property="analyzers-icu.uptodate" classpath.property="analyzers-icu.jar"/>
<module-uptodate name="analysis/smartcn" jarfile="${common.dir}/../modules/analysis/build/smartcn/lucene-analyzers-smartcn-${version}.jar"
property="analyzers-smartcn.uptodate" classpath.property="analyzers-smartcn.jar"/>
<module-uptodate name="analysis/stempel" jarfile="${common.dir}/../modules/analysis/build/stempel/lucene-analyzers-stempel-${version}.jar"
property="analyzers-stempel.uptodate" classpath.property="analyzers-stempel.jar"/>
<path id="classpath">
<pathelement path="${analyzers-icu.jar}"/>
<pathelement path="${analyzers-smartcn.jar}"/>
<pathelement path="${analyzers-stempel.jar}"/>
<path refid="solr.base.classpath"/>
</path>
<target name="prep-module-jars">
<subant target="jar" inheritall="false" failonerror="true">
<fileset dir="${common-solr.dir}/../modules/analysis/icu" includes="build.xml" />
<fileset dir="${common-solr.dir}/../modules/analysis/smartcn" includes="build.xml" />
<fileset dir="${common-solr.dir}/../modules/analysis/stempel" includes="build.xml" />
</subant>
<target name="compile-analyzers-icu" unless="analyzers-icu.uptodate">
<ant dir="${common.dir}/../modules/analysis/icu" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="module-jars-to-solr" depends="prep-module-jars">
<mkdir dir="${lucene-libs}"/>
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset dir="${common-solr.dir}/../modules/analysis/build/icu">
<include name="lucene-analyzers-icu-${version}.jar" />
</fileset>
<fileset dir="${common-solr.dir}/../modules/analysis/build/smartcn">
<include name="lucene-analyzers-smartcn-${version}.jar" />
</fileset>
<fileset dir="${common-solr.dir}/../modules/analysis/build/stempel">
<include name="lucene-analyzers-stempel-${version}.jar" />
</fileset>
<target name="compile-analyzers-smartcn" unless="analyzers-smartcn.uptodate">
<ant dir="${common.dir}/../modules/analysis/smartcn" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="compile-analyzers-stempel" unless="analyzers-stempel.uptodate">
<ant dir="${common.dir}/../modules/analysis/stempel" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="module-jars-to-solr"
depends="compile-analyzers-icu, compile-analyzers-smartcn, compile-analyzers-stempel">
<mkdir dir="${build.dir}/lucene-libs"/>
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
<fileset file="${analyzers-icu.jar}"/>
<fileset file="${analyzers-smartcn.jar}"/>
<fileset file="${analyzers-stempel.jar}"/>
</copy>
</target>
<path id="common.classpath">
<fileset dir="lib"/>
<pathelement location="${solr-path}/build/solr"/>
<pathelement location="${solr-path}/build/solrj"/>
<path refid="lucene.classpath"/>
<path refid="modules.classpath"/>
<fileset dir="${solr-path}/lib" includes="*.jar"/>
</path>
<path id="test.classpath">
<pathelement path="${dest}/classes"/>
<pathelement path="${dest}/test-classes"/>
<pathelement path="${java.class.path}"/>
<pathelement location="${common-solr.dir}/build/test-framework"/> <!-- include solr test code -->
<pathelement location="${common-solr.dir}/../lucene/build/classes/test-framework" /> <!-- include some lucene test code -->
<path refid="common.classpath"/>
</path>
<target name="clean">
<delete failonerror="false" dir="${dest}"/>
<!-- example doesn't create this anymore, but clean it up
if it's still there from an old build
-->
<delete dir="example/lib" />
<delete dir="${lucene-libs}" />
</target>
<target name="init" depends="module-jars-to-solr">
<mkdir dir="${dest}/classes"/>
<mkdir dir="${build.javadoc}"/>
<subant target="compileTestFramework">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
<subant target="make-manifest">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
</target>
<target name="compile" depends="init">
<solr-javac destdir="${dest}/classes"
classpathref="common.classpath">
<src path="src/java"/>
</solr-javac>
</target>
<target name="build" depends="compile">
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
manifest="../../${dest}/META-INF/MANIFEST.MF"/>
</target>
<target name="compileTests" depends="compile">
<solr-javac destdir="${dest}/test-classes"
classpathref="test.classpath">
<src path="src/test"/>
</solr-javac>
<!-- Copy any data files present to the classpath -->
<copy todir="${dest}/test-classes">
<fileset dir="src/test-files" excludes="**/*.java"/>
</copy>
</target>
<target name="example" depends="build,dist">
<!-- this task use to copy lib's but that's no longer needed because
../lib and ../lib/downloads are now included explicitly by
example/conf/solrconfig.xml
-->
</target>
<target name="test" depends="compileTests">
<mkdir dir="${junit.output.dir}"/>
<condition property="runall">
<not>
<or>
<isset property="testcase"/>
<isset property="testpackage"/>
<isset property="testpackageroot"/>
</or>
</not>
</condition>
<junit printsummary="no"
haltonfailure="no"
maxmemory="512M"
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="${junit.output.dir}"
tempdir="${junit.output.dir}"
forkmode="perBatch"
>
<sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
<sysproperty key="tests.codec" value="${tests.codec}"/>
<sysproperty key="tests.locale" value="${tests.locale}"/>
<sysproperty key="tests.timezone" value="${tests.timezone}"/>
<sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
<sysproperty key="tests.seed" value="${tests.seed}"/>
<sysproperty key="tests.verbose" value="${tests.verbose}"/>
<sysproperty key="tests.iter" value="${tests.iter}"/>
<!-- set whether or not nightly tests should run -->
<sysproperty key="tests.nightly" value="${tests.nightly}"/>
<sysproperty key="jetty.testMode" value="1"/>
<sysproperty key="tempDir" file="${junit.output.dir}"/>
<sysproperty key="testmethod" value="${testmethod}"/>
<sysproperty key="tests.directory" value="${tests.directory}"/>
<sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
<jvmarg line="${args}"/>
<formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
<classpath refid="test.classpath"/>
<assertions>
<enable package="org.apache.lucene"/>
<enable package="org.apache.solr"/>
</assertions>
<formatter type="${junit.formatter}"/>
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
<fileset dir="src/test" includes="${junit.includes}" />
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
<fileset dir="src/test" includes="**/${testcase}.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
<fileset dir="src/test" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" />
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
<fileset dir="src/test" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" />
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
<target name="dist" depends="build">
<!--
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"/>
<copy todir="${solr-path}/build/web/WEB-INF/lib" flatten="true">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</copy>
-->
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/dist"/>
</target>
<target name="javadoc">
<sequential>
<mkdir dir="${build.javadoc}/contrib-${name}"/>
<path id="javadoc.classpath">
<path refid="common.classpath"/>
</path>
<invoke-javadoc
destdir="${build.javadoc}/contrib-${name}"
title="${Name} ${version} contrib-${fullnamever} API">
<sources>
<packageset dir="src/java"/>
</sources>
</invoke-javadoc>
</sequential>
</target>
<target name="compile-core" depends="module-jars-to-solr, solr-contrib-build.compile-core"/>
</project>

View File

@ -0,0 +1,5 @@
<html>
<body>
Apache Solr Search Server: Analysis Extras contrib
</body>
</html>

View File

@ -17,187 +17,11 @@
limitations under the License.
-->
<project name="solr-clustering" default="build">
<property name="solr-path" value="../.."/>
<import file="../../common-build.xml"/>
<project name="solr-clustering" default="default">
<description>
Clustering Integraton
</description>
<property name="example.local" value="example"/>
<path id="common.classpath">
<fileset dir="lib" includes="*.jar"/>
<pathelement location="${solr-path}/build/solr"/>
<pathelement location="${solr-path}/build/solrj"/>
<path refid="lucene.classpath"/>
<fileset dir="${solr-path}/lib" includes="*.jar"/>
</path>
<path id="test.classpath">
<pathelement path="${dest}/classes"/>
<pathelement path="${dest}/test-classes"/>
<pathelement path="${java.class.path}"/>
<pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
<pathelement location="${solr-path}/../lucene/build/classes/test-framework" /> <!-- include some lucene test code -->
<path refid="common.classpath"/>
<!-- DistributedClusteringComponentTest uses Jetty -->
<fileset dir="${solr-path}/example/lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete failonerror="false" dir="${dest}"/>
<!-- example doesn't create this anymore, but clean it up
if it's still there from an old build
-->
<delete dir="example/lib" />
</target>
<target name="init">
<mkdir dir="${dest}/classes"/>
<mkdir dir="${build.javadoc}"/>
<subant target="compileTestFramework">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
<subant target="make-manifest">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
</target>
<target name="compile" depends="init">
<solr-javac destdir="${dest}/classes"
classpathref="common.classpath">
<src path="src/main/java"/>
</solr-javac>
</target>
<target name="build" depends="compile">
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
manifest="../../${dest}/META-INF/MANIFEST.MF"/>
</target>
<target name="compileTests" depends="compile">
<solr-javac destdir="${dest}/test-classes"
classpathref="test.classpath">
<src path="src/test/java"/>
</solr-javac>
<!-- Copy any data files present to the classpath -->
<copy todir="${dest}/test-classes">
<fileset dir="src/test/resources" excludes="**/*.java"/>
</copy>
</target>
<target name="example" depends="build,dist">
<!-- this task use to copy lib's but that's no longer needed because
../lib and ../lib/downloads are now included explicitly by
example/conf/solrconfig.xml
-->
</target>
<target name="test" depends="compileTests">
<mkdir dir="${junit.output.dir}"/>
<condition property="runall">
<not>
<or>
<isset property="testcase"/>
<isset property="testpackage"/>
<isset property="testpackageroot"/>
</or>
</not>
</condition>
<junit printsummary="no"
haltonfailure="no"
maxmemory="512M"
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="${junit.output.dir}"
tempdir="${junit.output.dir}"
forkmode="perBatch"
>
<sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
<sysproperty key="tests.codec" value="${tests.codec}"/>
<sysproperty key="tests.locale" value="${tests.locale}"/>
<sysproperty key="tests.timezone" value="${tests.timezone}"/>
<sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
<sysproperty key="tests.seed" value="${tests.seed}"/>
<sysproperty key="tests.verbose" value="${tests.verbose}"/>
<sysproperty key="tests.iter" value="${tests.iter}"/>
<!-- set whether or not nightly tests should run -->
<sysproperty key="tests.nightly" value="${tests.nightly}"/>
<sysproperty key="jetty.testMode" value="1"/>
<sysproperty key="tempDir" file="${junit.output.dir}"/>
<sysproperty key="testmethod" value="${testmethod}"/>
<sysproperty key="tests.directory" value="${tests.directory}"/>
<sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
<jvmarg line="${args}"/>
<formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
<classpath refid="test.classpath"/>
<assertions>
<enable package="org.apache.lucene"/>
<enable package="org.apache.solr"/>
</assertions>
<formatter type="${junit.formatter}"/>
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
<fileset dir="src/test/java" includes="${junit.includes}">
<exclude name="**/AbstractClusteringTest*"/>
</fileset>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
<fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" />
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
<fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" />
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
<target name="dist" depends="build">
<!--
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"/>
<copy todir="${solr-path}/build/web/WEB-INF/lib" flatten="true">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</copy>
-->
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/dist"/>
</target>
<target name="javadoc">
<sequential>
<mkdir dir="${build.javadoc}/contrib-${name}"/>
<path id="javadoc.classpath">
<path refid="common.classpath"/>
</path>
<invoke-javadoc
destdir="${build.javadoc}/contrib-${name}"
title="${Name} ${version} contrib-${fullnamever} API">
<sources>
<packageset dir="src/main/java"/>
</sources>
</invoke-javadoc>
</sequential>
</target>
<import file="../contrib-build.xml"/>
</project>

View File

@ -0,0 +1,5 @@
<html>
<body>
Apache Solr Search Server: Clustering contrib
</body>
</html>

View File

@ -0,0 +1,57 @@
<?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-contrib-build">
<dirname file="${ant.file.solr-contrib-build}" property="solr-contrib.dir"/>
<property name="build.dir" location="${solr-contrib.dir}/../build/contrib/${ant.project.name}"/>
<import file="../common-build.xml"/>
<target name="build-solr" unless="solr.core.compiled">
<ant dir="${common-solr.dir}/core" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
<property name="solr.core.compiled" value="true"/>
</target>
<target name="compile-core" depends="build-solr, common.compile-core"/>
<!-- redefine common-solr.test, and exclude 'validate-solr' dependency, since it should only run at solr/ level -->
<target name="test" depends="compile-test,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>
<dirname file="${ant.file}" property="antfile.dir"/>
<available property="contrib.has.webapp" type="dir" file="${antfile.dir}/src/webapp" />
<target name="add-to-war" if="contrib.has.webapp">
<copy todir="${dest}/web" failonerror="false">
<fileset dir="${antfile.dir}/src/webapp"/>
</copy>
</target>
<available property="contrib.has.lucene-libs" type="dir" file="${build.dir}/lucene-libs"/>
<target name="add-lucene-libs-to-package" if="contrib.has.lucene-libs">
<pathconvert property="contrib.dir">
<path path="${antfile.dir}"/>
<flattenmapper/>
</pathconvert>
<copy todir="${dest}/contrib-lucene-libs-to-package/contrib/${contrib.dir}">
<fileset dir="${build.dir}" includes="lucene-libs/**"/>
</copy>
</target>
</project>

View File

@ -0,0 +1,58 @@
<?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-dataimporthandler-extras" default="default">
<description>
Data Import Handler Extras
</description>
<import file="../contrib-build.xml"/>
<solr-contrib-uptodate name="dataimporthandler"
property="solr-dataimporthandler.uptodate"
classpath.property="solr-dataimporthandler.jar"/>
<target name="compile-solr-dataimporthandler" unless="solr-dataimporthandler.uptodate">
<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="default" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<!--
really sucks we do this always, without an up-to-date thing for tests
we should probably fix this, the same issue exists in modules
-->
<target name="compile-solr-dataimporthandler-tests">
<ant dir="${common-solr.dir}/contrib/dataimporthandler" target="compile-test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<path id="classpath">
<pathelement location="${common-solr.dir}/build/contrib/solr-dataimporthandler/classes/java"/>
<pathelement location="${common-solr.dir}/build/contrib/solr-dataimporthandler/classes/test"/>
<fileset dir="${common-solr.dir}/contrib/dataimporthandler/lib" includes="**/*.jar"/>
<fileset dir="${common-solr.dir}/contrib/extraction/lib" includes="**/*.jar"/>
<path refid="solr.base.classpath"/>
</path>
<target name="compile-core" depends="compile-solr-dataimporthandler, solr-contrib-build.compile-core"/>
<target name="compile-test" depends="compile-solr-dataimporthandler-tests, contrib-build.compile-test"/>
</project>

View File

@ -42,6 +42,7 @@ import java.util.*;
* <a href="http://wiki.apache.org/solr/DataImportHandler">http://wiki.apache.org/solr/DataImportHandler</a> for more
* details. <b>This API is experimental and subject to change</b>
*
*
* @since solr 1.4
*/
public class MailEntityProcessor extends EntityProcessorBase {

View File

@ -52,6 +52,7 @@ import static org.apache.solr.handler.dataimport.XPathEntityProcessor.URL;
* <p>An implementation of {@link EntityProcessor} which reads data from rich docs
* using <a href="http://tika.apache.org/">Apache Tika</a>
*
*
* @since solr 3.1
*/
public class TikaEntityProcessor extends EntityProcessorBase {

View File

@ -0,0 +1,5 @@
<html>
<body>
Apache Solr Search Server: DataImportHandler Extras contrib
</body>
</html>

View File

@ -40,6 +40,7 @@ import java.util.Map;
*
* TODO: Find a way to make the tests actually test code
*
*
* @see org.apache.solr.handler.dataimport.MailEntityProcessor
* @since solr 1.4
*/

View File

@ -20,6 +20,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**Testcase for TikaEntityProcessor
*
* @since solr 1.5
*/
public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {

View File

@ -17,303 +17,12 @@
limitations under the License.
-->
<project name="solr-dataimporthandler" default="build">
<property name="solr-path" value="../.." />
<property name="tikalibs-path" value="../extraction/lib" />
<import file="../../common-build.xml"/>
<project name="solr-dataimporthandler" default="default">
<description>
Data Import Handler
</description>
<path id="classpath.jetty">
<!-- jetty -->
<fileset dir="${solr-path}/example/lib">
<include name="**/*.jar" />
</fileset>
</path>
<path id="common.classpath">
<pathelement location="${solr-path}/build/solr" />
<pathelement location="${solr-path}/build/solrj" />
<fileset dir="${solr-path}/lib" includes="*.jar"/>
<path refid="lucene.classpath"/>
</path>
<path id="extras.classpath">
<pathelement location="${solr-path}/build/solr" />
<pathelement location="${solr-path}/build/solrj" />
<pathelement location="target/classes" />
<fileset dir="${solr-path}/lib" includes="*.jar"/>
<fileset dir="lib/" includes="*.jar"/>
<fileset dir="${tikalibs-path}" includes="*.jar"/>
<path refid="lucene.classpath"/>
</path>
<path id="test.classpath">
<path refid="common.classpath" />
<path refid="classpath.jetty" />
<pathelement path="target/classes" />
<pathelement path="target/test-classes" />
<pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
<pathelement location="${solr-path}/../lucene/build/classes/test-framework" /> <!-- include some lucene test code -->
<pathelement path="${java.class.path}"/>
</path>
<path id="test.extras.classpath">
<path refid="extras.classpath" />
<path refid="classpath.jetty" />
<pathelement path="target/classes" />
<pathelement path="target/extras/classes" />
<pathelement path="target/test-classes" />
<pathelement path="target/extras/test-classes" />
<pathelement location="${solr-path}/build/test-framework"/> <!-- include solr test code -->
<pathelement location="${solr-path}/../lucene/build/classes/test-framework" /> <!-- include some lucene test code -->
<pathelement path="${java.class.path}"/>
</path>
<target name="clean">
<delete failonerror="false" dir="target"/>
<delete failonerror="false">
<fileset dir="src/test/resources" includes="**/dataimport.properties" />
</delete>
<!-- Clean up examples -->
<delete failonerror="false">
<!-- we no longer copy things into this directory, but we still clean it up
the files are still there from a previous checkout
-->
<fileset dir="${example}/example-DIH/solr/mail/lib" includes="*.jar" />
</delete>
</target>
<target name="init">
<mkdir dir="target/classes"/>
<mkdir dir="${build.javadoc}" />
<subant target="compileTestFramework">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
<subant target="make-manifest">
<fileset dir="${solr-path}" includes="build.xml"/>
</subant>
</target>
<target name="compile" depends="init">
<solr-javac destdir="target/classes"
classpathref="common.classpath">
<src path="src/main/java" />
</solr-javac>
</target>
<target name="compileExtras" depends="compile">
<solr-javac destdir="target/extras/classes"
classpathref="extras.classpath">
<src path="src/extras/main/java" />
</solr-javac>
</target>
<target name="build" depends="compile,compileExtras">
<solr-jar destfile="target/${fullnamever}.jar" basedir="target/classes"
manifest="../../${dest}/META-INF/MANIFEST.MF" />
<solr-jar destfile="target/apache-${ant.project.name}-extras-${version}.jar" basedir="target/extras/classes"
manifest="../../${dest}/META-INF/MANIFEST.MF" />
</target>
<target name="compileTests" depends="compileCoreTests,compileExtrasTests"/>
<target name="compileCoreTests" depends="compile">
<solr-javac destdir="target/test-classes"
classpathref="test.classpath">
<src path="src/test/java" />
</solr-javac>
<!-- Copy any data files present to the classpath -->
<copy todir="target/test-classes">
<fileset dir="src/test/resources" excludes="**/*.java"/>
</copy>
</target>
<target name="compileExtrasTests" depends="compileExtras">
<solr-javac destdir="target/extras/test-classes"
classpathref="test.classpath">
<src path="src/extras/test/java" />
</solr-javac>
<!-- Copy any data files present to the classpath -->
<copy todir="target/extras/test-classes">
<fileset dir="src/extras/test/resources" excludes="**/*.java"/>
</copy>
</target>
<property name="tempDir" value="${junit.output.dir}/temp" />
<target name="test" depends="testCore,testExtras"/>
<target name="testCore" depends="compileCoreTests">
<mkdir dir="${junit.output.dir}"/>
<!-- <mkdir dir="@{tempDir}/@{pattern}"/>
This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
-->
<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
<condition property="runall">
<not>
<or>
<isset property="testcase"/>
<isset property="testpackage"/>
<isset property="testpackageroot"/>
</or>
</not>
</condition>
<junit printsummary="no"
haltonfailure="no"
maxmemory="512M"
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="${tempDir}"
tempdir="${tempDir}"
forkmode="perBatch"
>
<sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<sysproperty key="tests.codec" value="${tests.codec}"/>
<sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
<sysproperty key="tests.locale" value="${tests.locale}"/>
<sysproperty key="tests.timezone" value="${tests.timezone}"/>
<sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
<sysproperty key="tests.iter" value="${tests.iter}"/>
<sysproperty key="tests.seed" value="${tests.seed}"/>
<sysproperty key="tests.verbose" value="${tests.verbose}"/>
<!-- set whether or not nightly tests should run -->
<sysproperty key="tests.nightly" value="${tests.nightly}"/>
<sysproperty key="jetty.testMode" value="1"/>
<sysproperty key="tempDir" file="${tempDir}"/>
<sysproperty key="testmethod" value="${testmethod}"/>
<sysproperty key="tests.directory" value="${tests.directory}"/>
<sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
<jvmarg line="${args}"/>
<formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
<classpath refid="test.classpath"/>
<formatter type="${junit.formatter}"/>
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
<fileset dir="src/test/java" includes="${junit.includes}"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
<fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
<fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
<target name="testExtras" depends="compileExtrasTests">
<mkdir dir="${junit.output.dir}"/>
<!-- <mkdir dir="@{tempDir}/@{pattern}"/>
This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
-->
<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
<condition property="runall">
<not>
<or>
<isset property="testcase"/>
<isset property="testpackage"/>
<isset property="testpackageroot"/>
</or>
</not>
</condition>
<junit printsummary="no"
haltonfailure="no"
maxmemory="512M"
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="${tempDir}"
tempdir="${tempDir}"
forkmode="perBatch"
>
<sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<sysproperty key="tests.codecprovider" value="${tests.codecprovider}"/>
<sysproperty key="tests.codec" value="${tests.codec}"/>
<sysproperty key="tests.locale" value="${tests.locale}"/>
<sysproperty key="tests.timezone" value="${tests.timezone}"/>
<sysproperty key="tests.multiplier" value="${tests.multiplier}"/>
<sysproperty key="tests.iter" value="${tests.iter}"/>
<sysproperty key="tests.seed" value="${tests.seed}"/>
<sysproperty key="tests.verbose" value="${tests.verbose}"/>
<!-- set whether or not nightly tests should run -->
<sysproperty key="tests.nightly" value="${tests.nightly}"/>
<sysproperty key="jetty.testMode" value="1"/>
<sysproperty key="tempDir" file="${tempDir}"/>
<sysproperty key="testmethod" value="${testmethod}"/>
<sysproperty key="tests.directory" value="${tests.directory}"/>
<sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/>
<jvmarg line="${args}"/>
<formatter classname="${junit.details.formatter}" usefile="false" if="junit.details"/>
<classpath refid="test.extras.classpath"/>
<assertions>
<enable package="org.apache.lucene"/>
<enable package="org.apache.solr"/>
</assertions>
<formatter type="${junit.formatter}"/>
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
<fileset dir="src/extras/test/java" includes="${junit.includes}"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
<fileset dir="src/extras/test/java" includes="**/${testcase}.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
<fileset dir="src/extras/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
<fileset dir="src/extras/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
<target name="dist" depends="build">
<copy todir="../../build/web">
<fileset dir="src/main/webapp" includes="**" />
</copy>
<mkdir dir="../../build/web/WEB-INF/lib"/>
<!--<copy file="target/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"></copy>-->
<copy file="target/${fullnamever}.jar" todir="${solr-path}/dist"></copy>
<copy file="target/apache-${ant.project.name}-extras-${version}.jar" todir="${solr-path}/dist"></copy>
</target>
<target name="javadoc">
<sequential>
<mkdir dir="${build.javadoc}/contrib-${name}"/>
<path id="javadoc.classpath">
<path refid="common.classpath"/>
<path refid="extras.classpath"/>
</path>
<invoke-javadoc
destdir="${build.javadoc}/contrib-${name}"
title="${Name} ${version} contrib-${fullnamever} API">
<sources>
<packageset dir="src/main/java"/>
<packageset dir="src/extras/main/java"/>
</sources>
</invoke-javadoc>
</sequential>
</target>
<target name="example" depends="build,dist">
<!--
this target use to copy libs, but that is no longer needed.
now we just depend on dist to ensure the extra's jar exists.
-->
</target>
<import file="../contrib-build.xml"/>
</project>

Some files were not shown because too many files have changed in this diff Show More