new targets javadocs, nightly, changes to other targets

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@378666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-02-18 00:17:44 +00:00
parent 75070cd5b2
commit d0edbc44f3

View File

@ -3,6 +3,8 @@
<!-- Initialize property values: allow easy customization via build.properties --> <!-- Initialize property values: allow easy customization via build.properties -->
<property file="build.properties" /> <property file="build.properties" />
<property name="Name" value="Solr" />
<!-- Solr version --> <!-- Solr version -->
<property name="version" value="1.0" /> <property name="version" value="1.0" />
@ -21,6 +23,12 @@
<!-- Example directory --> <!-- Example directory -->
<property name="example" value="example" /> <property name="example" value="example" />
<property name="build.docs" value="${dest}/docs"/>
<property name="javadoc.link.java"
value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<property name="javadoc.packages" value="org.apache.solr.*"/>
<property name="build.javadoc" value="${build.docs}/api"/>
<!-- Default target: usage. Prints out instructions. --> <!-- Default target: usage. Prints out instructions. -->
<target name="usage" <target name="usage"
description="Prints out instructions"> description="Prints out instructions">
@ -35,6 +43,7 @@
<target name="clean" <target name="clean"
description="Cleans compiled files and other temporary artifacts."> description="Cleans compiled files and other temporary artifacts.">
<delete dir="${dest}" /> <delete dir="${dest}" />
<delete dir="${dist}" />
</target> </target>
@ -64,6 +73,25 @@
</target> </target>
<target name="javadoc" depends="compile">
<mkdir dir="${build.javadoc}"/>
<javadoc
destdir="${build.javadoc}"
author="true"
version="true"
use="true"
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright &amp;copy; ${year} The Apache Software Foundation"
>
<packageset dir="${src}/java"/>
<packageset dir="${src}/webapp/src"/>
<link href="${javadoc.link.java}"/>
<classpath refid="compile.classpath"/>
</javadoc>
</target>
<!-- ========================================================================= --> <!-- ========================================================================= -->
<!-- ===================== TESTING-RELATED TASKS ============================= --> <!-- ===================== TESTING-RELATED TASKS ============================= -->
<!-- ========================================================================= --> <!-- ========================================================================= -->
@ -119,7 +147,7 @@
<!-- Creates the Solr distribution files. --> <!-- Creates the Solr distribution files. -->
<target name="dist" <target name="dist"
description="Creates the Solr distribution files." description="Creates the Solr distribution files."
depends="dist-src, dist-war, dist-bin, dist-example" /> depends="dist-src, dist-war, dist-jar" />
<!-- Creates the Solr WAR file. --> <!-- Creates the Solr WAR file. -->
<target name="dist-war" <target name="dist-war"
@ -128,36 +156,31 @@
<mkdir dir="${dist}" /> <mkdir dir="${dist}" />
<war destfile="${dist}/${ant.project.name}-${version}.war" <war destfile="${dist}/${ant.project.name}-${version}.war"
webxml="${src}/webapp/WEB-INF/web.xml"> webxml="${src}/webapp/WEB-INF/web.xml">
<classes dir="${dest}" /> <classes dir="${dest}" includes="org/apache/**" />
<lib dir="${lib}"> <lib dir="${lib}">
<exclude name="servlet-api-*.jar" /> <exclude name="servlet-api*.jar" />
</lib> </lib>
<fileset dir="${src}/webapp/resources" /> <fileset dir="${src}/webapp/resources" />
</war> </war>
</target> </target>
<!-- Creates the source distribution. --> <!-- Creates the source distribution. -->
<target name="dist-src" <target name="dist-src"
description="Creates the source distribution." description="Creates the source distribution." >
depends="clean">
<mkdir dir="${dist}" /> <mkdir dir="${dist}" />
<zip destfile="${dist}/${ant.project.name}-${version}-src.zip" <zip destfile="${dist}/${ant.project.name}-${version}-src.zip"
basedir="${src}" /> basedir="${src}" />
</target> </target>
<!-- Creates the binary distribution. --> <!-- Creates the solr jar. -->
<target name="dist-bin" <target name="dist-jar"
description="Creates the binary distribution." description="Creates the binary distribution."
depends="clean, compile, dist-war"> depends="compile">
<mkdir dir="${dist}" /> <mkdir dir="${dist}" />
<jar destfile="${dist}/${ant.project.name}-${version}.jar" <jar destfile="${dist}/${ant.project.name}-${version}.jar"
basedir="${dest}" /> basedir="${dest}"
includes="org/apache/**" />
<zip destfile="${dist}/${ant.project.name}-${version}.zip"
basedir="${dest}" />
</target> </target>
@ -176,5 +199,26 @@
</zip> </zip>
</target> </target>
<!-- make a distribution -->
<target name="package"
depends="dist, javadoc">
<zip destfile="${dist}/${ant.project.name}-${version}.zip">
<zipfileset dir="."
prefix="${ant.project.name}-${version}"
includes="*.txt *.xml lib/** src/** example/**"
excludes="**/data/ **/logs/ **/classes/" />
<zipfileset dir="."
prefix="${ant.project.name}-${version}"
includes="dist/*.jar dist/*.war" />
<zipfileset dir="${dest}/docs/api/"
prefix="${ant.project.name}-${version}/docs/api/" />
</zip>
</target>
<target name="nightly"
depends="test, package">
</target>
</project> </project>