Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2t-dev] acceleo maven plugin

Dear Accelo maven plugin community,

I have just tried to setp up a small example of accelo maven plugin.

 

I get one error:

The generation failed to generate any file because there are no model elements that matches at least the type of the first parameter of one of your main templates.

The problem may be caused by a problem with the registration of your metamodel, please see the method named "registerPackages" in the Java launcher of your generator. It could also come from a missing [comment @main/]

in the template used as the entry point of the generation.

 

I have used the example maven project /org.eclipse.acceleo.maven.tests

When I run the mvn install, it generates well the class, the emlt files and the artifact.

 

Then I have created a small maven project with an uml model, the same of the example

I have defined in my pom the call of the previous plugin.

 

 

<plugin>

                          <groupId>org.eclipse.acceleo</groupId>

                           <artifactId>org.eclipse.acceleo.maven.launcher</artifactId>

                          <version>3.5.0-SNAPSHOT</version>

                          <executions>

                                 <execution>

                                       <phase>process-resources</phase>

                                       <goals>

                                              <goal>acceleo-launcher</goal>

                                       </goals>

                                 </execution>

                          </executions>

                          <configuration>

                           <generatorClass>org.eclipse.acceleo.module.example.uml2java.helios.GenerateJava</generatorClass>

                                

                                 <model>${basedir}\src\main\model\example.uml</model>

                                 <outputFolder>${basedir}\src</outputFolder>

                          </configuration>

                          <dependencies>                                <dependency>

                                       <groupId>org.eclipse.acceleo</groupId>

                                       <artifactId>org.eclipse.acceleo.maven-test</artifactId>

                                       <version>3.6.0-SNAPSHOT</version>

                                 </dependency>

                          </dependencies>

                    </plugin>

 

But whatever I do it generates the error

please see the method named "registerPackages" in the Java launcher of your generator. It could also come from a missing [comment @main/]

 

I have checked that in my /org.eclipse.acceleo.maven.tests/src/main/java/org/eclipse/acceleo/module/example/uml2java/helios/generateJava.mtl

I have the following lines:

[template public generateClass(c : Class)]

[comment @main /]

 

Thanks for your help.

 

 

Francois

 


Back to the top