Skip to content

Apache Lucene open-source search software

LUCENE-5273: Only unpack Lucene/Solr jars from binary distributions - other stuff not needed

Steven Rowea1d0068a93fe
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 789061e1249..781505e645f 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -188,7 +188,7 @@ 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)
+ should be identical across all distributions. (Steve Rowe, Uwe Schindler)
Tests
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index ddbc5a7ee95..a59e847273a 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -493,6 +493,10 @@
<property name="lucene.tgz.file" location="${common.dir}/dist/lucene-${version}.tgz"/>
<available file="${lucene.tgz.file}" property="lucene.tgz.exists"/>
<property name="lucene.tgz.unpack.dir" location="${common.build.dir}/lucene.tgz.unpacked"/>
+ <patternset id="patternset.lucene.solr.jars">
+ <include name="**/lucene-*.jar"/>
+ <include name="**/solr-*.jar"/>
+ </patternset>
<available type="dir" file="${lucene.tgz.unpack.dir}" property="lucene.tgz.unpack.dir.exists"/>
<target name="-ensure-lucene-tgz-exists" unless="lucene.tgz.exists">
<ant dir="${common.dir}" target="package-tgz" inheritall="false"/>
@@ -500,7 +504,9 @@
<target name="-unpack-lucene-tgz" unless="lucene.tgz.unpack.dir.exists">
<antcall target="-ensure-lucene-tgz-exists" inheritall="false"/>
<mkdir dir="${lucene.tgz.unpack.dir}"/>
- <untar compression="gzip" src="${lucene.tgz.file}" dest="${lucene.tgz.unpack.dir}"/>
+ <untar compression="gzip" src="${lucene.tgz.file}" dest="${lucene.tgz.unpack.dir}">
+ <patternset refid="patternset.lucene.solr.jars"/>
+ </untar>
</target>
<property name="dist.jar.dir.prefix" value="${lucene.tgz.unpack.dir}/lucene"/>
<pathconvert property="dist.jar.dir.suffix">
diff --git a/solr/common-build.xml b/solr/common-build.xml
index f728e7fc291..a5087540995 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -59,7 +59,9 @@
<target name="-unpack-solr-tgz" unless="${solr.tgz.unpack.dir.exists}">
<antcall target="-ensure-solr-tgz-exists"/>
<mkdir dir="${solr.tgz.unpack.dir}"/>
- <untar compression="gzip" src="${solr.tgz.file}" dest="${solr.tgz.unpack.dir}"/>
+ <untar compression="gzip" src="${solr.tgz.file}" dest="${solr.tgz.unpack.dir}">
+ <patternset refid="patternset.lucene.solr.jars"/>
+ </untar>
</target>
<!-- backwards compatibility with existing targets/tasks; TODO: remove this! -->