Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Standalone app generates EJavaObject types (Standalone generation of .ecore file always generates EJavaObject types)
[Xcore] Standalone app generates EJavaObject types [message #1835598] Tue, 08 December 2020 07:23 Go to next message
Miguel Jimenez is currently offline Miguel JimenezFriend
Messages: 40
Registered: July 2015
Last year I created a demo application using gradle to generate the .ecore and .genmodel files from an Xcore model. You can find that app here:

To generate those files, run "gradle xcoreExport". It will run a custom task ( and generate the files in "model-gen". Since .ecore and .genmodel files are not ignored, you can find the original <generated> files in the repository.

When I run the custom task now, the types are always EJavaObject, but it worked well before (See Example.ecore).

My two questions:

1. Since I'm using specific versions of the dependencies, why is the app not generating the correct types anymore?
2. How do I fix the custom task, so that it generates the correct types? I tried many many things but none worked.

Thank you,

This is the base code in the task:

        new StandaloneSetup().setPlatformUri("./");
        final Injector injector = new XcoreStandaloneSetup()
        final XtextResourceSet set =
        final URI uri =
        final ResourceSet rset = new ResourceSetImpl();
        final Resource input = rset.getResource(uri, true);

After the last line, the "input" resource has two errors:

XtextLinkingDiagnostic: null:1 Ecore cannot be resolved.
XtextLinkingDiagnostic: null:2 GenModel cannot be resolved.

[Updated on: Tue, 08 December 2020 07:36]

Report message to a moderator

Re: [Xcore] Standalone app generates EJavaObject types [message #1835606 is a reply to message #1835598] Tue, 08 December 2020 15:34 Go to previous message
Miguel Jimenez is currently offline Miguel JimenezFriend
Messages: 40
Registered: July 2015
Never mind, it seems that the problem is gradle 6 (perhaps it's something related to the daemon and how it compiles the project). Using gradle 5.3 works.
Previous Topic:Two different XML custom serializations for the same model
Next Topic:Question about generation with xsd
Goto Forum:

Current Time: Fri Sep 30 16:31:23 GMT 2022

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

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

Back to the top