You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/10/28 05:58:44 UTC
DO NOT REPLY [Bug 29374] -
Adding ant build script validation support
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29374>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29374
------- Additional Comments From nicole@tedesco.name 2005-10-28 05:58 -------
Created an attachment (id=16826)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=16826&action=view)
Partial Ant 1.6.5 schema
The attached XML schema is a partial Ant validation schema. As it stands now,
and especially when it becomes complete, can work quite well for Ant build
file validation, and retained desired flexibility either by:
* Writing extending schemas which include new tasks and macros defined through
taskdef and macrodef, or...
* "element" elements in macrodefs (for instance) support defining elements that
can be assigned to different namespaces. You can see within this partial
schema that I have littered it with many "any" elements which validate against
##other namespaces. This is the only way to encode flexibility in a schema
without becoming ambiguosly non-unique (try changing the ##others to ##any and
you'll see what I mean). I would really, really like this feature.
Example of a macrodef with an element from another namespace (assume the mchx
namespace was defined on the project element to be some namespace,
http://www.foo.com/ant):
<target name="-init-macrodef-java" depends="-init">
<macrodef name="java" uri="http://www.marchex.com/ant">
<attribute name="classname" default="${main.class}"/>
<element name="mchx:customize" optional="true"/>
<sequential>
<java fork="true" classname="@{classname}">
<jvmarg line="${runmain.jvmargs}"/>
<classpath>
<path
path="${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper type="glob"
from="run-sys-prop.*" to="*"/>
</syspropertyset>
<mchx:customize/>
</java>
</sequential>
</macrodef>
</target>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org