Ok, here's the patch.  It includes my earlier patch with the "docweb"
additions (see my previous patch for the related code).  All I really did
was paste in build.properties.

So here are the steps to incorporate this:

- Apply this patch
- Rename build.properties -> build.properties.sample

I did rename one property: build.war.name -> build.demo.war.name so that the
docweb WAR that gets built uses build.docweb.war.name.

Let me know if there are any problems/questions - this patch is
straightforward and won't cause any problems except to note the other
changes I made with the property name change.

    Erik



----- Original Message -----
From: "Daniel Calvo" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Friday, February 15, 2002 11:54 PM
Subject: RE: Lucene Build Instructions


> I agree. I think this should be fixed before the official release (I've
had trouble building Lucene and I've seen messages from
> other users with the same problem). Can you make the changes and submit
the patches? Then, if everybody agrees, they can be
> commited.
>
> --Daniel
>
> > -----Original Message-----
> > From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> > Sent: sábado, 16 de fevereiro de 2002 00:38
> > To: Lucene Users List
> > Subject: Re: Lucene Build Instructions
> >
> >
> > I would go so far as to even recommend that javacc.home be defined in
> > build.xml with a default location that is the recommend "home" for it
and if
> > it needs adjusting it would happen via build.properties or -D
command-line
> > switch.
> >
> > Again, I'm here to help and volunteer my Ant expertise to lucene-dev.
Just
> > e-mail me and ask!
> >
> >     Erik
> >
> >
> > ----- Original Message -----
> > From: "Daniel Calvo" <[EMAIL PROTECTED]>
> > To: "Lucene Users List" <[EMAIL PROTECTED]>
> > Sent: Friday, February 15, 2002 11:09 PM
> > Subject: RE: Lucene Build Instructions
> >
> >
> > > Hi,
> > >
> > > That's why I've suggested changes in build.xml to look for
.ant.properties
> > files (posted in the developers list) but after reading
> > > acoliver and Erik replies I agreed with them. The best option would be
> > having all properties defined in build.xml and eliminate
> > > build.properties. Each user would be responsible for the local
> > configuration in a build.properties file (javacc.home would be
> > > defined there) and a sample build.properties would be provided to help
> > this process.
> > >
> > > --Daniel> $ pwd
> > > > /work/lucene-1.2-rc3-src
> > > > $ cat .ant.properties
> > > > javacc.home=/work/javacc2.1/bin/lib
> > > > $ ls  /work/javacc2.1/bin/lib/JavaCC.zip
> > > > /work/javacc2.1/bin/lib/JavaCC.zip
> > > > $ ant
> > > > Buildfile: build.xml
> > > >
> > > > init:
> > > >
> > > > javacc_check:
> > > >      [echo]
> > > >
##################################################################
> > > >       JavaCC not found.
> > > >       JavaCC Home: ./
> > > >       JavaCC Zip: .//lib/JavaCC.zip
> > > >
> > > >       Please download and install JavaCC 2.0 from:
> > > >
> > > >       <http://www.webgain.com/products/metamata/java_doc.html>
> > > >
> > > >       Then, create a .ant.properties file either in your home
> > > >       directory, or within the Lucene directory and set the
javacc.home
> > > >       property to the path where JavaCC.zip is located. For example,
> > > >       if you installed JavaCC in /usr/local/java/javacc2.0, then set
the
> > > >       javacc.home property to:
> > > >
> > > >       javacc.home=/usr/local/java/javacc2.0/bin/lib
> > > >
> > > >       If you get an error like the one below, then you have not
> > installed
> > > >       things correctly. Please check all your paths and try again.
> > > >
> > > >       java.lang.NoClassDefFoundError: COM/sun/labs/javacc/Main
> > > >
##################################################################
> > > >
> > > > $ cp .ant.properties ~/
> > > > $ ant
> > > > [no change from above]
> > > > $ cp /work/javacc2.1/bin/lib/JavaCC.zip lib/
> > > > $ ant
> > > > Buildfile: build.xml
> > > >
> > > > init:
> > > >
> > > > javacc_check:
> > > >
> > > > compile:
> > > >
> > > > jar:
> > > >
> > > > BUILD SUCCESSFUL
> > > >
> > > >
> > > > So perhaps it wasn't finger trouble but something else.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
Index: build.xml
===================================================================
RCS file: /home/cvspublic/jakarta-lucene/build.xml,v
retrieving revision 1.20
diff -u -r1.20 build.xml
--- build.xml   13 Feb 2002 16:52:02 -0000      1.20
+++ build.xml   16 Feb 2002 04:19:53 -0000
@@ -5,6 +5,67 @@
   <property file="${user.home}/build.properties"/>
   <property file="build.properties"/>
 
