Question about Ant Tasks for XML Schema Import & Generation

1 view
Skip to first unread message

Daniel Medina

unread,
Apr 29, 2009, 4:54:44 PM4/29/09
to XMLmodeling
I've been attempting to use the Ant Tasks defined in Dave Carlson's
talk on Extending UML2Tools for XML Schema Design.

<property name="xsdSource" value="${basedir}/../../FpML-4-3/
fpml-4-3-10-rec-1/xml"/>
<property name="modelName" value="FpML-4-3"/>
<property name="model" value="${basedir}/${modelName}.uml"/>

<target name="importSchemas" depends="init">
<xmlmodeling model="${model}">
<importXSD baseModelPath="${xsdSource}">
<fileset dir="${xsdSource}" includes="*.xsd"/>
</importXSD>
</xmlmodeling>
</target>
<target name="generateSchemas" depends="init">
<xmlmodeling>
<model file="${model}" />
<generateXSD destdir="${output}">
<modelElement qname="${modelName}" nested="true"/>
</generateXSD>
</xmlmodeling>
</target>

After adding in the jar dependencies and changing the various
directories to reflect my system, I'm running into a
NullPointerException while it is executing the <xmlmodeling model="$
{model}"> task.

[xmlmodeling] Creating new model: file:/M:/hyperModelWorkspace/
hyperModel/AntTest/model.uml
[xmlmodeling] java.lang.NullPointerException
[xmlmodeling] at
com.xmlmodeling.uml2.xsd.ant.taskdefs.XmlModelingTask.createNewModel
(XmlModelingTask.java:188)
[xmlmodeling] at
com.xmlmodeling.uml2.xsd.ant.taskdefs.XmlModelingTask.execute
(XmlModelingTask.java:133)
[xmlmodeling] at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)

Has anyone been able to successfully implement the Ant Script, or have
an idea of why I'm getting the Null Pointer Exception?


Reply all
Reply to author
Forward
0 new messages