dukeboard/kevoree-modeling-framework

JS generated model does not follow the right namespace

maxleiko opened this issue · 9 comments

From Kevoree MM, you will have to create KevoreeUniverse from org.KevoreeUniverse but you expect it to be accessible from org.kevoree.KevoreeUniverse

You may want to use the option of the plugin.

If you mean <metaModelQualifiedName>org.kevoree</metaModelQualifiedName>, then I did. And the issue is still there.

Give it a try with org.kevoree.Kevoree

Yes, it works. But that is, still, a bug.

I can feel some tension in this discussion...

No :-) design and API convergence :-)

Seems to be not a bug, in the new naming strategy the last name FQN or .mm file is the metaModel name, and so generate the associated API element names. Here org.kevoree.kevoree seems to be consistent for Java and JS so as for we test it seems to be not a bug here.

My model filename is org.kevoree.mm
My pom.xml configuration for the KMF plugin is:

<!-- ... -->
<execution>
  <id>ModelGen</id>
    <goals>
      <goal>generate</goal>
    </goals>
    <phase>process-sources</phase>
    <configuration>
      <metaModelFile>${kevoree.metamodel.folder}/${kevoree.metamodel}</metaModelFile>
      <metaModelQualifiedName>org.kevoree</metaModelQualifiedName>
      <js>true</js>
    </configuration>
</execution>
<!-- ... -->

The Java version of the model is well generated with org.kevoree as package name.
The JS version of the model is wrongly generated with org as package name.

I doubt this is a feature. Looks a lot like a bug.

We tried to reproduce in the test project test/org.kevoree.modeling.test.kevoree but always get the same result in Java and JS