[seam-commits] Seam SVN: r14083 - in branches/enterprise/JBPAPP_5_0: build and 4 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Apr 21 10:24:59 EDT 2011


Author: jharting
Date: 2011-04-21 10:24:58 -0400 (Thu, 21 Apr 2011)
New Revision: 14083

Modified:
   branches/enterprise/JBPAPP_5_0/build.xml
   branches/enterprise/JBPAPP_5_0/build/validate.xml
   branches/enterprise/JBPAPP_5_0/examples/build.xml
   branches/enterprise/JBPAPP_5_0/examples/dvdstore/build.xml
   branches/enterprise/JBPAPP_5_0/examples/quartz/build.xml
   branches/enterprise/JBPAPP_5_0/examples/seampay/build.xml
Log:
JBPAPP-6384

Modified: branches/enterprise/JBPAPP_5_0/build/validate.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/validate.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/build/validate.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -2,10 +2,13 @@
 <project basedir=".">
 	
 	<property name="seam.dir" value="${basedir}" />
+	
+	<property name="java.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/drools ${src.schema.dir}/drools-${schema.version}.xsd 
@@ -34,15 +37,9 @@
 	</taskdef>
 
 	<fileset id="validate.resources" dir="${validate.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" />
 		<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" />
@@ -55,30 +52,65 @@
 	</fileset>
 
 	<target name="validateConfiguration" description="Validate XML Configuration Files">
+		<echo>Using ${java.schema.repository} as a repository for Java XML Schema 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 other descriptors -->
 		<validateConfiguration>
-			<fileset refid="validate.resources" />
+			<resources>
+				<fileset refid="validate.resources" />
+			</resources>
 		</validateConfiguration>
 	</target>
 	
 	<target name="validatexsd" description="Validate all XML Schemas">
 		<validateConfiguration>
-			<fileset refid="validate.schemas" />
+			<resources>
+				<fileset refid="validate.schemas" />
+			</resources>
 		</validateConfiguration>
 	</target>
 
-	<presetdef name="validateConfiguration" >
-		<xmlvalidate.task classname="org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser">
-			<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} ${xsdLocation}" />
-			<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" />
-			</xmlcatalog>
-			<classpath>
-				<fileset dir="${seam.dir}/lib" />
-			</classpath>
-		</xmlvalidate.task>
-	</presetdef>
+	<macrodef name="validateConfiguration">
+		<attribute name="extraSchemaLocation" default=""/>
+		<element name="resources"/>
+		<sequential>
+			<xmlvalidate.task classname="org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser">
+				<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}" />
+				<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" />
+				</xmlcatalog>
+				<classpath>
+					<fileset dir="${seam.dir}/lib" />
+				</classpath>
+				</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}"/>
+		<sequential>
+			<validateConfiguration extraSchemaLocation="http://java.sun.com/xml/ns/@{namespace} ${java.schema.repository}/@{schema-with-namespace}">
+				<resources>
+					<fileset dir="${validate.resources.dir}">
+						<include name="**/@{descriptor}" />
+					</fileset>
+				</resources>
+			</validateConfiguration>
+		</sequential>
+	</macrodef>
 </project>
\ No newline at end of file

Modified: branches/enterprise/JBPAPP_5_0/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/build.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -457,33 +457,33 @@
 	<target name="testall" depends="test,build,copylib,testexamples" description="Run the core unit tests and all example tests"/>
 
 	<target name="validateall" description="Validate all example XML Configuration Files">
