Hi, 


All I need is to generate some java files using my own cartridge. I don't 
really want to use maven, since it is going to generate this code structure 
that I don't really need.  I wanted to use the ant build file.  But couldn't 
get it to work.  Here is my build.xml. Before I use my own cartridge, I am 
trying to use the andromda-java cartridge. 



<project name="pluginGeneration" default="buildAll" basedir=".">



  <description>

        build file for generating plugin codes, xsd, and pin files

  </description>  

  <!-- directories where build output is written -->

  <property name="java-out.dir"  value="src"/>

  <property name="maven.repo" value="C:Documents and 
Settingsjieyu.mavenrepository" />





  <path id="project.class.path">

    <pathelement path="${classpath}"/>          

    <pathelement path="${maven.repo}andromdajars"/>

    <pathelement 
location="${maven.repo}andromdajarsandromda-ant-task-3.1-RC1-SNAPSHOT.jar"/>

    <pathelement 
location="${maven.repo}andromdajarsandromda-java-cartridge-3.1-RC1-SNAPSHOT.jar"
 />

  </path>



  

  <target name="cleanJava">

     <delete>

     <fileset dir="${java-out.dir}" includes="*.java"/>

     </delete>

  </target>





  <target name="generateJava" depends="cleanJava">

    <mkdir dir="${java-out.dir}" />

    <taskdef name="andromda" classname="org.andromda.ant.task.AndroMDAGenTask" 
classpathref="project.class.path"/>

    <andromda> 

    <properties> 

        <property name="modelValidation">true</property> 

        <property name="cartridgeFilter">java</property> 

    </properties> 

    <models> 

        <model> 

            <uri>file:/C:/temp/maven/test/mda/src/uml/TestModel.xmi</uri> 

        </model> 

    </models> 

    <namespaces> 

        <namespace name="java"> 

            <properties> 

                <property name="enumerations"></property> 

                <property name="exceptions"></property> 

                <property name="value-objects"></property> 

            </properties> 

        </namespace> 

    </namespaces> 

</andromda> 



  </target>





  <target name="buildAll" depends="generateJava"/>

</project>



When I run ant -f build.xml (my ant is ant1.6.0)



I get 



"The <andromda> type doesn't support the nested "properties" element. 



I also tried to change it to something like, 





<andromda includes="TestModel.xmi" cartridgeFilter="java"> 



It also complains that "doesn't support the nested 

cartridgeFilter element."



I probably am not getting the point how to work with ant build.xml.  Could 
anyone help me start with my ant build file?  I have read the 
http://www.andromda.org/anttask.html





Thanks,



Jie
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3442#3442
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to