Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Creating xtext-language project built by Maven3
Creating xtext-language project built by Maven3 [message #1684948] Wed, 18 March 2015 16:49 Go to next message
Jérôme Fouletier is currently offline Jérôme FouletierFriend
Messages: 39
Registered: September 2010
Location: France
Member
Hi all,

I'm attempting to create a project hosting our DSL files that is built via Maven. For this, we use the existing fornax mwe2 builder plugin, because our language still uses the old mwe2 scripts to generate the code. All the validators, scoping, and so on are written in Java classes.
However, the Xtext project builder does not seem to use the maven classpath, and fails to find a class XX located in a jar that is a transitive dependency of the language plugin.
> language plugin
->depends : other plugin
---> depends : third plugin containing class XX
That same jar also is included in the platform, and the OSGi console shows the corresponding package is available (although it's not in the language plugin's direct dependencies).
We are using version 2.4.3 of XText.

The main question is, what classpath does the XText builder use when the project is not a PDE project? Does it look for dependencies on the project's classpath? Or through OSGi dependency resolution? And, in this case, is there a need to re-export the packages from the third plugin, even though they're only used in the second one?

Thanks

Jérôme

[Updated on: Wed, 18 March 2015 16:56]

Report message to a moderator

Re: Creating xtext-language project built by Maven3 [message #1685031 is a reply to message #1684948] Wed, 18 March 2015 17:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi i have no idea what you are actually doing but if the project is not a pde project but a java project tve java projects classpath is used. Can you please elaborate what you are exactly doing in your maven and workflow? Usually in such a standalone situation no builder at all is used. The classpath comes via the xtextresouce/xtextresouceset (the reader component should init what one)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Creating xtext-language project built by Maven3 [message #1685099 is a reply to message #1685031] Wed, 18 March 2015 18:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Another question: if you run maven with debug the fornax plugin should print the classpath. Does this path contain the missing jar?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Creating xtext-language project built by Maven3 [message #1685127 is a reply to message #1685031] Wed, 18 March 2015 18:25 Go to previous messageGo to next message
Jérôme Fouletier is currently offline Jérôme FouletierFriend
Messages: 39
Registered: September 2010
Location: France
Member
Actually, the maven build using mwe2 works fine, since everything is on the class path. It's the editor that fails to validate the custom language files because a class the validator depends on is not in the XText builder's classpath.
It turned out to be a package dependency problem in those plugins.
Re: Creating xtext-language project built by Maven3 [message #1685208 is a reply to message #1685127] Wed, 18 March 2015 19:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

the validator class in eclipse? or in the context of a model instance?
you have to take care the osgi dependencies in the org.*.yourdsl project is correct


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 18 March 2015 19:05]

Report message to a moderator

Previous Topic:[Xtext 2.8.0] "Storable Resources" documentation?
Next Topic:How to remove the xtext update site in RCP app
Goto Forum:
  


Current Time: Thu Mar 28 19:03:34 GMT 2024

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

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

Back to the top