mirror of https://github.com/apache/lucene.git
LUCENE-5273: Fix slowdown when running 'ant example': unless called from the 'create-package' target, the 'lucene-jars-to-solr' and 'module-jars-to-solr' targets no longer depend on '-unpack-lucene-tgz', pulling lucene-*.jar from lucene/build/*/ instead.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1531750 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13ed98be82
commit
7dc46c9f2d
|
@ -188,7 +188,8 @@ Build
|
|||
|
||||
* LUCENE-5273: Binary artifacts in Lucene and Solr convenience binary
|
||||
distributions accompanying a release, including on Maven Central,
|
||||
should be identical across all distributions. (Steve Rowe, Uwe Schindler)
|
||||
should be identical across all distributions. (Steve Rowe, Uwe Schindler,
|
||||
Shalin Shekhar Mangar)
|
||||
|
||||
Tests
|
||||
|
||||
|
|
|
@ -465,8 +465,14 @@
|
|||
</target>
|
||||
|
||||
<target name="create-package"
|
||||
description="Packages the Solr Binary Distribution"
|
||||
depends="init-dist, dist, example, documentation">
|
||||
description="Packages the Solr Binary Distribution">
|
||||
<antcall inheritall="true">
|
||||
<param name="called.from.create-package" value="true"/>
|
||||
<target name="init-dist"/>
|
||||
<target name="dist"/>
|
||||
<target name="example"/>
|
||||
<target name="documentation"/>
|
||||
</antcall>
|
||||
<mkdir dir="${dest}/${fullnamever}"/>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${example}/solr-webapp" includes="**/*"/>
|
||||
|
|
|
@ -160,8 +160,24 @@
|
|||
<property name="solr.deps.compiled" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="lucene-jars-to-solr" depends="-unpack-lucene-tgz">
|
||||
<target name="lucene-jars-to-solr"
|
||||
depends="-lucene-jars-to-solr-not-for-package,-lucene-jars-to-solr-package"/>
|
||||
|
||||
<target name="-lucene-jars-to-solr-not-for-package" unless="called.from.create-package">
|
||||
<sequential>
|
||||
<antcall target="prep-lucene-jars" inheritall="true"/>
|
||||
<property name="solr.deps.compiled" value="true"/>
|
||||
<copy todir="${lucene-libs}" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
||||
<path refid="solr.lucene.libs" />
|
||||
<!-- NOTE: lucene-core is not already included in "solr.lucene.libs" because of its use in classpaths. -->
|
||||
<fileset file="${lucene-core.jar}" />
|
||||
</copy>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="-lucene-jars-to-solr-package" if="called.from.create-package">
|
||||
<sequential>
|
||||
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
|
||||
<pathconvert property="relative.solr.lucene.libs" pathsep=",">
|
||||
<path refid="solr.lucene.libs"/>
|
||||
<fileset file="${lucene-core.jar}"/>
|
||||
|
|
|
@ -49,7 +49,23 @@
|
|||
code in the analysis-extras contrib, they must remain here in order to
|
||||
populate the Solr distribution
|
||||
-->
|
||||
<target name="module-jars-to-solr" depends="-unpack-lucene-tgz">
|
||||
<target name="module-jars-to-solr"
|
||||
depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
|
||||
<target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
|
||||
<antcall inheritall="true">
|
||||
<target name="jar-analyzers-icu"/>
|
||||
<target name="jar-analyzers-smartcn"/>
|
||||
<target name="jar-analyzers-stempel"/>
|
||||
<target name="jar-analyzers-morfologik"/>
|
||||
</antcall>
|
||||
<property name="analyzers-icu.uptodate" value="true"/> <!-- compile-time dependency -->
|
||||
<mkdir dir="${build.dir}/lucene-libs"/>
|
||||
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
||||
<path refid="analysis.extras.lucene.libs" />
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-module-jars-to-solr-package" if="called.from.create-package">
|
||||
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
|
||||
<pathconvert property="relative.analysis.extras.lucene.libs" pathsep=",">
|
||||
<path refid="analysis.extras.lucene.libs"/>
|
||||
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
|
||||
|
|
|
@ -35,7 +35,18 @@
|
|||
<path refid="solr.base.classpath"/>
|
||||
</path>
|
||||
|
||||
<target name="module-jars-to-solr" depends="-unpack-lucene-tgz">
|
||||
<target name="module-jars-to-solr"
|
||||
depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
|
||||
<target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
|
||||
<antcall target="jar-analyzers-uima" inheritall="true"/>
|
||||
<property name="analyzers-uima.uptodate" value="true"/>
|
||||
<mkdir dir="${build.dir}/lucene-libs"/>
|
||||
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
||||
<fileset file="${analyzers-uima.jar}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-module-jars-to-solr-package" if="called.from.create-package">
|
||||
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
|
||||
<pathconvert property="relative.uima.lucene.libs" pathsep=",">
|
||||
<path refid="uima.lucene.libs"/>
|
||||
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
|
||||
|
|
|
@ -70,8 +70,18 @@
|
|||
<solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="module-jars-to-solr" depends="-unpack-lucene-tgz">
|
||||
<target name="module-jars-to-solr"
|
||||
depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
|
||||
<target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
|
||||
<antcall target="jar-test-framework" inheritall="true"/>
|
||||
<property name="test-framework.uptodate" value="true"/>
|
||||
<mkdir dir="${build.dir}/lucene-libs"/>
|
||||
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
||||
<path refid="solr.test.framework.lucene.libs" />
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-module-jars-to-solr-package" if="called.from.create-package">
|
||||
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
|
||||
<pathconvert property="relative.solr.test.framework.lucene.libs" pathsep=",">
|
||||
<path refid="solr.test.framework.lucene.libs"/>
|
||||
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
<target name="dist"
|
||||
description="Creates the Solr WAR Distribution file."
|
||||
depends="test, init-dist, dist-core, dist-solrj, -unpack-lucene-tgz, lucene-jars-to-solr">
|
||||
depends="test, init-dist, dist-core, dist-solrj, lucene-jars-to-solr">
|
||||
<build-manifest title="Apache Solr Search Server"
|
||||
implementation.title="org.apache.solr"
|
||||
spec.version="${spec.version}"/>
|
||||
|
|
Loading…
Reference in New Issue