XText + XSemantics + Maven [message #1847059] |
Wed, 13 October 2021 09:50  |
Simon Cockx Messages: 45 Registered: October 2021 |
Member |
|
|
I'm trying to setup a new project with Xsemantics, but following the documentation on Getting Started hasn't worked for me yet.
There is an example Maven project located at https://github.com/eclipse/xsemantics/blob/master/tests/org.eclipse.xsemantics.example.maven.test/pom.xml, but it doesn't look anything like the multi-module Maven project that is generated when starting a new Xtext project, so I'm not sure what to do.
The steps I tried:
(1) create a new Maven-based XText project called mydsl
(2) add the update site to the target platform and select XSemantics 1.20.x (https://download.eclipse.org/xsemantics/milestones/)
(3) Activate the target platform
(4) Edit the pom.xml of the parent-project by copying relevant changes as in the example pom-file from the documentation (https://github.com/eclipse/xsemantics/blob/master/tests/org.eclipse.xsemantics.example.maven.test/pom.xml)
(4a) Copy the three repositories (Xsemantics, eclipse, Xtext Update Site)
(4b) Copy the two plugin repositories (sonatype_releases, sonatype_snapshots)
(4c) Add the xsemantics-gen folder to the filesets of the maven-clean-plugin
(4d) Copy the xtext-maven-plugin to my plugins
This results in an error when updating the Maven project: org.eclipse.xsemantics:org.eclipse.xsemantics.dsl:jar:1.20.0 was not found in https://oss.sonatype.org/content/repositories/releases/.
The documentation also mentions to add a dependency to "it.xsemantics.runtime", but I'm not sure where I should add this dependency. In the pom of the parent project? In the pom of the main Xtext project?
I'm not very experienced with Eclipse plugin development, so I might be overlooking something simple. Any help is welcome.
Kind regards, Simon
|
|
|
|
Re: XText + XSemantics + Maven [message #1847064 is a reply to message #1847061] |
Wed, 13 October 2021 12:16   |
Simon Cockx Messages: 45 Registered: October 2021 |
Member |
|
|
Hi Christian. Thanks for the quick response!
This might be purely Maven-related, though I would argue this is also a documentation issue in the getting-started guide of Xsemantics. ;) The guide is at least out-dated, and contains a lot of broken links. (if Lorenzo Bettini reads this: I think many people could benefit from an update :) )
Anyway, setting the version of Xsemantics to 1.20.0-SNAPSHOT seems to have resolved my first problem. For my second problem: not knowing where to add the it.xsemantics.runtime dependency, I added it to the parent project. Eclipse does not show any errors anymore, but when I create an xsemantics file (MyDsl.xsemantics in the org.xtext.example.mydsl package), write "system mydsl.xsemantics.MyDslSystem" and save the file, there is no code being generated. There is also no syntax highlightning in the file, so I guess the setup hasn't succeeded yet. Any idea what I'm missing?
As a side note, I'm a bit puzzled about why the installation of Xsemantics is this complicated. For example: the pom file of a newly generated Xtext project does not contain the xtext-maven-plugin, but then xsemantics apparently requires it (okay, scratch this, I looked up what the xtext-maven-plugin is for, and I get it now). The need to add five repositories to the pom also seems a bit superficial to me... Without a clear documentation I guess I'm just groping in the dark here.
In any case, I appreciate your help very much. Thank you.
[Updated on: Wed, 13 October 2021 12:25] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02163 seconds