Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Run mwe2 workflow using maven and fornax-oaw-m2-plugin("module not found" when .mwe2 is in different project)
Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1462301] Wed, 05 November 2014 12:34 Go to next message
Steffen Härtlein is currently offline Steffen HärtleinFriend
Messages: 8
Registered: November 2014
Junior Member
Hi all,
I'm relatively new to DSLs and Xtext and so I hope that I can explain my problem correctly:

I have two projects that are relevant for the problem:
- One that contains the DSL called "glue" and a "GenerateGlue.mwe2" workflow.
- Another project (let's call it "foo") that contains a ".glue" file to generate java code with

I heard that you can use the fornax-oaw-m2-plugin to realize this code generation with maven instead of starting the workflow in eclipse.

So I use the plugin in the "foo" project but I am trying to run the workflow within the "glue" project. In the configuration of the fornax-plugin I wrote:

...
<configuration>
    <workflowDescriptor>path.to.glue.workflow.GenerateGlue.mwe2</workflowDescriptor>
    ...
</configuration>
...


And also I added the "glue" project as a dependency to the project.

Now that I try to run maven I get the error:
"ERROR Mwe2Launcher - Couldn't find module path.to.glue.workflow.GenerateGlue.mwe2"

Any idea what I am doing wrong? Is it even possible to run a workflow that is in another project?

[Updated on: Wed, 05 November 2014 13:06]

Report message to a moderator

Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1462347 is a reply to message #1462301] Wed, 05 November 2014 13:33 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
If you use Xtext 2.7.x, you may want to use a more straight forward
approach to generate the language. See the docs at
https://www.eclipse.org/Xtext/documentation.html

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1462352 is a reply to message #1462347] Wed, 05 November 2014 13:39 Go to previous messageGo to next message
Steffen Härtlein is currently offline Steffen HärtleinFriend
Messages: 8
Registered: November 2014
Junior Member
I am using Xtext 2.6.2... so not 2.7.x
Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1462612 is a reply to message #1462352] Wed, 05 November 2014 19:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi did you have a look at https://github.com/cdietrich/xtext-maven-example

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1463083 is a reply to message #1462301] Thu, 06 November 2014 07:34 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/11/2014 14:02, Steffen Härtlein wrote:
> Hi all,
> I'm relatively new to DSLs and Xtext and so I hope that I can explain my
> problem correctly:
>
> I have two projects that are relevant for the problem:
> - One that contains the DSL called "glue" and a "GenerateGlue.mwe2"
> workflow.
> - Another project (let's call it "foo") that contains a ".glue" file to
> generate java code with
>
> I heard that you can use the fornax-oaw-m2-plugin to realize this code
> generation with maven instead of starting the workflow in eclipse.
>
> So I use the plugin in the "foo" project but I am trying to run the
> workflow within the "glue" project. In the configuration of the
> fornax-plugin I wrote:
>
>
> ..
> <configuration>
>
> <workflowDescriptor>path.to.glue.workflow.GenerateGlue.mwe2</workflowDescriptor>
>
> ...
> </configuration>
> ..
>
>
> And also I added the "glue" project as a dependency to the project.
>
> Now that I try to run maven I get the error:
> "ERROR Mwe2Launcher - Couldn't find module
> path.to.glue.workflow.GenerateGlue.mwe2"
>
> Any idea what I am doing wrong? Is it even possible to run a workflow
> that is an another project?

that should be a path, so instead of
path.to.glue.workflow.GenerateGlue.mwe2 it should be
path/to/glue/workflow/GenerateGlue.mwe2

or was it just a typo in your message?

is the mwe2 file in the foo project or in the glue project?

cheers
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


Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1463123 is a reply to message #1463083] Thu, 06 November 2014 08:33 Go to previous messageGo to next message
Steffen Härtlein is currently offline Steffen HärtleinFriend
Messages: 8
Registered: November 2014
Junior Member
@Christian Dietrich:
Yes, I did. In that case it works because the mwe2 file is in the same project


Quote:
that should be a path, so instead of
path.to.glue.workflow.GenerateGlue.mwe2 it should be
path/to/glue/workflow/GenerateGlue.mwe2

or was it just a typo in your message?

is the mwe2 file in the foo project or in the glue project?


No, that was not a typo. When I change the path to your solution it tries to find the file at the path
<basedir of my project>/path/to/glue/workflow/GenerateGlue.mwe2

That path does not exist because the mwe2 file is in the other project, the glue project. Can I access the file inside the dependency jar via the classpath somehow?
Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1463142 is a reply to message #1463123] Thu, 06 November 2014 08:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

this should work if you refer it by name and not by path

<workflowDescriptor>the.full.qualified.name.of.my.WorkflowModule</workflowDescriptor>


module the.full.qualified.name.of.my.WorkflowModule

Workflow {

}


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Run mwe2 workflow using maven and fornax-oaw-m2-plugin [message #1463177 is a reply to message #1463142] Thu, 06 November 2014 09:37 Go to previous message
Steffen Härtlein is currently offline Steffen HärtleinFriend
Messages: 8
Registered: November 2014
Junior Member
That worked for me! Thanks!

I just had to change "path.to.glue.workflow.GenerateGlue.mwe2" to
"path.to.glue.workflow.GenerateGlue", because that was the module name in the mwe2 file.

Thank you all for your responses!
Previous Topic:How to reduce lookahead, by adding leading keywords in grammar or k parameter in *mwe2 file?
Next Topic:Parser jumps from rule to rule erratically
Goto Forum:
  


Current Time: Tue Apr 16 15:13:28 GMT 2024

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

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

Back to the top