[jboss-cvs] jboss-seam ...
Peter Muir
peter at bleepbleep.org.uk
Mon Jun 25 15:14:29 EDT 2007
User: pmuir
Date: 07/06/25 15:14:29
Modified: jboss-seam build.properties.sample build.xml validate.xml
Log:
validate using antcall, only validate if property set
Revision Changes Path
1.6 +2 -1 jboss-seam/build.properties.sample
(In the diff below, changes in quantity of whitespace are not shown.)
Index: build.properties.sample
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/build.properties.sample,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- build.properties.sample 25 Jun 2007 16:41:18 -0000 1.5
+++ build.properties.sample 25 Jun 2007 19:14:29 -0000 1.6
@@ -4,3 +4,4 @@
#tomcat.home = C:\\Tomcat-6.0
version = 2.0
patchlevel = 0.BETA1
\ No newline at end of file
+#validate.xml=true
\ No newline at end of file
1.212 +11 -11 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.211
retrieving revision 1.212
diff -u -b -r1.211 -r1.212
--- build.xml 25 Jun 2007 17:35:02 -0000 1.211
+++ build.xml 25 Jun 2007 19:14:29 -0000 1.212
@@ -1,7 +1,4 @@
<?xml version="1.0"?>
-<!DOCTYPE project [
- <!ENTITY validate SYSTEM "./validate.xml">
-]>
<project name="Seam" default="build" basedir=".">
<tstamp />
@@ -135,6 +132,10 @@
<property name="example.ds" value="${example.name}-ds.xml" />
<property name="validate.resources.dir" value="${example.resources.dir}" />
+ <condition property="validate.xml.enabled">
+ <istrue value="${validate.xml}"/>
+ </condition>
+
<path id="example.path" />
<fileset id="example.local.jar" dir=".">
<exclude name="**/*" />
@@ -430,9 +431,6 @@
<!-- ############################ Targets #############################-->
- <!-- Import Configuration File Validation Task -->
- &validate;
-
<target name="clean" description="Cleans up the build directory">
<delete dir="${build.dir}" />
<delete dir="test-output" />
@@ -767,7 +765,9 @@
<echo>Report available at ${basedir}/report/index.html</echo>
</target>
- <target name="testexample" depends="validateConfiguration, compile" description="Run the example tests">
+ <target name="testexample" depends="validateexample, compile" description="Run the example tests">
+
+
<taskdef resource="testngtasks" classpath="${testng.jar}" />
@@ -790,6 +790,10 @@
</target>
+ <target name="validateexample" description="Validate the example configuration files" if="validate.xml.enabled">
+ <ant antfile="${imported.basedir}/validate.xml" target="validateConfiguration" />
+ </target>
+
<target name="copysource" description="Copy sources to dist dir">
<mkdir dir="${dist.src.java.dir}" />
<copy todir="${dist.src.java.dir}">
@@ -1376,8 +1380,4 @@
<delete dir="${tomcat.home}/webapps/${example.name}" />
</target>
- <target name="initValidateConfiguration">
-
- </target>
-
</project>
1.3 +50 -42 jboss-seam/validate.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: validate.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/validate.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- validate.xml 25 Jun 2007 13:16:23 -0000 1.2
+++ validate.xml 25 Jun 2007 19:14:29 -0000 1.3
@@ -1,4 +1,9 @@
-<property name="seam.schemaLocations" value="
+<?xml version="1.0"?>
+<project basedir=".">
+
+ <property name="imported.basedir" value="${basedir}" />
+
+ <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/components ${src.schema.dir}/components-${schema.version}.xsd
@@ -17,47 +22,50 @@
http://jboss.com/products/seam/security ${src.schema.dir}/security-${schema.version}.xsd
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 "
-/>
+ http://jboss.com/products/seam/web ${src.schema.dir}/web-${schema.version}.xsd " />
-<taskdef name="xmlvalidate.task" classname="org.apache.tools.ant.taskdefs.optional.XMLValidateTask" classpathref="build.classpath" />
+ <taskdef name="xmlvalidate.task" classname="org.apache.tools.ant.taskdefs.optional.XMLValidateTask">
+ <classpath>
+ <fileset dir="${imported.basedir}/lib" />
+ </classpath>
+ </taskdef>
-<fileset id="validate.resources" dir="${validate.resources.dir}">
+ <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/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>
+ <include name="**/*.jpdl.xml" />
+ <exclude name="**/.gpd.*.jpdl.xml" />
+ </fileset>
-<target name="validateConfiguration" depends="initValidateConfiguration" description="Validate XML Configuration Files">
+ <target name="validateConfiguration" description="Validate XML Configuration Files">
<validateConfiguration>
<fileset refid="validate.resources" />
</validateConfiguration>
-</target>
+ </target>
-<presetdef name="validateConfiguration">
- <xmlvalidate.task>
+ <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}" />
<xmlcatalog>
- <dtd
- publicId="-//JBoss/Seam Component Configuration DTD 1.3//EN"
- location="${src.schema.dir}/components-${schema.version}.dtd"/>
- <dtd
- publicId="-//JBoss/Seam Pages Configuration DTD 1.3//EN"
- location="${src.schema.dir}/pages-${schema.version}.dtd"/>
+ <dtd publicId="-//JBoss/Seam Component Configuration DTD 1.3//EN" location="${src.schema.dir}/components-${schema.version}.dtd" />
+ <dtd publicId="-//JBoss/Seam Pages Configuration DTD 1.3//EN" location="${src.schema.dir}/pages-${schema.version}.dtd" />
</xmlcatalog>
+ <classpath>
+ <fileset dir="${imported.basedir}/lib" />
+ </classpath>
</xmlvalidate.task>
-</presetdef>
\ No newline at end of file
+ </presetdef>
+</project>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list