+  <property name="name" value="lucene"/>
+  <property name="Name" value="Lucene"/>
+  <property name="version" value="1.2-rc5-dev"/>
+  <property name="year" value="2000-2002"/>
+  <property name="final.name" value="${name}-${version}"/>
+  <property name="debug" value="off"/>
+  
+  <property name="project.name" value="site"/>
+  <property name="docs.src" value="./xdocs"/>
+  <property name="docs.dest" value="./docs"/>
+  
+  <property name="src.dir" value="./src/java"/>
+  <property name="demo.src" value="./src/demo"/>
+  <property name="demo.jsp" value="./src/jsp"/>
+  <property name="test.src" value="./src/test"/>
+  <property name="anttask.src" value="./src/ant"/>
+  <property name="docs.dir" value="./docs"/>
+  <property name="lib.dir" value="./lib"/>
+  <property name="dist.dir" value="${final.name}"/>
+  <property name="dist-src.dir" value="${final.name}-src"/>
+  
+  <!-- javadoc packages -->
+  <property name="packages" value="org.apache.lucene.*"/>
+  
+  <property name="javadoc.link" 
+value="http://java.sun.com/products/jdk/1.3/docs/api/"/>
+  
+  <property name="build.compiler.pedantic" value="false"/>
+  
+  <property name="build.dir" value="./bin"/>
+  <property name="build.classes" value="${build.dir}/classes"/>
+  <property name="build.lib" value="${build.dir}/lib"/>
+  <property name="build.javadocs" value="${build.dir}/docs/api"/>
+  <property name="build.src" value="${build.dir}/src"/>
+  
+  <property name="build.demo" value="${build.dir}/demo"/>
+  <property name="build.demo.src" value="${build.demo}/src"/>
+  <property name="build.demo.classes" value="${build.demo}/classes"/>
+  <property name="build.demo.name" value="${name}-demos-${version}"/>
+  <property name="build.demo.war.name" value="luceneweb"/>
+  
+  <property name="build.anttask" value="${build.dir}/anttask"/>
+  <property name="build.anttask.classes" value="${build.anttask}/classes"/>
+  
+  <property name="build.docweb" value="${build.dir}/docweb"/>
+  <property name="build.docweb.war.name" value="lucenedocweb"/>
+  
+  <property name="build.test" value="${build.dir}/test"/>
+  <property name="build.test.src" value="${build.test}/src"/>
+  <property name="build.test.classes" value="${build.test}/classes"/>
+  
+  <property name="junit.src" value="${basedir}/src/test"/>
+  <property name="junit.classes" value="${build.dir}/unit-classes"/>
+  <property name="junit.reports" value="${build.dir}/unit-reports"/>
+  
+  <property name="javacc.home" value="."/>
+  <property name="javacc.zip.dir" value="${javacc.home}/lib"/>
+  <property name="javacc.zip" value="${javacc.zip.dir}/JavaCC.zip"/>
+  
+  <property name="jakarta.site2.home" value="../jakarta-site2"/>
+  
+  
   <!-- Build classpath -->
   <path id="classpath">
     <pathelement location="${build.classes}"/>
@@ -62,7 +123,7 @@
 
       &lt;http://www.webgain.com/products/java_cc/&gt;
 
-      Then, create a .ant.properties file either in your home
+      Then, create a build.properties file either in your home
       directory, or within the Lucene directory and set the javacc.home
       property to the path where JavaCC.zip is located. For example,
       if you installed JavaCC in /usr/local/java/javacc2.0, then set the