-		<ant antfile="${seam.dir}/build/validate.xml" target="validatexsd"/>
-		<ant dir="examples/booking" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/blog" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/contactlist" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/dvdstore" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/drools" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/excel" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/groovybooking" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/itext" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/openid" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/mail" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/messages" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/nestedbooking" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/numberguess" target="validateConfiguration" inheritall="false" />
-		<!--<ant dir="examples/quartz" target="validateConfiguration" inheritall="false" />-->
-		<ant dir="examples/registration" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/remoting/chatroom" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/remoting/gwt" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/remoting/helloworld" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/seambay" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/restbay" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/seamdiscs" target="validateConfiguration" inheritall="false" />
-		<!--<ant dir="examples/seampay" target="validateConfiguration" inheritall="false" />-->
-		<ant dir="examples/seamspace" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/tasks" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/todo" target="validateConfiguration" inheritall="false" />
-		<ant dir="examples/ui" target="validateConfiguration" inheritall="false" />
+		<!--<ant antfile="${seam.dir}/build/validate.xml" target="validatexsd"/>-->
+		<ant dir="examples/booking" target="validateConfiguration"/>
+		<ant dir="examples/blog" target="validateConfiguration"/>
+		<ant dir="examples/contactlist" target="validateConfiguration"/>
+		<ant dir="examples/dvdstore" target="validateConfiguration"/>
+		<ant dir="examples/drools" target="validateConfiguration"/>
+		<ant dir="examples/excel" target="validateConfiguration"/>
+		<ant dir="examples/groovybooking" target="validateConfiguration"/>
+		<ant dir="examples/itext" target="validateConfiguration"/>
+		<ant dir="examples/openid" target="validateConfiguration"/>
+		<ant dir="examples/mail" target="validateConfiguration"/>
+		<ant dir="examples/messages" target="validateConfiguration"/>
+		<ant dir="examples/nestedbooking" target="validateConfiguration"/>
+		<ant dir="examples/numberguess" target="validateConfiguration"/>
+		<ant dir="examples/quartz" target="validateConfiguration"/>
+		<ant dir="examples/registration" target="validateConfiguration"/>
+		<ant dir="examples/remoting/chatroom" target="validateConfiguration"/>
+		<ant dir="examples/remoting/gwt" target="validateConfiguration"/>
+		<ant dir="examples/remoting/helloworld" target="validateConfiguration"/>
+		<ant dir="examples/seambay" target="validateConfiguration"/>
+		<ant dir="examples/restbay" target="validateConfiguration"/>
+		<ant dir="examples/seamdiscs" target="validateConfiguration"/>
+		<ant dir="examples/seampay" target="validateConfiguration"/>
+		<ant dir="examples/seamspace" target="validateConfiguration"/>
+		<ant dir="examples/tasks" target="validateConfiguration"/>
+		<ant dir="examples/todo" target="validateConfiguration"/>
+		<ant dir="examples/ui" target="validateConfiguration"/>
 	</target>
 
 

Modified: branches/enterprise/JBPAPP_5_0/examples/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/build.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/examples/build.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -893,7 +893,7 @@
 	-->
 
 	<target name="validateConfiguration" description="Validate XML Configuration files">
-		<echo message="Validating configuaration files for ${Name}" />
+		<echo message="Validating configuration files for ${Name}" />
 		<ant antfile="${build.dir}/validate.xml" target="validateConfiguration">
 			<reference refid="validate.resources" />
 		</ant>

Modified: branches/enterprise/JBPAPP_5_0/examples/dvdstore/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/dvdstore/build.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/examples/dvdstore/build.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -19,22 +19,4 @@
 
 	<import file="../build.xml" />
 
-	<!-- Exclude the DS from validated files, as the mbean causes it not to validate -->
-	<fileset id="validate.resources" dir="${validate.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" />
-		<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>
-
 </project>

Modified: branches/enterprise/JBPAPP_5_0/examples/quartz/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/quartz/build.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/examples/quartz/build.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -20,15 +20,9 @@
     </patternset>
 	
 	<fileset id="validate.resources" dir="${validate.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" />
 		<!--<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" />

Modified: branches/enterprise/JBPAPP_5_0/examples/seampay/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seampay/build.xml	2011-04-21 14:07:33 UTC (rev 14082)
+++ branches/enterprise/JBPAPP_5_0/examples/seampay/build.xml	2011-04-21 14:24:58 UTC (rev 14083)
@@ -14,15 +14,9 @@
     <import file="../build.xml"/>
 	
 	<fileset id="validate.resources" dir="${validate.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" />
 		<!--<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" />



More information about the seam-commits mailing list