svn commit: r581300 - /xml/xindice/trunk/java/examples/build.xml

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Tue Oct  2 09:54:19 2007
New Revision: 581300

URL: http://svn.apache.org/viewvc?rev=581300&view=rev
Log:
tweaking build

Modified:
    xml/xindice/trunk/java/examples/build.xml

Modified: xml/xindice/trunk/java/examples/build.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/examples/build.xml?rev=581300&r1=581299&r2=581300&view=diff
==============================================================================
--- xml/xindice/trunk/java/examples/build.xml (original)
+++ xml/xindice/trunk/java/examples/build.xml Tue Oct  2 09:54:19 2007
@@ -22,7 +22,6 @@
 <!--
   - Xindice Addressbook and Guide Ant build file
   -->
-
 <project name="xindice-examples" default="release" basedir=".">
 
     <!-- =================================================================== -->
@@ -31,35 +30,33 @@
 
     <!-- source directories -->
     <property name="root.dir" value="../.."/>
-    <property name="jar.dir" value="${root.dir}/java/lib"/>
-    <property name="dist.dir" value="${root.dir}/dist"/>
+    <property name="jar.dir" value="${root.dir}/lib"/>
 
     <!-- destination directories -->
     <property name="build.dir" value="${root.dir}/build"/>
-
-    <!-- Compilation properties -->
-    <property name="compile.debug" value="on"/>
-    <property name="compile.optimize" value="off"/>
-    <property name="compile.nowarn" value="off"/>
-    <property name="compile.deprecation" value="on"/>
-    <property name="compile.verbose" value="off"/>
+    <property name="dist.dir" value="${root.dir}"/>
 
     <!-- classpath to use within project -->
     <path id="project.class.path">
         <!-- all jars in jar and dist directory -->
+        <fileset dir="${jar.dir}/endorsed">
+           <include name="*.jar"/>
+        </fileset>
         <fileset dir="${jar.dir}">
            <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${root.dir}">
            <include name="*.jar"/>
         </fileset>
     </path>
 
     <target name="init"
             description="Initializes the build">
+        <property file="${root.dir}/local.build.properties"/>
+        <property file="${root.dir}/build.properties"/>
+
         <tstamp/>
         <mkdir dir="${build.dir}"/>
-        <mkdir dir="${dist.dir}"/>
     </target>
 
     <!-- =================================================================== -->
@@ -76,14 +73,14 @@
     <!-- Addressbook example                                                 -->
     <!-- =================================================================== -->
 
-    <!-- Addressbook property definitions -->
-    <property name="addressbook.app.name"  value="addressbook"/>
-    <property name="addressbook.build.dir" value="${build.dir}/addressbook-classes"/>
-    <property name="addressbook.src.dir" value="addressbook/src/java"/>
-    <property name="addressbook.jsp.dir" value="addressbook/src/jsp"/>
-    <property name="addressbook.config.dir" value="config"/>
-
     <target name="addressbook-init" depends="init">
+        <!-- Addressbook property definitions -->
+        <property name="addressbook.src.dir" value="addressbook/src/java"/>
+        <property name="addressbook.jsp.dir" value="addressbook/src/jsp"/>
+        <property name="addressbook.build.dir" value="${build.dir}/addressbook-classes"/>
+        <property name="addressbook.war" value="${dist.dir}/xindice-${project.version}-addressbook.war"/>
+        <property name="addressbook.config.dir" value="config"/>
+
         <mkdir dir="${addressbook.build.dir}"/>
     </target>
 
@@ -104,21 +101,23 @@
 
     <target name="addressbook-release"
             depends="addressbook-build">
-       <war destfile="${dist.dir}/${addressbook.app.name}.war"
+       <war destfile="${addressbook.war}"
             update="false"
             webxml="addressbook/config/web.xml">
           <fileset dir="${addressbook.jsp.dir}"/>
           <classes dir="${addressbook.build.dir}"/>
+          <lib dir="${jar.dir}/endorsed">
+             <include name="xalan-*.jar"/>
+             <include name="xercesImpl-*.jar"/>
+             <include name="xml-apis-*.jar"/>
+          </lib>
           <lib dir="${jar.dir}">
              <include name="commons-logging-*.jar" />
              <include name="xmldb-api-*.jar"/>
-             <include name="xmldb-xupdate*.jar"/>
-             <include name="xalan-*.jar"/>
-             <include name="xerces-*.jar"/>
+             <include name="xmldb-xupdate-*.jar"/>
              <include name="xmlrpc-*.jar"/>
-             <include name="xml-apis*.jar"/>
           </lib>
-          <lib dir="${dist.dir}">
+          <lib dir="${root.dir}">
              <include name="xindice-*.jar"/>
           </lib>
           <manifest>
@@ -131,7 +130,7 @@
     </target>
 
     <target name="addressbook-clean">
-        <delete file="${dist.dir}/${addressbook.app.name}.war"/>
+        <delete file="${addressbook.war}"/>
         <delete dir="${addressbook.build.dir}"/>
     </target>
 
@@ -139,12 +138,12 @@
     <!-- Guide examples                                                      -->
     <!-- =================================================================== -->
 
-    <!-- Guide property definitions -->
-    <property name="guide.jar.name"  value="xindice-guide"/>
-    <property name="guide.build.dir" value="${build.dir}/guide-classes"/>
-    <property name="guide.src.dir" value="guide/src"/>
-
     <target name="guide-init" depends="init">
+        <!-- Guide property definitions -->
+        <property name="guide.jar.name"  value="${dist.dir}/xindice-${project.version}-guide.jar"/>
+        <property name="guide.build.dir" value="${build.dir}/guide-classes"/>
+        <property name="guide.src.dir" value="guide/src"/>
+
         <mkdir dir="${guide.build.dir}"/>
     </target>
 
@@ -165,7 +164,7 @@
 
     <target name="guide-release"
             depends="guide-build">
-       <jar jarfile="${dist.dir}/${guide.jar.name}.jar"
+       <jar jarfile="${guide.jar.name}"
             basedir="${guide.build.dir}">
           <manifest>
              <attribute name="Built-By" value="${user.name}"/>
@@ -177,7 +176,7 @@
     </target>
 
     <target name="guide-clean">
-        <delete file="${dist.dir}/${guide.jar.name}.jar"/>
+        <delete file="${guide.jar.name}"/>
         <delete dir="${guide.build.dir}"/>
     </target>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.