Apache Solr open-source search software
SOLR-2452: Rewrote Solr build system (tighter integration with the Lucene build system) and restructured Solr internal and contrib modules
Steven Rowe429093b236e3
diff --cc dev-tools/idea/.idea/workspace.xmlindex 4dbaea77850,6c0b15bc385..053978d0f6c--- a/dev-tools/idea/.idea/workspace.xml+++ b/dev-tools/idea/.idea/workspace.xml@@@ -210,30 -189,27 +210,30 @@@<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.grouping module" />- <item index="8" class="java.lang.String" itemvalue="JUnit.highlighter contrib" />- <item index="9" class="java.lang.String" itemvalue="JUnit.icu analysis module" />- <item index="10" class="java.lang.String" itemvalue="JUnit.instantiated contrib" />- <item index="11" class="java.lang.String" itemvalue="JUnit.lucene" />- <item index="12" class="java.lang.String" itemvalue="JUnit.memory contrib" />- <item index="13" class="java.lang.String" itemvalue="JUnit.misc contrib" />- <item index="14" class="java.lang.String" itemvalue="JUnit.phonetic analysis module" />- <item index="15" class="java.lang.String" itemvalue="JUnit.queries contrib" />- <item index="16" class="java.lang.String" itemvalue="JUnit.queries module" />- <item index="17" class="java.lang.String" itemvalue="JUnit.queryparser contrib" />- <item index="18" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" />- <item index="19" class="java.lang.String" itemvalue="JUnit.solr" />- <item index="20" class="java.lang.String" itemvalue="JUnit.spatial contrib" />- <item index="21" class="java.lang.String" itemvalue="JUnit.stempel analysis module" />- <item index="22" class="java.lang.String" itemvalue="JUnit.suggest module" />- <item index="23" class="java.lang.String" itemvalue="JUnit.uima contrib" />- <item index="24" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />- <item index="25" class="java.lang.String" itemvalue="JUnit.xml-query-parser 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" />+ <item index="10" class="java.lang.String" itemvalue="JUnit.icu analysis module" />+ <item index="11" class="java.lang.String" itemvalue="JUnit.instantiated contrib" />+ <item index="12" class="java.lang.String" itemvalue="JUnit.join module" />+ <item index="13" class="java.lang.String" itemvalue="JUnit.lucene" />+ <item index="14" class="java.lang.String" itemvalue="JUnit.memory contrib" />+ <item index="15" class="java.lang.String" itemvalue="JUnit.misc contrib" />+ <item index="16" class="java.lang.String" itemvalue="JUnit.morfologik analysis module" />+ <item index="17" class="java.lang.String" itemvalue="JUnit.phonetic analysis module" />+ <item index="18" class="java.lang.String" itemvalue="JUnit.queries contrib" />+ <item index="19" class="java.lang.String" itemvalue="JUnit.queries module" />+ <item index="20" class="java.lang.String" itemvalue="JUnit.queryparser contrib" />+ <item index="21" class="java.lang.String" itemvalue="JUnit.smartcn analysis module" />+ <item index="22" class="java.lang.String" itemvalue="JUnit.solr" />+ <item index="23" class="java.lang.String" itemvalue="JUnit.spatial contrib" />+ <item index="24" class="java.lang.String" itemvalue="JUnit.stempel analysis module" />+ <item index="25" class="java.lang.String" itemvalue="JUnit.suggest module" />+ <item index="26" class="java.lang.String" itemvalue="JUnit.uima contrib" />+ <item index="27" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />+ <item index="28" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" /></list></component></project>diff --cc dev-tools/idea/solr/solr.imlindex 0826b9bbf30,e7dd5db0124..9a405c40dc8--- a/dev-tools/idea/solr/solr.iml+++ b/dev-tools/idea/solr/solr.iml@@@ -1,21 -1,19 +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/java" isTestSource="false" />+ <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" />diff --cc lucene/common-build.xmlindex 2af53feb602,ee40b752b7b..4c751089147--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@@ -92,6 -94,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"/>@@@ -508,8 -534,11 +535,8 @@@<sysproperty key="tests.seed" value="${tests.seed}"/><!-- 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- make this a param so lucene-core/contrib tests use it only?- <sysproperty key="tests.cleanthreads" value="perMethod"/>- -->- <sysproperty key="tests.cleanthreads" value="perClass"/>+ <!-- 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 -552,9 +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"/>++ <sysproperty key="solr.directoryFactory" value="org.apache.solr.core.MockDirectoryFactory"/><formatter type="xml"/><formatter classname="${junit.details.formatter}" usefile="false"/>diff --cc solr/CHANGES.txtindex 3b6ce8aa5cf,3b6ce8aa5cf..20d84d7c05f--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@@ -263,7 -263,7 +263,29 @@@ Other Change* SOLR-1825: SolrQuery.addFacetQuery now enables facets automatically, likeaddFacetField (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----------------------diff --cc solr/common-build.xmlindex b9721c668dc,917a54189c6..49d79686faa--- a/solr/common-build.xml+++ b/solr/common-build.xml@@@ -23,90 -23,45 +23,46 @@@<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="name" value="${ant.project.name}"/>-- <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="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}"/>++ <!-- solr uses 1.6 -->+ <property name="javac.source" value="1.6"/>+ <property name="javac.target" value="1.6"/>++ <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" />+ <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"/>- <condition property="tests.sequential">- <or>- <isset property="testcase"/>- <equals arg1="${tests.threadspercpu}" arg2="0"/>- </or>- </condition>++ <property name="tests.cleanthreads.sysprop" value="perClass"/>- <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="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" />+ <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>- <!-- Java Version we are compatible with -->- <property name="java.compat.version" value="1.6" />+ <pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>- <!-- clover wants to run with -lib, otherwise we prefer a repeatable- classpath -->- <property name="javac.includeAntRuntime" value="${run.clover}"/>+ <import file="${common-solr.dir}/../lucene/contrib/contrib-build.xml"/>- <!-- Solr Implementation Version -->- <!--- This can be any string value that does not include spaces- This will be used when creating build artifact file names.+ <!-- Solr Specification Version- 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 -->- <!--This will be used in the Manifest file, and therefore mustmatch 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).-->