[seam-commits] Seam SVN: r14196 - branches/enterprise/JBPAPP_5_0/build.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Sep 23 08:19:05 EDT 2011


Author: jharting
Date: 2011-09-23 08:19:05 -0400 (Fri, 23 Sep 2011)
New Revision: 14196

Modified:
   branches/enterprise/JBPAPP_5_0/build/validate.xml
Log:
JBPAPP-6384

Modified: branches/enterprise/JBPAPP_5_0/build/validate.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/validate.xml	2011-09-15 17:50:27 UTC (rev 14195)
+++ branches/enterprise/JBPAPP_5_0/build/validate.xml	2011-09-23 12:19:05 UTC (rev 14196)
@@ -1,16 +1,29 @@
 <?xml version="1.0"?>
 <project basedir=".">
-	
+
 	<property name="seam.dir" value="${basedir}" />
-	
-	<property name="java.schema.repository" value="http://java.sun.com/xml/ns"/>
 
+	<condition property="local.repository.schemas" value="
+		urn:jbpm.org:jpdl-3.2 ${schema.repository}/jboss/jpdl-3.2.xsd
+		http://www.w3.org/XML/1998/namespace ${schema.repository}/xml.xsd" else="">
+		<isset property="schema.repository" />
+	</condition>
+	<condition property="jboss.dtd.repository" value="${dtd.repository}" else="http://www.jboss.org/j2ee/dtd">
+		<isset property="dtd.repository" />
+	</condition>
+	<condition property="hibernate.dtd.repository" value="${dtd.repository}" else="http://www.hibernate.org/dtd">
+		<isset property="dtd.repository" />
+	</condition>
+
+	<property name="schema.repository" value="http://java.sun.com/xml/ns" />
+
 	<property name="seam.schemaLocations" value="
 	http://jboss.com/products/seam/async ${src.schema.dir}/async-${schema.version}.xsd 
 	http://jboss.com/products/seam/bpm ${src.schema.dir}/bpm-${schema.version}.xsd 
 	http://jboss.com/products/seam/cache ${src.schema.dir}/cache-${schema.version}.xsd
 	http://jboss.com/products/seam/components ${src.schema.dir}/components-${schema.version}.xsd 
 	http://jboss.com/products/seam/core ${src.schema.dir}/core-${schema.version}.xsd 
+	http://jboss.com/products/seam/document ${src.schema.dir}/document-${schema.version}.xsd
 	http://jboss.com/products/seam/drools ${src.schema.dir}/drools-${schema.version}.xsd 
 	http://jboss.com/products/seam/framework ${src.schema.dir}/framework-${schema.version}.xsd 
 	http://jboss.com/products/seam/international ${src.schema.dir}/international-${schema.version}.xsd 
@@ -27,7 +40,8 @@
 	http://jboss.com/products/seam/theme ${src.schema.dir}/theme-${schema.version}.xsd 
 	http://jboss.com/products/seam/transaction ${src.schema.dir}/transaction-${schema.version}.xsd 
 	http://jboss.com/products/seam/web ${src.schema.dir}/web-${schema.version}.xsd " />
-	
+
+
 	<property name="xsdLocation" value="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd" />
 
 	<taskdef name="xmlvalidate.task" classname="org.apache.tools.ant.taskdefs.optional.XMLValidateTask">
@@ -46,20 +60,22 @@
 		<include name="**/*.jpdl.xml" />
 		<exclude name="**/.gpd.*.jpdl.xml" />
 	</fileset>
-	
+
 	<fileset id="validate.schemas" dir="${seam.dir}">
 		<include name="src/**/*.xsd" />
 	</fileset>
 
 	<target name="validateConfiguration" description="Validate XML Configuration Files">
