Closed arcanefoam closed 1 year ago
Loading models using metamodelFile
is bound to cause such issues. My recommendation would be to register your metamodels using epsilon.emf.register
once and to load models using metamodelUri
instead. This also applies to Trace.ecore
: it should refer to the Meta1
metamodel through its URI (http://example.org/meta1
) instead of its filename.
In my actual project the meta1 metamodel is referenced by URI. I tried modifying the build to use registred uris instead with the same result.
Could you please update all metamodel references to use URIs instead of file paths in the MWE and if the problem persists I'll have a look asap.
Uploaded the mwe with the changes, also modified the source model to remove the xsd:schemaLocation
In the revised version, Trace.ecore
still refers to the Meta1
metamodel by filename:
<eStructuralFeatures xsi:type="ecore:EReference" name="source" eType="ecore:EClass Meta1.ecore#//A"/>
Could you please make these references by URI too?
That seem to have done the trick!
I am suffering what Ed Willink labelled "metamodel schizophrenia" using the ANT tasks (but it also happens with the run configurations). In the mwe, I have a small ETL that "lifts" a model to a metamodel. Thus the rules are of the form:
I also want to save the trace of the transformation using an ECore model. For this, I have created a metamodel that mimics the rules (this metamodel references the source metamodel):
To save the trace I add post processing in the ETL:
When running the transformation I get:
which translates that the source metamodel is loaded twice as separate resources (once for the source model and once for the trace model). I suspect this has to do with how each EMF model uses its own ResourceSet, but have not taken the time yet to dig deeper into the issue. I have attached the MWE, with the ANT script that runs the ETL. mwe.zip