[jboss-cvs] jboss-seam ...
Peter Muir
peter at bleepbleep.org.uk
Sun Jun 24 21:02:30 EDT 2007
User: pmuir
Date: 07/06/24 21:02:30
Modified: jboss-seam build.xml
Added: jboss-seam validate.xml
Log:
Minor fixes to xsds, xml config file validation
Revision Changes Path
1.207 +8 -46 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.206
retrieving revision 1.207
diff -u -b -r1.206 -r1.207
--- build.xml 24 Jun 2007 22:26:29 -0000 1.206
+++ build.xml 25 Jun 2007 01:02:30 -0000 1.207
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
-
+<!DOCTYPE project [
+ <!ENTITY validate SYSTEM "./validate.xml">
+]>
<project name="Seam" default="build" basedir=".">
+
<tstamp />
<!-- Allow this to be overriden by others importing this project. -->
@@ -52,6 +55,7 @@
<property name="src.java.dir" value="src/main" />
<property name="src.ui.dir" value="ui/src" />
+ <property name="src.schema.dir" value="${imported.basedir}/src/main/org/jboss/seam" />
<property name="ui.dir" value="ui" />
<property name="src.pdf.dir" value="src/pdf" />
<property name="src.ioc.dir" value="src/ioc" />
@@ -249,25 +253,6 @@
<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>
@@ -428,6 +413,9 @@
<!-- ############################ Targets #############################-->
+ <!-- Import Configuration File Validation Task -->
+ &validate;
+
<target name="clean" description="Cleans up the build directory">
<delete dir="${build.dir}" />
<delete dir="test-output" />
@@ -1368,30 +1356,4 @@
<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>
-
</project>
1.1 date: 2007/06/25 01:02:30; author: pmuir; state: Exp;jboss-seam/validate.xml
Index: validate.xml
===================================================================
<property name="seam.schemaLocations" value="
http://jboss.com/products/seam/async ${src.schema.dir}/async-${version}.xsd
http://jboss.com/products/seam/bpm ${src.schema.dir}/bpm-${version}.xsd
http://jboss.com/products/seam/components ${src.schema.dir}/components-${version}.xsd
http://jboss.com/products/seam/core ${src.schema.dir}/core-${version}.xsd
http://jboss.com/products/seam/drools ${src.schema.dir}/drools-${version}.xsd
http://jboss.com/products/seam/framework ${src.schema.dir}/framework-${version}.xsd
http://jboss.com/products/seam/international ${src.schema.dir}/international-${version}.xsd
http://jboss.com/products/seam/jms ${src.schema.dir}/jms-${version}.xsd
http://jboss.com/products/seam/mail ${src.schema.dir}/mail-${version}.xsd
http://jboss.com/products/seam/navigation ${src.schema.dir}/navigation-${version}.xsd
http://jboss.com/products/seam/pages ${src.schema.dir}/pages-${version}.xsd
http://jboss.com/products/seam/pdf ${src.schema.dir}/pdf-${version}.xsd
http://jboss.com/products/seam/persistence ${src.schema.dir}/persistence-${version}.xsd
http://jboss.com/products/seam/remoting ${src.schema.dir}/remoting-${version}.xsd
http://jboss.com/products/seam/security ${src.schema.dir}/security-${version}.xsd
http://jboss.com/products/seam/theme ${src.schema.dir}/theme-${version}.xsd
http://jboss.com/products/seam/transaction ${src.schema.dir}/transaction-${version}.xsd
http://jboss.com/products/seam/web ${src.schema.dir}/web-${version}.xsd "
/>
<taskdef name="xmlvalidate.task" classname="org.apache.tools.ant.taskdefs.optional.XMLValidateTask" classpathref="build.classpath" />
<fileset id="validate.resources" dir="${basedir}/resources">
<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" />
<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" />
<include name="*.jpdl.xml"/>
<exclude name=".gpd.*.jpdl.xml"/>
</fileset>
<target name="validate.conf" description="Validate XML Configuration Files">
<validateConfiguration>
<fileset refid="validate.resources" />
</validateConfiguration>
</target>
<presetdef name="validateConfiguration">
<xmlvalidate.task>
<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" />
<property name="http://apache.org/xml/properties/schema/external-schemaLocation" value="${seam.schemaLocations}" />
<xmlcatalog>
<dtd
publicId="-//JBoss/Seam Component Configuration DTD 1.3//EN"
location="${src.schema.dir}/components-${version}.dtd"/>
<dtd
publicId="-//JBoss/Seam Pages Configuration DTD 1.3//EN"
location="${src.schema.dir}/pages-${version}.dtd"/>
</xmlcatalog>
</xmlvalidate.task>
</presetdef>
More information about the jboss-cvs-commits
mailing list