mirror of https://github.com/apache/lucene.git
LUCENE-2973: Use 'svn export' for Solr's package-src and Lucene's dist-src targets; stop producing .zip versions of Lucene/Solr source packages.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1083213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
576084d69a
commit
d2a6250ef9
|
@ -45,10 +45,6 @@
|
|||
<pathelement path="${java.class.path}"/>
|
||||
</path>
|
||||
|
||||
<patternset id="src.dist.patterns"
|
||||
includes="src/,build.xml,*build*.xml,docs/,*.txt,contrib/,*pom.xml*,lib/,backwards/"
|
||||
excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/"
|
||||
/>
|
||||
<patternset id="binary.build.dist.patterns"
|
||||
includes="${final.name}*.jar,docs/,contrib/*/*.jar,contrib/*/*.war, contrib/*/*/*.jar"
|
||||
/>
|
||||
|
@ -339,57 +335,60 @@
|
|||
<mkdir dir="${dist.dir}"/>
|
||||
<mkdir dir="${maven.dist.dir}"/>
|
||||
</target>
|
||||
<!-- ================================================================== -->
|
||||
<!-- Packages the sources with zip -->
|
||||
<!-- ================================================================== -->
|
||||
<!-- -->
|
||||
<!-- ================================================================== -->
|
||||
<target name="package-zip-src" depends="init, init-dist"
|
||||
description="--> Generates the Lucene sources as .zip">
|
||||
<zip destfile="${dist.dir}/lucene-${version}-src.zip">
|
||||
<zipfileset prefix="lucene-${version}" dir=".">
|
||||
<patternset refid="src.dist.patterns"/>
|
||||
</zipfileset>
|
||||
</zip>
|
||||
<lucene-checksum file="${dist.dir}/lucene-${version}-src.zip"/>
|
||||
</target>
|
||||
|
||||
|
||||
<property name="svn.export.dir" location="${build.dir}/svn-export"/>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Packages the sources with tar-gzip -->
|
||||
<!-- Packages the sources from "svn export" with tar-gzip -->
|
||||
<!-- ================================================================== -->
|
||||
<!-- -->
|
||||
<!-- ================================================================== -->
|
||||
<target name="package-tgz-src" depends="init, init-dist"
|
||||
<target name="package-tgz-src" depends="init, init-dist, svn-export-source"
|
||||
description="--> Generates the Lucene distribution as .tar.gz">
|
||||
|
||||
<delete file="${build.dir}/lucene-${version}-src.tar"/>
|
||||
<delete file="${dist.dir}/lucene-${version}-src.tar.gz"/>
|
||||
<tar tarfile="${build.dir}/lucene-${version}-src.tar" longfile="gnu">
|
||||
<tarfileset prefix="lucene-${version}" dir=".">
|
||||
<patternset refid="src.dist.patterns"/>
|
||||
</tarfileset>
|
||||
<property name="source.package.file"
|
||||
value="${dist.dir}/lucene-${version}-src.tar.gz"/>
|
||||
<delete file="${source.package.file}"/>
|
||||
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
|
||||
<tarfileset prefix="lucene-${version}" dir="${svn.export.dir}"/>
|
||||
</tar>
|
||||
|
||||
<gzip zipfile="${dist.dir}/lucene-${version}-src.tar.gz"
|
||||
src="${build.dir}/lucene-${version}-src.tar"
|
||||
/>
|
||||
<lucene-checksum file="${dist.dir}/lucene-${version}-src.tar.gz"/>
|
||||
<lucene-checksum file="${source.package.file}"/>
|
||||
</target>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- Packages the sources with zip and tar-gzip -->
|
||||
<!-- Runs "svn export" in build/svn-export/ with the same URL -->
|
||||
<!-- and revision as the current working copy. -->
|
||||
<!-- ================================================================== -->
|
||||
<!-- -->
|
||||
<!-- ================================================================== -->
|
||||
<target name="package-all-src" depends="package-zip-src, package-tgz-src"
|
||||
description="--> Generates the .tar.gz and .zip source distributions"/>
|
||||
<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" failonerror="true">
|
||||
<arg line="export -r ${svn.Revision} ${svn.URL} ${svn.export.dir}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- same as package-all-src. it is just here for compatibility. -->
|
||||
<!-- Populates properties svn.URL and svn.Revision using "svn info". -->
|
||||
<!-- ================================================================== -->
|
||||
<!-- -->
|
||||
<target name="get-svn-info">
|
||||
<exec dir="." executable="svn" 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="dist-src" depends="package-all-src"/>
|
||||
<!-- same as package-tgz-src. it is just here for compatibility. -->
|
||||
<!-- ================================================================== -->
|
||||
<target name="dist-src" depends="package-tgz-src"/>
|
||||
|
||||
<target name="dist-all" depends="dist, dist-src"/>
|
||||
|
||||
|
|
120
solr/build.xml
120
solr/build.xml
|
@ -739,91 +739,50 @@
|
|||
<!-- make a distribution -->
|
||||
<target name="package" depends="package-src,create-package"/>
|
||||
|
||||
<!-- copied from lucene build.xml -->
|
||||
<patternset id="src.dist.patterns"
|
||||
includes="src/,build.xml,*build*.xml,docs/,*.txt,contrib/,*pom.xml*,lib/,backwards/"
|
||||
excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/"
|
||||
/>
|
||||
<property name="svn.export.dir" location="${dest}/svn-export"/>
|
||||
|
||||
<target name="package-src"
|
||||
description="Packages the Solr Source Distribution"
|
||||
depends="dist">
|
||||
<!-- Makes a tarball from running "svn export" at the root level. -->
|
||||
<!-- Copies NOTICE.txt and LICENSE.txt from solr/ to the root level. -->
|
||||
<target name="package-src" depends="svn-export-source"
|
||||
description="Packages the Solr Source Distribution">
|
||||
<mkdir dir="${package.dir}"/>
|
||||
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${example}/work" includes="**/*"/>
|
||||
</delete>
|
||||
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${dest}/${fullnamever}" includes="**/*"/>
|
||||
</delete>
|
||||
|
||||
<delete file="${package.dir}/${fullnamever}-src.tgz" failonerror="false" />
|
||||
<delete file="${package.dir}/${fullnamever}-src.zip" failonerror="false" />
|
||||
|
||||
<tar destfile="${package.dir}/${fullnamever}-src.tgz" compression="gzip" longfile="gnu">
|
||||
<tarfileset dir=".."
|
||||
prefix="${fullnamever}"
|
||||
includes="*.txt *.xml dev-tools/" />
|
||||
<tarfileset dir="."
|
||||
prefix="${fullnamever}"
|
||||
includes="LICENSE.txt NOTICE.txt"/>
|
||||
<tarfileset dir="."
|
||||
prefix="${fullnamever}/solr"
|
||||
includes="LICENSE.txt NOTICE.txt *.txt *.xml lib/** src/** example/** client/** contrib/ site/"
|
||||
excludes="${package.dir}/** ${dist}/** **/lucene-libs/** example/webapps/*.war example/exampledocs/post.jar lib/README.committers.txt **/data/ **/logs/* **/classes/ **/*.sh **/bin/ src/scripts/ src/site/build/ **/target/ client/python client/javascript contrib/**/build/ **/*.iml **/*.ipr **/*.iws" />
|
||||
<tarfileset dir="."
|
||||
prefix="${fullnamever}/solr"
|
||||
includes="src/test-files/solr/lib/classes/empty-file-main-lib.txt" />
|
||||
<tarfileset dir="."
|
||||
mode="755"
|
||||
prefix="${fullnamever}/solr"
|
||||
includes="**/*.sh **/bin/ src/scripts/" />
|
||||
<tarfileset dir="../lucene" prefix="${fullnamever}/lucene">
|
||||
<patternset refid="src.dist.patterns"/>
|
||||
</tarfileset>
|
||||
<tarfileset dir="../modules"
|
||||
prefix="${fullnamever}/modules"
|
||||
excludes="**/build/" />
|
||||
<property name="source.package.file"
|
||||
value="${package.dir}/${fullnamever}-src.tgz"/>
|
||||
<delete file="${source.package.file}" failonerror="false" />
|
||||
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
|
||||
<tarfileset dir="${svn.export.dir}" prefix="${fullnamever}"/>
|
||||
<tarfileset dir="${svn.export.dir}/solr" prefix="${fullnamever}"
|
||||
includes="NOTICE.txt,LICENSE.txt"/>
|
||||
</tar>
|
||||
<solr-checksum file="${package.dir}/${fullnamever}-src.tgz"/>
|
||||
|
||||
<gunzip src="${package.dir}/${fullnamever}-src.tgz" dest="${dest}/${fullnamever}-src.tar"/>
|
||||
<untar src="${dest}/${fullnamever}-src.tar" dest="${dest}"/>
|
||||
|
||||
<!--
|
||||
This is a list of text file patterns to convert to CRLF line-ending style.
|
||||
Shell scripts and files included in shell scripts should not be converted.
|
||||
NB: The line-ending conversion process will mangle non-UTF8-encoded files.
|
||||
-->
|
||||
<fixcrlf srcdir="${dest}/${fullnamever}"
|
||||
encoding="UTF-8"
|
||||
eol="crlf"
|
||||
includes="**/*.alg **/*.cgi **/*.cpp **/*.css **/*.csv **/*.dtd **/*.erb
|
||||
**/*.fcgi **/.htaccess **/*.htm **/*.html **/*.incl **/*.java
|
||||
**/*.javacc **/*.jflex **/*.jflex-macro **/*.jj **/*.js
|
||||
**/*.json **/*.jsp **/*LICENSE **/*.pl **/*.pom
|
||||
**/*pom.xml.template **/*.properties **/*.py **/*.rake
|
||||
**/Rakefile **/*.rb **/*.rbbi **/README **/README.* **/*.rhtml
|
||||
**/*.rslp **/*.rxml **/*.script **/*.svg **/*.tsv **/*.txt
|
||||
**/UPGRADING **/USAGE **/*.uxf **/*.vm **/*.xcat **/*.xml
|
||||
**/*.xsl **/*.xslt **/*.yml"
|
||||
excludes="**/stopwordsWrongEncoding.txt **/gb18030-example.xml"
|
||||
/>
|
||||
|
||||
<zip destfile="${package.dir}/${fullnamever}-src.zip">
|
||||
<zipfileset dir="${dest}/${fullnamever}"
|
||||
prefix="${fullnamever}"
|
||||
excludes="**/*.sh **/bin/ src/scripts/" />
|
||||
<zipfileset dir="${dest}/${fullnamever}"
|
||||
prefix="${fullnamever}"
|
||||
includes="**/*.sh **/bin/ src/scripts/"
|
||||
filemode="755" />
|
||||
</zip>
|
||||
<solr-checksum file="${package.dir}/${fullnamever}-src.zip"/>
|
||||
|
||||
<solr-checksum file="${source.package.file}"/>
|
||||
</target>
|
||||
|
||||
<!-- Runs "svn export" in build/svn-export/ with the same root-level 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="${dest}"/>
|
||||
<exec dir="." executable="svn" failonerror="true">
|
||||
<arg line="checkout -r ${svn.Revision} ${svn.URL} ${svn.export.dir}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Populates properties svn.URL and svn.Revision using "svn info" -->
|
||||
<target name="get-svn-info">
|
||||
<exec dir=".." executable="svn" 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="create-package"
|
||||
description="Packages the Solr Binary Distribution"
|
||||
|
@ -917,7 +876,6 @@
|
|||
<sign-artifact input.file="${package.dir}/${fullnamever}.tgz" output.file="${package.dir}/${fullnamever}.tgz.asc" gpg.passphrase="${gpg.passphrase}"/>
|
||||
<sign-artifact input.file="${package.dir}/${fullnamever}.zip" output.file="${package.dir}/${fullnamever}.zip.asc" gpg.passphrase="${gpg.passphrase}"/>
|
||||
<sign-artifact input.file="${package.dir}/${fullnamever}-src.tgz" output.file="${package.dir}/${fullnamever}-src.tgz.asc" gpg.passphrase="${gpg.passphrase}"/>
|
||||
<sign-artifact input.file="${package.dir}/${fullnamever}-src.zip" output.file="${package.dir}/${fullnamever}-src.zip.asc" gpg.passphrase="${gpg.passphrase}"/>
|
||||
|
||||
<!-- Maven artifacts -->
|
||||
<sign-maven-dependency-artifacts artifact.id="solr-commons-csv" gpg.passphrase="${gpg.passphrase}"/>
|
||||
|
|
Loading…
Reference in New Issue