[jboss-cvs] jboss-seam ...

Peter Muir peter at bleepbleep.org.uk
Sun Jun 24 17:37:55 EDT 2007


  User: pmuir   
  Date: 07/06/24 17:37:55

  Modified:    jboss-seam  build.xml
  Log:
  Add xml validation of config files to examples
  
  Revision  Changes    Path
  1.204     +52 -1     jboss-seam/build.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/build.xml,v
  retrieving revision 1.203
  retrieving revision 1.204
  diff -u -b -r1.203 -r1.204
  --- build.xml	24 Jun 2007 11:58:09 -0000	1.203
  +++ build.xml	24 Jun 2007 21:37:55 -0000	1.204
  @@ -249,6 +249,25 @@
   		<include name="*.drl" />
   	</zipfileset>
   
  +	<fileset id="example.validate.resources" dir="${example.resources.dir}">
  +		<include name="META-INF/application.xml" />
  +		<include name="META-INF/ejb-jar.xml" />
  +		<include name="META-INF/persistence.xml" />
  +		<include name="META-INF/jboss-app.xml" />
  +		<include name="META-INF/orm.xml" />
  +		<!-- Don't enable for now, as there is no way to tell it to use an alternative schema -->
  +		<!--<include name="WEB-INF/components.xml"/>-->
  +		<!--<include name="WEB-INF/pages.xml"/>-->
  +		<include name="WEB-INF/faces-config.xml"/>
  +		<include name="WEB-INF/web.xml"/>
  +		<include name="WEB-INF/jboss-web.xml"/>
  +		<include name="${example.ds}"/>
  +		<include name="hibernate.cfg.xml"/>
  +		<!-- Don't enable for now, as there is no way to tell it to use an alternative schema -->
  +		<!--<include name="*.jpdl.xml"/>-->
  +		<!--<exclude name=".gpd.*.jpdl.xml"/>-->
  +	</fileset>
  +
   	<fileset id="example.deploy" dir="${example.resources.dir}">
   		<include name="${example.ds}" />
   	</fileset>
  @@ -743,7 +762,7 @@
   		<echo>Report available at ${basedir}/report/index.html</echo>
   	</target>
   
  -	<target name="testexample" depends="compile" description="Run the example tests">
  +	<target name="testexample" depends="compile, validate.xml" description="Run the example tests">
   
   		<taskdef resource="testngtasks" classpath="${testng.jar}" />
   
  @@ -1349,4 +1368,36 @@
   		<delete dir="${tomcat.home}/webapps/${example.name}" />
   	</target>
   
  +	<pathconvert dirsep="/" property="components.xsd.file">
  +		<path>
  +		   	<pathelement location="${imported.basedir}/src/main/org/jboss/seam/components-${version}.xsd"/>
  +		</path>
  +	</pathconvert>
  +	
  +	<pathconvert dirsep="/" property="core.xsd.file">
  +			<path>
  +			   	<pathelement location="${imported.basedir}/src/main/org/jboss/seam/core-${version}.xsd"/>
  +			</path>
  +		</pathconvert>
  +	
  +	<presetdef name="xmlvalidate.xsd">
  +		<xmlvalidate>
  +			  <attribute name="http://xml.org/sax/features/validation" value="true"/>
  +			  <attribute name="http://apache.org/xml/features/validation/schema"  value="true"/>
  +			  <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
  +		</xmlvalidate>
  +	</presetdef>
  +	
  +	<target name="validate.xml">
  +		<xmlvalidate.xsd>
  +			<fileset refid="example.validate.resources"/>
  +		</xmlvalidate.xsd>
  +	</target>
  +	
  +	
  +	
  +	<xmlcatalog>
  +		
  +</xmlcatalog>
  +
   </project>
  
  
  



More information about the jboss-cvs-commits mailing list