-		<echo>Using ${java.schema.repository} as a repository for Java XML Schema documents.</echo>
+		<echo>Using ${schema.repository} as a repository for XML Schema documents.</echo>
+		<echo>Using ${jboss.dtd.repository} as a repository for JBoss DTD documents.</echo>
+		<echo>Using ${hibernate.dtd.repository} as a repository for Hibernate DTD documents.</echo>
 		<!-- Validate Java EE namespace descriptors (http://java.sun.com/xml/ns/javaee/) -->
-		<validate.javaee.resource descriptor="application.xml" schema="application_5.xsd" namespace="javaee"/>
-		<validate.javaee.resource descriptor="ejb-jar.xml" schema="ejb-jar_3_0.xsd" namespace="javaee"/>
-		<validate.javaee.resource descriptor="faces-config.xml" schema="web-facesconfig_1_2.xsd" namespace="javaee"/>
-		<validate.javaee.resource descriptor="web.xml" schema="web-app_2_5.xsd" namespace="javaee"/>
-		<validate.javaee.resource descriptor="persistence*.xml" schema="persistence_1_0.xsd" namespace="persistence"/>
-		<validate.javaee.resource descriptor="orm.xml" schema-with-namespace="persistence/orm_1_0.xsd" namespace="persistence/orm"/>
+		<validate.javaee.resource descriptor="application.xml" schema="application_5.xsd" namespace="javaee" />
+		<validate.javaee.resource descriptor="ejb-jar.xml" schema="ejb-jar_3_0.xsd" namespace="javaee" />
+		<validate.javaee.resource descriptor="faces-config.xml" schema="web-facesconfig_1_2.xsd" namespace="javaee" />
+		<validate.javaee.resource descriptor="web.xml" schema="web-app_2_5.xsd" namespace="javaee" />
+		<validate.javaee.resource descriptor="persistence*.xml" schema="persistence_1_0.xsd" namespace="persistence" />
+		<validate.javaee.resource descriptor="orm.xml" schema-with-namespace="persistence/orm_1_0.xsd" namespace="persistence/orm" />
 		<!-- Validate other descriptors -->
 		<validateConfiguration>
 			<resources>
@@ -67,7 +83,7 @@
 			</resources>
 		</validateConfiguration>
 	</target>
-	
+
 	<target name="validatexsd" description="Validate all XML Schemas">
 		<validateConfiguration>
 			<resources>
@@ -77,34 +93,38 @@
 	</target>
 
 	<macrodef name="validateConfiguration">
-		<attribute name="extraSchemaLocation" default=""/>
-		<element name="resources"/>
+		<attribute name="extraSchemaLocation" default="" />
+		<element name="resources" />
 		<sequential>
 			<xmlvalidate.task classname="org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser">
-				<resources/>
+				<resources />
 				<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" />
 				<attribute name="http://apache.org/xml/features/validation/dynamic" value="true" />
-				<property name="http://apache.org/xml/properties/schema/external-schemaLocation" value="${seam.schemaLocations} ${xsdLocation} @{extraSchemaLocation}" />
+				<property name="http://apache.org/xml/properties/schema/external-schemaLocation" value="${seam.schemaLocations} ${local.repository.schemas} ${xsdLocation} @{extraSchemaLocation}" />
 				<xmlcatalog>
 					<dtd publicId="-//JBoss/Seam Component Configuration DTD 2.0//EN" location="${src.schema.dir}/components-${schema.version}.dtd" />
 					<dtd publicId="-//JBoss/Seam Pages Configuration DTD 2.0//EN" location="${src.schema.dir}/pages-${schema.version}.dtd" />
+					<dtd publicId="-//JBoss//DTD J2EE Application 4.2//EN" location="${jboss.dtd.repository}/jboss-app_4_2.dtd" />
+					<dtd publicId="-//JBoss//DTD Web Application 4.2//EN" location="${jboss.dtd.repository}/jboss-web_4_2.dtd" />
+					<dtd publicId="-//JBoss//DTD Web Service Reference 4.2//EN" location="${jboss.dtd.repository}/service-ref_4_2.dtd" />
+					<dtd publicId="-//Hibernate/Hibernate Configuration DTD 3.0//EN" location="${hibernate.dtd.repository}/hibernate-configuration-3.0.dtd" />
 				</xmlcatalog>
 				<classpath>
 					<fileset dir="${seam.dir}/lib" />
 				</classpath>
-				</xmlvalidate.task>
+			</xmlvalidate.task>
 		</sequential>
 	</macrodef>
-	
+
 	<macrodef name="validate.javaee.resource">
-		<attribute name="descriptor"/>
-		<attribute name="namespace"/>
-		<attribute name="schema" default="Schema not set"/>
-		<attribute name="schema-with-namespace" default="@{namespace}/@{schema}"/>
+		<attribute name="descriptor" />
+		<attribute name="namespace" />
+		<attribute name="schema" default="Schema not set" />
+		<attribute name="schema-with-namespace" default="@{namespace}/@{schema}" />
 		<sequential>
-			<validateConfiguration extraSchemaLocation="http://java.sun.com/xml/ns/@{namespace} ${java.schema.repository}/@{schema-with-namespace}">
+			<validateConfiguration extraSchemaLocation="http://java.sun.com/xml/ns/@{namespace} ${schema.repository}/@{schema-with-namespace}">
 				<resources>
 					<fileset dir="${validate.resources.dir}">
 						<include name="**/@{descriptor}" />



More information about the seam-commits mailing list