Apache Solr open-source search software
build.xml cleanup: removed some targets that were not longer useful, clarified the descriptions of some targets, added a macro to build the MD5 checksum files as part of hte package target
Chris M. Hostetter636477db5887
diff --git a/build.xml b/build.xmlindex 58005a79fa4..5ed453b48ae 100644--- a/build.xml+++ b/build.xml@@ -70,6 +70,9 @@<!-- Destination for distribution files (demo WAR, src distro, etc.) --><property name="dist" value="dist" />+ <!-- Type of checksum to compute for distribution files -->+ <property name="checksum.algorithm" value="md5" />+<!-- Example directory --><property name="example" value="example" />@@ -94,6 +97,34 @@<property name="junit.reports" location="${dest}/test-results/reports"/><property name="junit.includes" value="**/Test*.java,**/*Test.java"/>+ <!-- Macro for building checksum files+ This is only needed until the "format" option is supported+ by ant's built in checksum task+ -->+ <macrodef name="solr-checksum">+ <attribute name="file"/>+ <!-- NOTE: we use the value of @{file} in the names any properties+ set because macro's don't have variables, and otherwise we+ wouldn't be able to checksum more then one file per build+ -->+ <sequential>+ <checksum file="@{file}"+ property="@{file}.sum"+ algorithm="${checksum.algorithm}" />+ <basename file="@{file}" property="@{file}.base" />+ <concat destfile="@{file}.${checksum.algorithm}"+ force="yes"+ append="false"+ fixlastline="yes">+ <header trimleading="yes">${@{file}.sum} </header>+ <!-- empty fileset to trick concat -->+ <fileset dir="." excludes="**" />+ <footer trimleading="yes">${@{file}.base}+ </footer>+ </concat>+ </sequential>+ </macrodef>+<!-- Default target: usage. Prints out instructions. --><target name="usage"description="Prints out instructions">@@ -322,7 +353,7 @@<!-- Creates the Solr WAR file. --><target name="dist-war"- description="Creates the demo WAR file."+ description="Creates the Solr WAR Distribution file."depends="compile, make-manifest, dist-jar"><mkdir dir="${dist}" /><war destfile="${dist}/${fullnamever}.war"@@ -340,17 +371,9 @@</war></target>- <!-- Creates the source jar. -->- <target name="dist-src"- description="Creates the source distribution." >- <mkdir dir="${dist}" />- <zip destfile="${dist}/${fullnamever}-src.zip"- basedir="${src}" />- </target>-<!-- Creates the solr jar. --><target name="dist-jar"- description="Creates the binary distribution."+ description="Creates the Solr JAR Distribution file."depends="compile, make-manifest"><mkdir dir="${dist}" /><jar destfile="${dist}/${fullnamever}.jar"@@ -362,7 +385,6 @@</jar></target>-<target name="example"description="Creates a runnable example configuration."depends="dist-war">@@ -377,20 +399,10 @@<echo>See ${example}/README.txt for how to run the Solr example configuration.</echo></target>- <target name="dist-example"- depends="example">- <zip destfile="${dist}/${fullnamever}-example.zip">- <zipfileset dir="${example}"- prefix="${fullnamever}-${example}"- excludes="data/ logs/*"- />- </zip>- </target>--<!-- make a distribution --><target name="package"- depends="dist, example, javadoc">+ description="Packages the Solr Distribution files and Documentation."+ depends="dist, example, javadoc"><zip destfile="${dist}/${fullnamever}.zip"><zipfileset dir="."@@ -403,7 +415,8 @@<zipfileset dir="${dest}/docs/api/"prefix="${fullnamever}/docs/api/" /></zip>-+ <solr-checksum file="${dist}/${fullnamever}.zip"/>+<tar destfile="${dist}/${fullnamever}.tgz" compression="gzip"><tarfileset dir="."prefix="${fullnamever}"@@ -415,11 +428,13 @@<tarfileset dir="${dest}/docs/api/"prefix="${fullnamever}/docs/api/" /></tar>+ <solr-checksum file="${dist}/${fullnamever}.tgz"/></target><target name="nightly"depends="test, package">+ <!-- no description, don't advertise --></target></project>