Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] Run Acceleo M2T JUnit Test from tycho
[acceleo] Run Acceleo M2T JUnit Test from tycho [message #1073398] Wed, 24 July 2013 17:25 Go to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

I have a JUnit test executing an accceleo transformation without problems as long as I start it from within Eclipse. If I start it via the thycho-surefire-plugin I get an error stating that *.emtl could not be found. How can I get around this? Can I start the compilation of the template by hand in my JUnit test?

Ralph
Re: [acceleo] Run Acceleo M2T JUnit Test from tycho [message #1076026 is a reply to message #1073398] Tue, 30 July 2013 14:40 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

You can use the Acceleo maven plugin to compile the generator and launch the generation just after.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
Re: [acceleo] Run Acceleo M2T JUnit Test from tycho [message #1095810 is a reply to message #1076026] Tue, 27 August 2013 15:04 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi Stephane,

thanks for your answer. I try to get the plugin running but it does not compile the mtl file. Unfortunately, no error is returned by the maven acceleo plugin. I doubt that it is even running. I added excerpts of my pom.xml files here:

Parent pom.xml
<repository>
  <id>acceleo-indigo</id>
  <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
</repository>
<repository>
  <id>acceleo-snapshots</id>
  <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
</repository>

<pluginRepository>
  <id>acceleo-indigo</id>
  <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
</pluginRepository>
<pluginRepository>
  <id>acceleo-snapshots</id>
  <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
</pluginRepository>


pom.xml of test
<plugin>
  <groupId>org.eclipse.acceleo</groupId>
  <artifactId>maven</artifactId>
  <version>3.2.1</version>
  <executions>
    <execution>
      <phase>compile</phase>
    </execution>
  </executions>
  <configuration>
    <useBinaryResources>false</useBinaryResources>
    <usePlatformResourcePath>true</usePlatformResourcePath>
    <acceleoProject>
      <root>${project.basedir}/../../plugins/org.melanee.core.melanee2metadepth</root>
      <entries>
        <entry>
          <input>src/</input>
          <output>target/classes</output>
        </entry>
      </entries>
    </acceleoProject>
    <packagesToRegister>
      <packageToRegister>org.melanee.core.models.plm.PLM.PLMPackage</packageToRegister>
    </packagesToRegister>
    <uriHandler>org.eclipse.acceleo.maven.AcceleoURIHandler</uriHandler>
    <failOnError>true</failOnError>
  </configuration>
</plugin>


Ralph

[Updated on: Tue, 27 August 2013 15:04]

Report message to a moderator

Previous Topic:[Xpand] Workflow execution programatically
Next Topic:[Xpand] Stereotype problem
Goto Forum:
  


Current Time: Tue Apr 23 13:16:39 GMT 2024

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

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

Back to the top