summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorknut <>2006-02-23 18:49:14 +0000
committerknut <>2006-02-23 18:49:14 +0000
commit790954df7b3959af479a71bae0905c1c11a56fb7 (patch)
tree1b75aad5ebfadcf82f95965447fbf56dc21867f8 /build.xml
parent088c6a09d6c1f230060e98ea98dcfb8f69025af6 (diff)
Created an XmlLintTask to validate configuration against XML Schema Definitions and a new target lint-demos to check both syntax of demo configuration and PHP source files
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml28
1 files changed, 27 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 3fac96b5..e0ea5fd6 100644
--- a/build.xml
+++ b/build.xml
@@ -32,8 +32,11 @@
<property name="reports.style.dir" value="buildscripts/phing/style"/>
<property name="reports.geshi.dir" value="${src.dir}/3rdParty/geshi"/>
<property name="prado.lite" value="pradolite.php"/>
+ <property name="application.xsd" value="${src.dir}/Specs/application.xsd"/>
+ <property name="config.xsd" value="${src.dir}/Specs/config.xsd"/>
<taskdef name="phplint" classname="PhpLintTask" classpath="buildscripts/phing/tasks"/>
+ <taskdef name="xmllint" classname="XmlLintTask" classpath="buildscripts/phing/tasks"/>
<fileset dir="." id="src">
<exclude name="${src.dir}/**/.svn"/>
@@ -82,6 +85,29 @@
</phplint>
</target>
+ <target name="lint-demos" description="Check syntax of demo files and configuration files">
+ <echo>Validate application configuration</echo>
+ <xmllint schema="${application.xsd}">
+ <fileset dir="demos">
+ <exclude name="**/.svn"/>
+ <include name="**/application.xml"/>
+ </fileset>
+ </xmllint>
+ <echo>Validate page configuration</echo>
+ <xmllint schema="${config.xsd}">
+ <fileset dir="demos">
+ <exclude name="**/.svn"/>
+ <include name="**/config.xml"/>
+ </fileset>
+ </xmllint>
+ <phplint>
+ <fileset dir="demos">
+ <exclude name="**/.svn"/>
+ <include name="**/*.php"/>
+ </fileset>
+ </phplint>
+ </target>
+
<target name="prepare" description="Prepare directory layout for build">
<phingcall target="clean"/>
<mkdir dir="${build.base.dir}"/>
@@ -157,7 +183,7 @@
</copy>
</target>
- <target name="build" depends="versioncheck,prepare,lint,test,doc,pradolite,build-standard-package" description="Creating the main PRADO build">
+ <target name="build" depends="versioncheck,prepare,lint,lint-demos,test,doc,pradolite,build-standard-package" description="Creating the main PRADO build">
</target>
<target name="dist" depends="build" description="Create PRADO distributions">