using the xtext-maven-plugin [message #1438785] |
Mon, 06 October 2014 13:38 |
|
Hi
In one of my DSLs, call it MyDsl, I'd like to call the MyDsl generator
in the DSL test project with the xtext-maven-plugin, during the same
maven build, thus, following the tutorials, I tried something like
<plugin>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-maven-plugin</artifactId>
<version>${xtext.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<languages>
<language>
<setup>my.dsl.MyDslStandaloneSetup</setup>
<outputConfigurations>
<outputConfiguration>
<outputDirectory>${basedir}/dsl-gen</outputDirectory>
</outputConfiguration>
</outputConfigurations>
</language>
</languages>
</configuration>
</plugin>
But the my.dsl.MyDslStandaloneSetup cannot be found
Caused by: java.lang.ClassNotFoundException: my.dsl.MyDslStandaloneSetup
at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at
org.eclipse.xtext.builder.standalone.LanguageAccessFactory.createLanguageAccess(LanguageAccessFactory.java:28)
Is it possible to do something like that or a previous maven install is
strictly required?
thanks in advance
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: using the xtext-maven-plugin [message #1439509 is a reply to message #1438785] |
Tue, 07 October 2014 08:15 |
|
You have to add the runtime projects as a plugin dependency in:
<plugin>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-maven-plugin</artifactId>
<version>${xtend-version}</version>
....
<dependencies>
<dependency>
<!-- add runtime project here -->
</dependency>
</dependencies>
</plugin>
+Dennis Huebner
Get professional support from the Xtext committers at www.typefox.io
|
|
|
|
Powered by
FUDForum. Page generated in 0.03071 seconds