forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject cvs commit: xml-forrest build.build.xml forrest.build.xml
Date Mon, 09 Sep 2002 14:59:21 GMT
stevenn     2002/09/09 07:59:21

  Modified:    .        build.build.xml forrest.build.xml
  Log:
  unpackaged webapp target contributed by Jeff Turner - jefft@apache.org
  
  Revision  Changes    Path
  1.6       +12 -1     xml-forrest/build.build.xml
  
  Index: build.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.build.xml	25 Aug 2002 03:04:26 -0000	1.5
  +++ build.build.xml	9 Sep 2002 14:59:21 -0000	1.6
  @@ -391,7 +391,18 @@
       <property name="forrest.home" value="${dist-shbat.dir}" />
       <ant antfile="${forrest.home}/forrest.build.xml" target="webapp">
         <property name="project.home"     value="."            />
  -      <property name="project.war" value="./build/forrest.war" />
  +      <property name="project.webapp" value="./build/webapp" />
  +    </ant>
  +  </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- Generate a .war files of the project-site                           -->
  +  <!-- =================================================================== -->
  +  <target name="war" depends="dist-shbat">
  +    <property name="forrest.home" value="${dist-shbat.dir}" />
  +    <ant antfile="${forrest.home}/forrest.build.xml" target="war">
  +      <property name="project.home"     value="."            />
  +      <property name="project.war" value="./build/${name}.war" />
       </ant>
     </target>
   
  
  
  
  1.7       +37 -3     xml-forrest/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/forrest.build.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- forrest.build.xml	27 Aug 2002 06:07:10 -0000	1.6
  +++ forrest.build.xml	9 Sep 2002 14:59:21 -0000	1.7
  @@ -43,8 +43,8 @@
     
       <!-- setting defaults for parameters -->
       <!-- people should use -D switch, or <ant><property>s to override these
  -->
  -    <property name="forrest.home" value="." />
  -    <property name="project.home" value="." />
  +    <property name="forrest.home" location="." />
  +    <property name="project.home" location="." />
   
       <!-- people should use forrest.properties to override following defaults  -->
       <echo message="Loading project specific properties from ${project.home}/forrest.properties"
/>
  @@ -52,6 +52,7 @@
   
       <property name="project.site-dir"    value="${project.home}/build/site"    />
       <property name="project.war"         value="${project.home}/build/my-project.war"
/>
  +    <property name="project.webapp"      value="${project.home}/build/webapp" />
       <property name="project.siteplan"    value="${project.home}/siteplan.xml"  />
   
       <property name="project.temp-dir"    value="${project.home}/build/tmp"     />
  @@ -327,12 +328,45 @@
     </target>
   
   
  +  <target name="project.webapp.defined" unless="project.webapp">
  +    <echo>
  +      ------------------------------------------------
  +      Error: $${project.webapp} variable has not been set. This is where the
  +      webapp will be assembled. Please define it in the calling script.
  +      ------------------------------------------------
  +    </echo>
  +    <fail message="project.webapp variable not set"/>
  +  </target>
  +
  +  <!-- ===============================================================
  +       Builds a cocoon webapp for your project based on the siteplan.
  +       param: location to put generated webapp ${project.webapp}
  +       =============================================================== -->
  +  <target name="webapp" depends="init, project.webapp.defined, prepare-context">
  +    <!-- this will need revisions in the case of the siteplan
  +    extra project-custom classes then will need to be warred in as well. -->
  +    <mkdir dir="${project.webapp}/WEB-INF"/>
  +    <copy file="${forrest.home}/WEB-INF/web.xml" todir="${project.webapp}/WEB-INF"/>
  +    <copy todir="${project.webapp}">
  +      <fileset dir="${project.ctxt-dir}" >
  +        <exclude name="*.xconf" /> <!-- CLI wants them there, webapp finds them
in WEB-INF -->
  +      </fileset>
  +    </copy>
  +    <copy todir="${project.webapp}/WEB-INF">
  +      <fileset dir="${forrest.home}/WEB-INF">
  +        <include name="*.xconf" />
  +        <include name="lib/**"/>
  +        <include name="classes/**"/>
  +      </fileset>
  +    </copy>
  +  </target>
  +
     <!-- ===============================================================
          Builds a cocoon webapp for your project based on the siteplan.
          param: location of siteplan ${project.siteplan}
          param: location to put generated war ${project.war}
          =============================================================== -->
  -  <target name="webapp" depends="init, prepare-context">
  +  <target name="war" depends="init, prepare-context">
       <!-- this will need revisions in the case of the siteplan
            extra project-custom classes then will need to be warred in as well. -->
       <war warfile="${project.war}"
  
  
  

Mime
View raw message