edit this page - page history - about editing

Registering packages and sub packages in OAW

OpenArchitectureWare

I was having troubles with trying to register a metamodel in OAW; in particular,
  1. My saved model files did not have the xsi: >schemaLocation attribute set, so OAW couldn't find it in them
  2. I wanted to use an external .ecore file to specify the metamodel
  3. My .ecore consisted of multiple sub packages
  1. Ideally, I would like to have used the .ecore from a separate Eclipse plugin
  2. I was using < EMF 2.4 so I couldn't use org.eclipse.emf.ecore.dynamic_package
The solution was to add the generated model code plugin as a dependency of the OAW plugin, and register the root model Package (inspiration):

<bean class="org.eclipse.mwe.emf.StandaloneSetup">
  <platformUri value=".."/>
  <registerGeneratedEPackage value="org.openiaml.model.model.ModelPackage" />
</bean>

There is no need to do something like this, because it will register sub-packages automatically:

  <!-- not needed -->
  <registerGeneratedEPackage value="org.openiaml.model.model.visual.VisualPackage" />

This didn't work, because it couldn't load sub-EPackages:

  <!-- doesn't load sub packages: -->
  <registerEcoreFile value="src/metamodel/iaml.ecore"/>

You can also see my workflow file directly.
edit this page - what links to here? - page history - top
Last edited by jevon jevon 118 months ago