|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
CWM Model generation with MDR-Ant errorHi!
I'm completely new to MDR, so please forgive me if I ask a stupid question. I was trying to create a CWM MDR model from the OMG XMI files plus the Diff to that I found on the MDR homepage with MDR-standalone. I used the sample.xml buildfile for MDRant (http://mdr.netbeans.org/unbranded-source/browse/~checkout~/mdr/extras/mdrant/sample.xml) and updated it in the following way to adhere my local config and folder structures: <?xml version="1.0" encoding="UTF-8"?> <project name="build-products" basedir="." default="all"> <!-- PROPERTIES ======================================================== --> <property name="storageDir" value="D:\Privat\Development\MDR\output"/> <property name="storageFile" value="mycwm"/> <property name="model" value="cwm"/> <property name="xmi-file" value="01-02-03_Diff" /> <!-- nexcssary external files --> <property name="nbroot" value="D:\Privat\Development\"/> <property name="mdrroot" value="${nbroot}/MDR"/> <property name="mdrant.jar" value="${mdrroot}/mdrant.jar"/> <property name="mof.jar" value="${mdrroot}/mof.jar"/> <property name="jmi.jar" value="${mdrroot}/jmi.jar"/> <property name="mdrapi.jar" value="${mdrroot}/mdrapi.jar"/> <property name="nbmdr.jar" value="${mdrroot}/nbmdr.jar"/> <property name="jmiutils.jar" value="${mdrroot}/jmiutils.jar"/> <property name="openide-lookup.jar" value="${mdrroot}/openide-lookup.jar"/> <!-- TASK DEFINITIONS ================================================== --> <taskdef name="mdr" classname="org.netbeans.mdrant.MdrTask"> <classpath> <pathelement location="${mdrant.jar}"/> <pathelement location="${nbmdr.jar}"/> <pathelement location="${mdrapi.jar}"/> <pathelement location="${jmiutils.jar}"/> <pathelement location="${mof.jar}"/> <pathelement location="${jmi.jar}"/> <pathelement location="${openide-lookup.jar}"/> </classpath> </taskdef> <!-- PUBLIC TARGETS ==================================================== --> <target name="all" depends="clean,load,compile"/> <target name="load" depends="init,create-dirs"> <mdr storageFile="${storageDir}/${storageFile}"> <instantiate name="mof4models"/> <readXMI file="${storageDir}/${model}/metamodel/${xmi-file}.xml" extent="mof4models"/> <writeXMI file="${storageDir}/${model}/xmi/${xmi-file}.xml" extent="mof4models" xmiVersion = "1.2"/> <writeDTD file="${storageDir}/${model}/xmi/${xmi-file}.dtd" extent="mof4models"/> <mapJava dir="${storageDir}/${model}/java/" extent="mof4models"/> <mapClass dir="${storageDir}/${model}/class/" extent="mof4models"/> <instantiate name="mycwm" extent="mof4models" package="mycwm"/> <printExtentNames/> </mdr> </target> <target name="compile" depends="init"> <javac debug="true" deprecation="true" destdir="${storageDir}/${model}/java/" srcdir="${storageDir}/${model}/java/"> <classpath> <fileset dir="${mdrroot}"> <include name="jmi.jar"/> </fileset> </classpath> </javac> </target> <target name="clean" depends="init"> <delete file="${storageDir}/${storageFile}.btd"/> <delete file="${storageDir}/${storageFile}.btx"/> <delete dir="${storageDir}/${model}/java"/> <delete dir="${storageDir}/${model}/class"/> <delete dir="${storageDir}/${model}/xmi"/> </target> <!-- PRIVATE TARGETS =================================================== --> <target name="init"> </target> <target name="create-dirs" depends="init"> <mkdir dir="${storageDir}"/> <mkdir dir="${storageDir}/${model}/java"/> <mkdir dir="${storageDir}/${model}/class"/> <mkdir dir="${storageDir}/${model}/xmi"/> </target> </project> If I run this with ant, I get the following error: [mdr] mycwm does not exist in extent mof4models [mdr] at org.netbeans.mdrant.Instantiate.execute(Instantiate.java:57) [mdr] at org.netbeans.mdrant.MdrTask.execute(MdrTask.java:68) [mdr] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja va:275) [mdr] at org.apache.tools.ant.Task.perform(Task.java:364) [mdr] at org.apache.tools.ant.Target.execute(Target.java:341) [mdr] at org.apache.tools.ant.Target.performTasks(Target.java:369) [mdr] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav a:1216) [mdr] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [mdr] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De faultExecutor.java:40) [mdr] at org.apache.tools.ant.Project.executeTargets(Project.java:1068 ) [mdr] at org.apache.tools.ant.Main.runBuild(Main.java:668) [mdr] at org.apache.tools.ant.Main.startAnt(Main.java:187) [mdr] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [mdr] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) BUILD FAILED D:\Privat\Development\MDR\build.xml:44: mycwm does not exist in extent mof4models If I omit the second instanciate from the buildfile, the build works, but I think then the CWM is not instanciated. I also was able to successfully run the UML 1.4 files without error, only the CWM keeps me puzzled. What would be the correct setting for CWM in this part: <instantiate name="mycwm" extent="mof4models" package="mycwm"/> Thanks a lot in advance, Tobi |
| Free Forum Powered by Nabble | Forum Help |