cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-cocoon2 build.xml
Date Wed, 05 Mar 2003 12:17:15 GMT
crossley    2003/03/05 04:17:15

  Modified:    .        build.xml
  Log:
  Move validate-config stuff into their own targets.
  Allow them to be switched off via build.properties
  
  Revision  Changes    Path
  1.353     +53 -42    xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.352
  retrieving revision 1.353
  diff -u -r1.352 -r1.353
  --- build.xml	5 Mar 2003 08:11:21 -0000	1.352
  +++ build.xml	5 Mar 2003 12:17:15 -0000	1.353
  @@ -129,6 +129,10 @@
       <!-- A task to patch xml files -->
       <taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
   
  +    <!-- Jing is used in various targets for XML validation with RELAX NG -->
  +    <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"
  +             classpathref="classpath"/>
  +
     </target>
   
   <!-- Preparation Targets =================================================== -->
  @@ -148,26 +152,6 @@
       <echo>+-------------------------------------------------------------------------------+</echo>
   
       <mkdir dir="${build}"/>
  -
  -    <!-- Jing is used in various build targets for XML validation
  -      with RELAX NG -->
  -    <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"
  -             classpathref="classpath"/>
  -
  -    <!-- Validate some important core config. Do default config files here,
  -      then do them again after the blocks have been processed. -->
  -    <jing rngfile="./src/webapp/WEB-INF/entities/any.rng">
  -      <fileset dir="./src/webapp/WEB-INF" includes="cocoon.xconf"/>
  -    </jing>
  -    <jing rngfile="./src/webapp/WEB-INF/entities/roles-v01.rng">
  -      <fileset dir="./src/java/org/apache/cocoon" includes="cocoon.roles"/>
  -    </jing>
  -<!-- FIXME: recent sitemap changes have broken validation
  -    <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng">
  -      <fileset dir="./src/webapp" includes="sitemap.xmap"/>
  -    </jing>
  --->
  -
     </target>
   
     <!-- Prepare the build directories -->
  @@ -182,7 +166,7 @@
     <target name="compile" depends="compile-core, compile-scratchpad, compile-deprecated"/>
   
     <!-- compiles the core -->
  -  <target name="compile-core" depends="prepare-core">
  +  <target name="compile-core" depends="validate-core-config,prepare-core">
   
       <!-- copy those files that need to be in the classpath -->
       <copy todir="${build.dest}">
  @@ -646,25 +630,7 @@
       <xpatch directory="${deprecated.conf}" extension="xconf" configuration="${build.webapp}/WEB-INF/cocoon.xconf"/>
     </target>
     
  -  <target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-deprecated">
  -
  -    <!-- Validate some important core config. -->
  -    <jing rngfile="${build.webapp}/WEB-INF/entities/any.rng">
  -      <fileset dir="${build.webapp}/WEB-INF" includes="cocoon.xconf"/>
  -    </jing>
  -<!-- FIXME: precept.xroles has a new un-defined attribute "default-hint"
  -     which is breaking validation.
  -    <jing rngfile="${build.webapp}/WEB-INF/entities/roles-v01.rng">
  -      <fileset dir="${build}/classes/org/apache/cocoon"
  -               includes="cocoon.roles"/>
  -    </jing>
  --->
  -<!-- FIXME: recent sitemap changes have broken validation
  -    <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng">
  -      <fileset dir="${build.webapp}" includes="sitemap.xmap"/>
  -    </jing>
  --->
  -  </target>
  +  <target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-deprecated,validate-config"/>
   
     <target name="war" depends="webapp">
       <!-- A task to create manifest for webapp. -->
  @@ -711,6 +677,51 @@
       </xslt>
     </target>
   
  +  <!-- Validate some important default core configuration files. Process the
  +       default config files here, then do them again later in validate-config
  +       after the blocks have been processed and fragments added.
  +  -->
  +  <target name="validate-core-config" depends="prepare"
  +          description="Validation of default core configuration files using RELAX NG"
  +          if="validate.config">
  +    <echo message="Conducting validation of default core configuration files."/>
  +    <echo message="(You can turn validation off if you must - comment out the validate.config
property in build.properties)"/>
  +    <jing rngfile="./src/webapp/WEB-INF/entities/any.rng">
  +      <fileset dir="./src/webapp/WEB-INF" includes="cocoon.xconf"/>
  +    </jing>
  +    <jing rngfile="./src/webapp/WEB-INF/entities/roles-v01.rng">
  +      <fileset dir="./src/java/org/apache/cocoon" includes="cocoon.roles"/>
  +    </jing>
  +<!-- FIXME: recent sitemap changes have broken validation
  +    <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng">
  +      <fileset dir="./src/webapp" includes="sitemap.xmap"/>
  +    </jing>
  +-->
  +  </target>
  +
  +  <!-- Validate some important final configuration files. At this stage
  +       the fragments from blocks have been added to the default core config.
  +  -->
  +  <target name="validate-config" if="validate.config">
  +    <echo message="Conducting validation of final configuration files."/>
  +    <echo message="(You can turn validation off if you must - comment out the validate.config
property in build.properties)"/>
  +    <jing rngfile="${build.webapp}/WEB-INF/entities/any.rng">
  +      <fileset dir="${build.webapp}/WEB-INF" includes="cocoon.xconf"/>
  +    </jing>
  +<!-- FIXME: precept.xroles has a new un-defined attribute "default-hint"
  +     which is breaking validation.
  +    <jing rngfile="${build.webapp}/WEB-INF/entities/roles-v01.rng">
  +      <fileset dir="${build}/classes/org/apache/cocoon"
  +               includes="cocoon.roles"/>
  +    </jing>
  +-->
  +<!-- FIXME: recent sitemap changes have broken validation
  +    <jing rngfile="${build.webapp}/WEB-INF/entities/sitemap-v06.rng">
  +      <fileset dir="${build.webapp}" includes="sitemap.xmap"/>
  +    </jing>
  +-->
  +  </target>
  +
     <!-- Validation of xdocs  -->
     <!-- This only does documentation/xdocs/**.xml and does not attempt to do
          webapps, blocks, java, etc. because most of their xdocs do not bother
  @@ -720,7 +731,7 @@
             depends="prepare-docs"
             if="validate.xdocs">
       <echo message="Conducting validation of core XML documentation."/>
  -    <echo message="(You can turn validation off if you must, commenting out the validate.xdocs
property)"/>
  +    <echo message="(You can turn validation off if you must - comment out the validate.xdocs
property in build.properties)"/>
   
       <echo message="Validating all **/book.xml instances using RELAX NG ..."/>
       <jing rngfile="${webapp}/WEB-INF/entities/book-v01.rng">
  
  
  

Mime
View raw message