You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@locus.apache.org on 2000/09/19 02:25:34 UTC

cvs commit: xml-cocoon build.sh build.xml

stefano     00/09/18 17:25:34

  Modified:    .        Tag: xml-cocoon2 build.sh build.xml
  Log:
  fixed latest problems with the build process
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.11 +5 -17     xml-cocoon/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/build.sh,v
  retrieving revision 1.10.2.10
  retrieving revision 1.10.2.11
  diff -u -r1.10.2.10 -r1.10.2.11
  --- build.sh	2000/09/17 00:15:17	1.10.2.10
  +++ build.sh	2000/09/19 00:25:32	1.10.2.11
  @@ -2,28 +2,16 @@
   # -----------------------------------------------------------------------------
   # build.sh - Unix Build Script for Apache Cocoon
   #
  -# $Id: build.sh,v 1.10.2.10 2000/09/17 00:15:17 stefano Exp $
  +# $Id: build.sh,v 1.10.2.11 2000/09/19 00:25:32 stefano Exp $
   # -----------------------------------------------------------------------------
   
  -# ----- Verify and Set Required Environment Variables -------------------------
  +ANT_HOME=.
   
  -if [ "$ANT_HOME" = "" ] ; then
  -  ANT_HOME=.
  -fi
  -
  -if [ "$JAVA_HOME" = "" ] ; then
  -  echo You must set JAVA_HOME to point at your Java Development Kit installation
  -  exit 1
  -fi
  -
  -# ----- Set Up The Runtime Classpath ------------------------------------------
  -
   CP=$JAVA_HOME/lib/tools.jar:$ANT_HOME/lib/ant.jar:./lib/xerces_1_2.jar
   
  -# ----- Make sure Ant script is executable ------------------------------------
  -
  -chmod 0755 $ANT_HOME/bin/antRun
  -
   # ----- Execute The Requested Build -------------------------------------------
   
   $JAVA_HOME/bin/java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME $*
  +
  +
  +
  
  
  
  1.6.2.34  +43 -18    xml-cocoon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/build.xml,v
  retrieving revision 1.6.2.33
  retrieving revision 1.6.2.34
  diff -u -r1.6.2.33 -r1.6.2.34
  --- build.xml	2000/09/17 00:15:17	1.6.2.33
  +++ build.xml	2000/09/19 00:25:32	1.6.2.34
  @@ -88,17 +88,29 @@
   cocoon + web application in your servlet container. If called normally it
   doesn't do anything, but if you type
   
  - [unix]  ./build.sh  -Dinstall.lib="../tomcat/lib" -Dinstall.war="../tomcat/webapps" install
  - [win32] .\build.bat -Dinstall.lib="..\tomcat\lib" -Dinstall.war="..\tomcat\webapps" install
  + [unix]  ./build.sh  -Dinstall.war=../tomcat/webapps install
  + [win32] .\build.bat -Dinstall.war=..\tomcat\webapps install
   
  -overriding the installation properties, it copies all the required libraries
  -and the default web application so that you just have to fire up your servlet
  -container without doing anything else. Pretty slick, isn't it?
  -
  +overriding the installation properties, it copies the Cocoon war package
  +in the specified directory. Normally the cocoon.war doesn't contain the required
  +libraries so you have to make sure your servlet container has them in your
  +classpath.
  +
  +But this build system allows you to create a complete war file that contains
  +all the required libraries (careful that it gets pretty big) that allows you
  +to install it in your servlet container you just have to fire it up without 
  +doing anything else. Pretty slick, isn't it? To do this you have to set a 
  +variable and this can trigger different behavior of the build system.
  +
  +These are the arguments that count for installation:
  +
  + -Dinclude.webapp.libs=yes     installs the libraries in the war (highly suggested)
  + -Dremove.webapp=yes          removes the uncompressed webapp
  + 
   That's all you have to know to start hacking Cocoon... so what are you 
   waiting for? C'mon, dive in and have fun. 
   
  -                               Happy hacking from the Apache Cocoon Dev Team:)
  +                              Happy hacking from the Apache Cocoon Dev Team :)
   
   ============================================================================ -->
   
  @@ -283,30 +295,43 @@
         <include name="**/*.png"/>
       </copydir>
   
  -    <copydir src="proposals/actions"
  -             dest="${build.war}">
  +    <copydir src="proposals/actions" dest="${build.war}">
         <include name="sitemap.xmap" if="action.present"/>
       </copydir>
     </target>
   
     <!-- =================================================================== -->
  +  <!-- Prepares the libraries for the war package                          -->
  +  <!-- =================================================================== -->
  +  <target name="prepare-webapp-libs" depends="package" if="include.webapp.libs" description="Prepares the libraries for the war package">
  +    <copydir src="${lib.dir}" dest="${build.war}/WEB-INF/lib">
  +      <include name="*.jar"/>
  +      <exclude name="ant*.jar"/>
  +      <exclude name="stylebook*.jar"/>
  +    </copydir>
  +    <!-- NOTE: java.home is normally set by the JVM to the /jre directory -->
  +    <copyfile src="${java.home}/../lib/tools.jar" dest="${build.war}/WEB-INF/lib/javac.jar"/>
  +    <copyfile src="${build.dir}/${name}.jar" dest="${build.war}/WEB-INF/lib/${name}-${version}.jar"/>
  +  </target>
  +
  +  <!-- =================================================================== -->
     <!-- Creates the war file                                                -->
     <!-- =================================================================== -->
  -  <target name="webapp" depends="prepare-webapp" description="Generates the war package">
  +  <target name="webapp" depends="prepare-webapp, prepare-webapp-libs" description="Generates the war package">
       <jar jarfile="${build.dir}/${name}.war" basedir="${build.war}" includes="**"/>
     </target>
   
     <!-- =================================================================== -->
  +  <!-- Removes existing uncompressed webapp                                -->
  +  <!-- =================================================================== -->
  +  <target name="remove-webapp" if="remove.webapp" description="Removes existing uncompressed webapp">
  +    <deltree dir="${install.war}/${name}"/>
  +  </target>
  +  
  +  <!-- =================================================================== -->
     <!-- Installs Cocoon file                                                -->
     <!-- =================================================================== -->
  -  <target name="install" depends="package, webapp" if="install.lib" description="Installs all jar and war packages">
  -    <copydir src="${lib.dir}" dest="${install.lib}">
  -      <include name="*.jar"/>
  -      <exclude name="ant*.jar"/>
  -      <exclude name="stylebook*.jar"/>
  -      <exclude name="servlet*.jar"/>
  -    </copydir>
  -    <copyfile src="${build.dir}/${name}.jar" dest="${install.lib}/${name}.jar"/>
  +  <target name="install" depends="package, webapp, remove-webapp" if="install.war" description="Installs the war package">
       <copyfile src="${build.dir}/${name}.war" dest="${install.war}/${name}.war"/>
     </target>
   
  
  
  

