|[Extensability - M2M transformations] Integrating a maven powered model with app4mc M2M [message #1829105]
||Thu, 25 June 2020 09:04
| Rodolfo Jordao
Registered: June 2020
Here is some context:
I have a Gradle/Maven project of a handful number of (generated from EMF) POJO classes with further useful utilities in then which are used in another project, namely ForSyDe. This project can be distributed as a self-contained jar with the sources and everything! No major restrictions in there. It is even planned to be publish in maven central or bintray after the initial studies and tests are done.
After a positive experience with Xtend and running with problems against a M2M flow I built around the Epsilon framework, I decided to translate my epsilon transformation rules into Xtend code. Meanwhile, since this M2M flow makes sense only within the scope of AMALTHEA models, it seemed a good idea to me to try and make it as some sort of plugin for app4mc instead of a totally external tool.
And here problems appear:
I found no proper way to set-up a project which would be using the M2M extensions app4mc provides, with the "AbstractTransformation" and "Model2ModelRootTransformation" classes, while also making use of this maven project I just mentioned. Here are the two major alternatives I found of which one seems to be a working (hackish a bit) solution:
1. Make pure plug-in project for eclipse, generate the ForSyDe Model self-contained JAR, put it in the ForSyDe2Amalthea project and add it to the classpath.
2. Make a maven tycho project, put the ForSyDe model JAR into the local maven repository and declare it as a dependency in the ForSyDe2Amalthea project.
1. It seems to work, although I could not test the app4mc transformations extensions yet.
2. I cannot access any app4mc transformations classes even though I made the "model-transformations" module a dependency of the maven tycho ForSyDe2Amalthea project.
So my question is: which way would be the preferred in terms of developer resources? I.e. taking the least implementation effort and maintenance effort possible? Maybe there is 3rd way I did not consider? Obviously, these problems exist because I am trying to use the app4mc model-transformation extensions, but I do think they can be circumvented if I just use the app4mc model itself, code an independent ForSyDe2Amalthea app, and then later find a way to call it from an OSGi service.
As usual, I am more than happy to give any info I may have missed to help you help me!
All the best,
Powered by FUDForum
. Page generated in 0.01946 seconds