aggregate duplicated distribution patterns into reusable patternsets

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@165571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2005-05-02 01:06:14 +00:00
parent fe95807ca8
commit bc49f328c6
1 changed files with 31 additions and 16 deletions

View File

@ -40,6 +40,17 @@
<pathelement path="${java.class.path}"/> <pathelement path="${java.class.path}"/>
</path> </path>
<patternset id="src.dist.patterns"
includes="src/,build.xml,lib/,docs/,*.txt,contrib/"
excludes="contrib/*/lib/"
/>
<patternset id="binary.build.dist.patterns"
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/,contrib/*/*.jar"
/>
<patternset id="binary.root.dist.patterns"
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"
/>
<!-- ================================================================== --> <!-- ================================================================== -->
<!-- Prepares the build directory --> <!-- Prepares the build directory -->
@ -198,10 +209,12 @@
<delete file="${dist.dir}/${final.name}.zip"/> <delete file="${dist.dir}/${final.name}.zip"/>
<zip destfile="${dist.dir}/${final.name}.zip"> <zip destfile="${dist.dir}/${final.name}.zip">
<zipfileset prefix="${final.name}" dir="." <zipfileset prefix="${final.name}" dir=".">
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/> <patternset refid="binary.root.dist.patterns"/>
<zipfileset prefix="${final.name}" dir="${build.dir}" </zipfileset>
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/,contrib/*/*.jar"/> <zipfileset prefix="${final.name}" dir="${build.dir}">
<patternset refid="binary.build.dist.patterns"/>
</zipfileset>
</zip> </zip>
</target> </target>
@ -217,10 +230,12 @@
<delete file="${build.dir}/${final.name}.tar"/> <delete file="${build.dir}/${final.name}.tar"/>
<delete file="${dist.dir}/${final.name}.tar.gz"/> <delete file="${dist.dir}/${final.name}.tar.gz"/>
<tar tarfile="${build.dir}/${final.name}.tar"> <tar tarfile="${build.dir}/${final.name}.tar">
<tarfileset prefix="${final.name}" dir="." <tarfileset prefix="${final.name}" dir=".">
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/> <patternset refid="binary.root.dist.patterns"/>
<tarfileset prefix="${final.name}" dir="${build.dir}" </tarfileset>
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/,contrib/*/*.jar"/> <tarfileset prefix="${final.name}" dir="${build.dir}">
<patternset refid="binary.build.dist.patterns"/>
</tarfileset>
</tar> </tar>
<gzip zipfile="${dist.dir}/${final.name}.tar.gz" <gzip zipfile="${dist.dir}/${final.name}.tar.gz"
@ -255,9 +270,9 @@
<target name="package-zip-src" depends="init" <target name="package-zip-src" depends="init"
description="--> Generates the Lucene sources as .zip"> description="--> Generates the Lucene sources as .zip">
<zip destfile="${dist.dir}/${final.name}-src.zip"> <zip destfile="${dist.dir}/${final.name}-src.zip">
<zipfileset prefix="${final.name}" dir="." <zipfileset prefix="${final.name}" dir=".">
includes="src/,build.xml,lib/,docs/,*.txt,contrib/" <patternset refid="src.dist.patterns"/>
excludes="contrib/*/lib/"/> </zipfileset>
</zip> </zip>
</target> </target>
@ -272,9 +287,9 @@
<delete file="${build.dir}/${final.name}-src.tar"/> <delete file="${build.dir}/${final.name}-src.tar"/>
<delete file="${dist.dir}/${final.name}-src.tar.gz"/> <delete file="${dist.dir}/${final.name}-src.tar.gz"/>
<tar tarfile="${build.dir}/${final.name}-src.tar"> <tar tarfile="${build.dir}/${final.name}-src.tar">
<tarfileset prefix="${final.name}" dir="." <tarfileset prefix="${final.name}" dir=".">
includes="src/,build.xml,lib/,docs/,*.txt,contrib/" <patternset refid="src.dist.patterns"/>
excludes="contrib/*/lib/"/> </tarfileset>
</tar> </tar>
<gzip zipfile="${dist.dir}/${final.name}-src.tar.gz" <gzip zipfile="${dist.dir}/${final.name}-src.tar.gz"