forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/forrest-shbat forrest.build.xml
Date Mon, 11 Nov 2002 06:36:14 GMT
jefft       2002/11/10 22:36:14

  Modified:    .        status.xml
               src/resources/forrest-shbat forrest.build.xml
  Log:
  Validate that the ${project.skin} property points to a real skin
  
  Revision  Changes    Path
  1.45      +6 -2      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- status.xml	11 Nov 2002 05:25:55 -0000	1.44
  +++ status.xml	11 Nov 2002 06:36:14 -0000	1.45
  @@ -94,12 +94,16 @@
        tools as forrestbar, config files for XMetaL, etc.
       </action>
      </actions>    
  -  </todo>
  + </todo>
  +
  + <!-- ...................................................................... -->
  + <!-- Changes                                                                -->
  + <!-- ...................................................................... -->
   
     <changes>
      <release version="0.1" date="2002">
       <action dev="JT" type="add" context="build">
  -     Validate project sitemaps
  +     Validate project sitemaps and choice of skin
       </action> 
       <action dev="DC" type="add" context="build">
        Validation of important core configuration files at build-time using
  
  
  
  1.18      +31 -5     xml-forrest/src/resources/forrest-shbat/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- forrest.build.xml	11 Nov 2002 05:22:32 -0000	1.17
  +++ forrest.build.xml	11 Nov 2002 06:36:14 -0000	1.18
  @@ -208,8 +208,8 @@
     <!-- Load properties from Forrest's default skinconf.xml, unless a user's is defined
-->
     <target name="load-forrest-props" unless="skinconf.present">
       <xmlproperty file="${forrest.home}/context/skinconf.xml"
  -      collapseattributes="true" validate="true"/> <!-- Assume Forrest skinconf is
valid -->
  -<!-- FIXME: remove wild assumption -->
  +      collapseattributes="true" validate="true"/>
  +    <!-- Forrest skinconf should have been previously validated in buld.xml -->
     </target>
   
     <!-- Define filters equating to elements in the skinconf.xml file. Skins can
  @@ -540,10 +540,10 @@
      -->
   
      <target name="site" depends="prepare-context, -site"
  -     if="project.content.present"
        description="Generates a static HTML website for this project"/>
   
  -   <target name="-site" depends="init, -prepare-classpath">
  +   <target name="-site" depends="init, -prepare-classpath"
  +     if="project.content.present">
       <!-- clean out the temp space, if we don't cocoon fails on this
            actually clears the cache, not yet clear why it is really needed? -->
       <delete dir="${project.work-dir}"/>
  @@ -707,7 +707,7 @@
   
   
     <target name="validate" depends="validation-props, validate-xdocs,
  -    validate-skinconf, validate-sitemap, validate-skins,
  +    validate-skinconf, validate-sitemap, validate-skins, validate-skinchoice,
       validate-stylesheets"  description="Validates XML doc files in the project"/>
   
     <target name="validate-xdocs" depends="validation-props" if="validate.xdocs">
  @@ -767,6 +767,32 @@
           excludes="${forrest.validate.skins.stylesheets.excludes}"/>
       </jing>
       <echo message="...validated skin stylesheets"/>
  +  </target>
  +
  +  <!-- Check that ${project.skin} points to an existing skin. -->
  +  <target name="validate-skinchoice">
  +    <condition property="project.skin.present">
  +      <available file="${project.skin}" type="dir">
  +        <filepath path="${project.skins-dir}"/>
  +        <filepath path="${forrest.home}/context/skins"/>
  +      </available>
  +    </condition>
  +
  +    <fail unless="project.skin.present">
  +------------------------------------------------
  +Error: The skin '${project.skin}' could not be found in:
  +
  +${project.skins-dir}
  +
  +And is not provided by Forrest in
  +
  +${forrest.home}/context/skins
  +
  +Please check the $${project.skins-dir} and $${project.skin} properties in
  +forrest.properties.
  +------------------------------------------------
  +    </fail>
  +    <echo message="...validated existence of skin '${project.skin}'"/>
     </target>
     
     
  
  
  

Mime
View raw message