Hi, I have the following problem: I have generated a j2ee project using maven
andromdapp::generate I put some classes in the model, tried to generate code
using maven (maven mda) and it worked. Now I try to do the same thing with ant
and it kinda looks fine: there is absolutely no error, I get the same
initialization messages on the screen as I get for maven, but it doesn't
generate anything. Both ant and maven use the same andromda.xml and the same
input model.
these are the initialization messages I get with both ant and maven:
=========================================
INFO [AndroMDA]
INFO [AndroMDA] A n d r o M D A - 3.1-RC1-20050802021854
INFO [AndroMDA]
INFO [AndroMDA] - discovering namespaces -
INFO [AndroMDA] found namespace --> 'ejb'
INFO [AndroMDA] + registering component 'metafacades'
INFO [AndroMDA] + registering component 'profile'
INFO [AndroMDA] + registering component 'cartridge'
INFO [AndroMDA] found namespace --> 'java'
INFO [AndroMDA] + registering component 'cartridge'
INFO [AndroMDA] found namespace --> 'validation'
INFO [AndroMDA] + registering component 'translation-library'
INFO [AndroMDA] found namespace --> 'query'
INFO [AndroMDA] + registering component 'translation-library'
INFO [AndroMDA] found namespace --> 'uml'
INFO [AndroMDA] + registering component 'metafacades'
INFO [AndroMDA] + registering component 'profile'
INFO [AndroMDA] found namespace --> 'netBeansMDR'
INFO [AndroMDA] + registering component 'repository'
INFO [AndroMDA] - core initialization complete: 4.623[s] -
INFO [AndroMDA] loading model -->
'file:/home/ek/work/mda/andromda-test2/test/mda/src/uml/testModel.xmi'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-datatype-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-datatype-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-webservice-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-webservice-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-service-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-service-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-process-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-process-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-presentation-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-presentation-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-meta-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-meta-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-xml-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-xml-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'jar:file:/home/ek/.maven/repository/andromda/xml.zips/andromda-profile-persistence-3.1-RC1-SNAPSHOT.xml.zip!/andromda-profile-persistence-3.1-RC1-SNAPSHOT.xml'
INFO [AndroMDA] referenced model -->
'file:/home/ek/work/mda/andromda-test2/test/mda/src/uml/UML_Standard_Profile.xml'
INFO [AndroMDA] - loading complete: 3.858[s] -
INFO [AndroMDA] - validating model -
INFO [AndroMDA] - validation complete: 0.553[s] -
=========================================
then with ant I get:
=========================================
[andromda] INFO [AndroMDA] completed model processing --> TIME: 6.131[s],
RESOURCES WRITTEN: 0
=========================================
and with maven I get
=========================================
INFO [AndroMDA:java] Output:
'file:/home/ek/work/mda/andromda-test2/test/mda/gen/a/b/c/FFF.java'
INFO [AndroMDA:java] Output:
'file:/home/ek/work/mda/andromda-test2/test/mda/gen/a/b/c/DDD.java'
INFO [AndroMDA] completed model processing --> TIME: 5.162[s], RESOURCES
WRITTEN: 2
=========================================
the andromda.xml file used by both projects is:
=========================================
<andromda>
<properties>
<property name="modelValidation">true</property>
<property name="cartridgeFilter">java</property>
</properties>
<server>
<host>localhost</host>
<port>4446</port>
</server>
<repositories>
<repository name="netBeansMDR">
<models>
<model>
<uri>file:///home/ek/work/mda/andromda-test2/test/mda/src/uml/testModel.xmi</uri>
<moduleSearchLocations>
<location>/home/ek/.maven/repository/andromda/xml.zips</location>
</moduleSearchLocations>
</model>
</models>
</repository>
</repositories>
<namespaces>
<namespace name="default">
<properties>
<property name="languageMappingsUri">Java</property>
<property
name="wrapperMappingsUri">JavaWrapper</property>
</properties>
</namespace>
<namespace name="java">
<properties>
<property
name="languageMappingsUri">/home/ek/work/mda/andromda-test2/test/mda/src/mappings/PrimaSolutionsJavaMappings.xml</property>
<property
name="enumerations">/home/ek/work/mda/andromda-test2/test/mda/gen</property>
<property
name="exceptions">/home/ek/work/mda/andromda-test2/test/mda/gen</property>
<property
name="value-objects">/home/ek/work/mda/andromda-test2/test/mda/gen</property>
</properties>
</namespace>
</namespaces>
</andromda>
=========================================
ant's build.xml file is:
=========================================
<project name="andromdatest" default="generate">
<target name="generate">
<taskdef name="andromda"
classname="org.andromda.ant.task.AndroMDAGenTask">
<classpath>
<fileset dir="/home/ek/.maven/repository">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<andromda
configurationUri="file:///home/ek/work/mda/andromda-test2/test/mda/conf/andromda.xml"
/>
</target>
</project>
=========================================
My questions is simple: what's wrong with the ant invocation? Do I miss
something? It is really important to be able to use ant, as our build system is
ant based, not maven.
Thanks for your time,
Emil.
--
Emil Kirschner
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3397#3397
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user