add example and dist-example targets to build.xml

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@378133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-02-16 01:05:55 +00:00
parent 9e67b94b41
commit 6e454e8330
1 changed files with 21 additions and 1 deletions

View File

@ -18,6 +18,9 @@
<!-- Destination for distribution files (demo WAR, src distro, etc.) -->
<property name="dist" value="dist" />
<!-- Example directory -->
<property name="example" value="example" />
<!-- Default target: usage. Prints out instructions. -->
<target name="usage"
description="Prints out instructions">
@ -116,7 +119,7 @@
<!-- Creates the Solr distribution files. -->
<target name="dist"
description="Creates the Solr distribution files."
depends="dist-src, dist-war, dist-bin" />
depends="dist-src, dist-war, dist-bin, dist-example" />
<!-- Creates the Solr WAR file. -->
<target name="dist-war"
@ -157,4 +160,21 @@
basedir="${dest}" />
</target>
<target name="example"
depends="dist-war">
<copy file="${dist}/${ant.project.name}-${version}.war" tofile="${example}/webapps/${ant.project.name}.war"/>
</target>
<target name="dist-example"
depends="example">
<zip destfile="${dist}/${ant.project.name}-${version}-example.zip">
<zipfileset dir="${example}"
prefix="${ant.project.name}-${example}"
excludes="data/ logs/*"
/>
</zip>
</target>
</project>