Re: cvs commit: xml-cocoon build.sh build.xml

Posted by Peter Donald <do...@mad.scientist.com>.
At 07:22  19/9/00 +0200, you wrote:
>stefano@locus.apache.org wrote:
>> 
>> stefano     00/09/18 17:25:34
>> 
>>   Modified:    .        Tag: xml-cocoon2 build.sh build.xml
>>   Log:
>>   fixed latest problems with the build process
>> 
>
>I don't know what's wrong but C2 doesn't build anymore. There seems to
>be a problem with Ant. The message of ant is
>
>build.xml:122: Unexpected element "path"
>
>Have you commited the right Ant version ? I don't know how to fix this
>and need it urgently to work ahead. I've done a new update this morning.

I think path was only added post 1.1 ant release so you will have to grab
it from the CVS and compile - I just updated ant a few seconds ago and it
seems to run stable so there shouldn't be too much risk in doing that 

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Re: cvs commit: xml-cocoon build.sh build.xml

Posted by Giacomo Pati <Gi...@pwr.ch>.
stefano@locus.apache.org wrote:
> 
> stefano     00/09/18 17:25:34
> 
>   Modified:    .        Tag: xml-cocoon2 build.sh build.xml
>   Log:
>   fixed latest problems with the build process
> 

I don't know what's wrong but C2 doesn't build anymore. There seems to
be a problem with Ant. The message of ant is

build.xml:122: Unexpected element "path"

Have you commited the right Ant version ? I don't know how to fix this
and need it urgently to work ahead. I've done a new update this morning.

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch