Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] : ATL and Maven
[ATL] : ATL and Maven [message #642917] Fri, 03 December 2010 10:32
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
Hi,

I'm trying to launch ATL transformations (.asm files) using the Maven AntRun plugin. So I want to launch ATL Ant tasks from the pom.xml :
...
   <path id="lib.path">
      <fileset dir="src/transformation/lib" includes="*.jar"/>
    </path>
         
         <taskdef name="atl.loadModel" classname="org.eclipse.m2m.atl.core.ant.tasks.LoadModelTask" classpathref="lib.path"/>
         <taskdef name="atl.saveModel" classname="org.eclipse.m2m.atl.core.ant.tasks.SaveModelTask" classpathref="lib.path"/>
        	<ant antfile ="src/transformation/0_UML2JPA_chain.xml"/>
...


in the /lib directory I put all the ATL plugins (copied from my eclipse/plugins directory) and the other EMF and Eclipse libraries as described here : http://wiki.eclipse.org/index.php/ATL_Howtos#How_do_I_launch _transformations_programmatically.3F

When I launch the command "mvn install" I have the following console trace :
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Flights-domain-generated 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ Flights-domain-generated ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\workspaces\wp_sogeti\Flights-domain-generated\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Flights-domain-generated ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-antrun-plugin:1.6:run (default) @ Flights-domain-generated ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks

main:
    [unjar] Expanding: D:\Documents and settings\elabouss\.m2\repository\fr\sogeti\plpm\infra\persistance\jpa\fr.sogeti.plpm.infra.persistance.jpa.model\0.0.1-SNAPSHOT\fr.sogeti.plpm.infra.persistance.jpa.model-0.0.1-SNAPSHOT.jar into D:\workspaces\wp_sogeti\Flights-domain-generated\src\transformation

executeUML2JPAChain:
     [echo] Starting UML2JPA Chain
     [echo] Step 1 : UML Class --> JPA Entity

loadModels:
[atl.loadModel] Loading model JPAMetamodel from file:/D:\workspaces\wp_sogeti\Flights-domain-generated\fr.sogeti.plpm.infra.persistance.jpa.model\metamodel\JPA.ecore
org.eclipse.m2m.atl.core.ATLCoreException: org.eclipse.m2m.atl.core.launcher EMF-specific VM not found, check the spelling or register it manually
	at org.eclipse.m2m.atl.core.service.CoreService.getLauncher(CoreService.java:214)
	at org.eclipse.m2m.atl.core.ant.tasks.AbstractAtlTask.getLauncher(AbstractAtlTask.java:132)
	at org.eclipse.m2m.atl.core.ant.tasks.AbstractAtlTask.getDefaultModelFactory(AbstractAtlTask.java:149)
	at org.eclipse.m2m.atl.core.ant.tasks.LoadModelTask.execute(LoadModelTask.java:110)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.172s
[INFO] Finished at: Fri Dec 03 10:09:21 CET 2010
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (default) on project Flights-domain-generated: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] D:\workspaces\wp_sogeti\Flights-domain-generated\src\transformation\0_UML2JPA_chain.xml:22: The following error occurred while executing this line:
[ERROR] D:\workspaces\wp_sogeti\Flights-domain-generated\src\transformation\1_UML2JPA.xml:22: Unable to load launcher EMF-specific VM: org.eclipse.m2m.atl.core.launcher EMF-specific VM not found, check the spelling or register it manually
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException



I was not able to find the ATL libraries on the CVS directory given in [1] : antlr-runtime-3.0.jar, ATL-parser.jar, org.eclipse.gmt.tcs.extractor_1.0.0.jar, org.eclipse.gmt.tcs.injector_1.0.0.jar, emf4atl.jar, vm.jar, engine.jar

[1] : http://wiki.eclipse.org/index.php/ATL_Howtos#How_do_I_launch _transformations_programmatically.3F

So maybe those libraries are not accessible from the plugins that I copied from eclipse/plugins.

Any Idea ?
Thanks
Previous Topic:[ATL] Do we have to instantiate ProfileApplication when transforming an extended model into another?
Next Topic:[QVTo] Is qvtotrace loaded?
Goto Forum:
  


Current Time: Thu Apr 25 09:48:20 GMT 2024

Powered by FUDForum. Page generated in 0.03361 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top