@@ -130,32 +191,32 @@
   </target>
 
   <target name="wardemo" depends="compile,demo,jar,jardemo" if="javacc.present">
-    <mkdir dir="${build.demo}/${build.war.name}"/>
-    <mkdir dir="${build.demo}/${build.war.name}/WEB-INF"/>
-    <mkdir dir="${build.demo}/${build.war.name}/WEB-INF/lib"/>
+    <mkdir dir="${build.demo}/${build.demo.war.name}"/>
+    <mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF"/>
+    <mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF/lib"/>
     
-    <copy todir="${build.demo}/${build.war.name}">
+    <copy todir="${build.demo}/${build.demo.war.name}">
       <fileset dir="${demo.jsp}">
         <include name="**/*.jsp"/>
         <include name="**/*.xml"/>
       </fileset>
     </copy>
 
-    <copy todir="${build.demo}/${build.war.name}/WEB-INF/lib">
+    <copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
       <fileset dir="${build.dir}">
         <include name="*.jar"/>
       </fileset>
     </copy>
 
-    <copy todir="${build.demo}/${build.war.name}/WEB-INF/lib">
+    <copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
       <fileset dir="${build.demo}">
         <include name="*.jar"/>
       </fileset>
     </copy>
 
    <jar
-       jarfile="${build.demo}/${build.war.name}.war"
-       basedir="${build.demo}/${build.war.name}"
+       jarfile="${build.demo}/${build.demo.war.name}.war"
+       basedir="${build.demo}/${build.demo.war.name}"
        excludes="**/*.java"
    />
   </target>
@@ -390,7 +451,7 @@
     </copy>
     <copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
     <copy file="${build.demo}/${build.demo.name}.jar" todir="${dist.dir}"/>
-    <copy file="${build.demo}/${build.war.name}.war" todir="${dist.dir}"/>
+    <copy file="${build.demo}/${build.demo.war.name}.war" todir="${dist.dir}"/>
   </target>
 
   <!-- ================================================================== -->
@@ -542,4 +603,56 @@
     <delete file="${basedir}/${final.name}-src.tar.gz"/>
     <delete file="${basedir}/${final.name}-src.zip"/>
   </target>
+  
+  <!-- ================================================================== -->
+  <!-- Build the Ant index task                                           -->
+  <!-- ================================================================== -->
+  <target name="anttask-init">
+    <property name="anttask.classes" location="${build.dir}/anttask/classes"/>
+    <mkdir dir="${anttask.classes}"/>
+  </target>
+  
+  <target name="anttask-compile" depends="compile,anttask-init">
+    <javac 
+      srcdir="${anttask.src}" 
+      destdir="${anttask.classes}" 
+      debug="${debug}">
+      <classpath refid="classpath"/>
+    </javac>
+  </target>
+
+  <!-- ================================================================== -->
+  <!-- Build the DocWeb app                                               -->
+  <!-- ================================================================== -->
+  <target name="docweb-init">
+<!--    <mkdir dir="${}"/> -->
+  </target>
+  
+  <target name="docweb-index" depends="javadocs,anttask-compile,docweb-init">
+    <taskdef name="index"
+             classname="org.apache.lucene.ant.IndexTask">
+      <classpath>
+        <pathelement location="${anttask.classes}"/>
+        <path refid="classpath"/>
+      </classpath>
+    </taskdef>
+    
+    <index index="${build.docweb}/index"
+           overwrite="false">
+      <fileset dir="${docs.dir}"/>
+      <fileset dir="${build.javadocs}"/>
+    </index>
+    
+  </target>
+  
+  <target name="docweb-war" depends="jar,jardemo,docweb-index">
+    <war warfile="${build.docweb}/${build.docweb.war.name}.war"
+         webxml="${demo.jsp}/WEB-INF/web.xml">
+      <fileset dir="${demo.jsp}" excludes="WEB-INF/"/>
+      <lib dir="${build.demo}" includes="*.jar"/>
+      <lib dir="${build.dir}" includes="*.jar"/>
+      <webinf dir="${build.docweb}" includes="index/"/>
+    </war>
+  </target>
+  
 </project>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to