Skip to content

ST6RI-916 org.omg.sysml.model module#750

Open
AxelRICHARD wants to merge 7 commits intomasterfrom
STR6I-916
Open

ST6RI-916 org.omg.sysml.model module#750
AxelRICHARD wants to merge 7 commits intomasterfrom
STR6I-916

Conversation

@AxelRICHARD
Copy link
Copy Markdown

@AxelRICHARD AxelRICHARD commented Apr 27, 2026

Motivation

This change decouples the generated SysML EMF metamodel from the org.omg.sysml Eclipse plug-in.

The generated model is now produced and published as a plain Java/Maven artifact, while Eclipse/Tycho consumers continue to access it through a dedicated OSGi wrapper bundle. This makes the model easier to reuse outside Eclipse, clarifies module ownership, and removes some unnecessary runtime dependencies from the generated code.

What Changed

  • Added org.omg.sysml.model as a new plain Java module containing:
    • the generated SysML EMF Java classes
    • SysML.ecore
    • SysML.genmodel
  • Added org.omg.sysml.model.bundle as a new Eclipse plug-in that:
    • wraps the org.omg.sysml.model JAR
    • packages the model resources for OSGi/Tycho consumption
    • exports the generated SysML EMF packages
  • Updated the root Maven reactor to build both new modules.
  • Removed generated model sources from org.omg.sysml/syntax-gen; org.omg.sysml no longer owns compilation of the generated EMF model.
  • Rewired dependent plug-ins to consume org.omg.sysml.model.bundle, including:
    • org.omg.sysml
    • org.omg.sysml.edit
    • org.omg.sysml.execution
    • org.omg.sysml.xtext
    • org.omg.kerml.xtext
  • Added org.omg.sysml.model.bundle to the Eclipse feature so it is shipped with the existing tooling.

Model Generation Changes

  • Updated the custom UML-to-Ecore importer to generate into:
    • plugin ID: org.omg.sysml.model
    • source directory: /org.omg.sysml.model/src/main/java
  • Updated the SysML namespace URI used by generation and QVTO references from:
    • https://www.omg.org/spec/SysML/20230201
    • to https://www.omg.org/spec/SysML/20250201
  • Added deterministic sorting of imported Ecore contents:
    • EClassifiers
    • EStructuralFeatures
    • EOperations

This reduces noisy regeneration diffs and stabilizes generated artifacts.

Primitive Type Simplification

  • Normalized imported UML primitive types to built-in Ecore datatypes during import.
  • Removed types.ecore.
  • Removed the generated org.omg.sysml.lang.types package and related generated classes.

This simplifies the metamodel structure and removes an extra generated dependency layer.

Runtime Dependency Cleanup

The generated model previously depended on UML2 helper-list implementations from org.eclipse.uml2.common.

This commit copies the required helper classes into the SysML model module and updates generation so the generated implementation classes import the local versions instead:

  • DerivedEObjectEList
  • DerivedUnionEObjectEList
  • UnionEObjectEList

The org.omg.sysml.uml.ecore.importer has been updated to rewrite those imports automatically after generation.

Impact

  • The SysML metamodel is now reusable as a regular Java library outside Eclipse.
  • Eclipse/Tycho-based modules remain compatible through org.omg.sysml.model.bundle.
  • Ownership of generated EMF code is now explicit and isolated in org.omg.sysml.model.
  • Generated sources are cleaner and less coupled to UML2 runtime internals.
  • Most of the file churn in this commit is due to regeneration and relocation of generated EMF sources, not hand-written functional logic changes.

AxelRICHARD and others added 2 commits April 13, 2026 15:39
- new org.omg.sysml.model plain java module (not an Eclipse plug-in)
 - the generated Java model code
 - org.omg.sysml.model/src/main/resources/model/SysML.ecore
 - org.omg.sysml.model/src/main/resources/model/SysML.genmodel
- new org.omg.sysml.model.bundle module (Eclipse plug-in)
 - bridge that plain Java model into the Eclipse/OSGi world
 - wrap the plain org.omg.sysml.model jar and the model resources as an
Eclipse bundle so PDE/Tycho plug-ins can access exported packages like
org.omg.sysml.lang.sysml and resolve EMF generated-package registration
through Eclipse
- org.omg.sysml.model.gencode
 - order alphabetically ecore EClasses and eStructuralFeatures
 - removal of unwanted UML runtime dependencies from generated sources
- updated build
- Also updated SysML_.genmodel for use with Xtext (without change to
Xtext builds).
- And deleted types.ecore.
- copy org.eclipse.uml2.common into org.omg.sysml.model. It is allowed
to do that as both modules are under EPL-2.0 license. Update
org.omg.sysml.uml.ecore.importer to handle that change.

Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@AxelRICHARD AxelRICHARD changed the title Str6 i 916 STR6I-916 Apr 27, 2026
@AxelRICHARD AxelRICHARD added this to the 2026-04 milestone Apr 27, 2026
@AxelRICHARD AxelRICHARD added the enhancement New feature or request label Apr 27, 2026
@AxelRICHARD AxelRICHARD requested a review from seidewitz April 27, 2026 06:43
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@seidewitz seidewitz changed the title STR6I-916 STR6I-916 org.omg.sysml.model module Apr 27, 2026
@seidewitz seidewitz requested review from himi and hpdekoning April 27, 2026 21:11
@seidewitz seidewitz self-assigned this Apr 27, 2026
@AxelRICHARD AxelRICHARD changed the title STR6I-916 org.omg.sysml.model module New org.omg.sysml.model module Apr 28, 2026
@AxelRICHARD AxelRICHARD changed the title New org.omg.sysml.model module ST6RI-916 org.omg.sysml.model module Apr 28, 2026
AxelRICHARD and others added 2 commits April 29, 2026 17:42
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Prior to this change, opening a model file in the Xtext IDE caused
an error (unable to load EObject).
@seidewitz
Copy link
Copy Markdown
Member

As originally proposed, this refactoring worked in Jupyter and the Xpect tests, but model files failed to open in the Xtext IDE, ultimately due to the inability to load the EObject class. I have now pushed a commit that resolves this problem by adding dependencies on the org.eclipse.emf.common and org.eclipse.emf.ecore plugins.

@AxelRICHARD
Copy link
Copy Markdown
Author

AxelRICHARD commented Apr 30, 2026

@seidewitz great thank you!
For those who have compiling issues inside Eclipse, you have to do a Maven Update (inside eclipse with M2E) on /org.omg.sysml.model.bundle and then refresh plugins the workspace.

@himi
Copy link
Copy Markdown
Member

himi commented Apr 30, 2026

This PR radically changed the project structure and dependencies.

  • M2E is now mandatory to resolve dependencies.
  • org.eclipse.emf.ant is a new dependent of org.omg.sysml.model.bundle. Can you check whether or not the dependency of org.eclipse.emf.ant is really needed? It is used to generate code from EMF model. I tried to remove the dependency and it seems to work without it.
  • mvn install is critical to update org.omg.sysml.model bundle
  • I needed to reset the target environment to resolve org.apache.commons.logging (I have no idea why it's needed)

I could make it work in my environment by fixing the issues.

@seidewitz
Copy link
Copy Markdown
Member

@himi

  • org.eclipse.emf.ant is a new dependent of org.omg.sysml.model.bundle. Can you check whether or not the dependency of org.eclipse.emf.ant is really needed? It is used to generate code from EMF model. I tried to remove the dependency and it seems to work without it.

The dependency on org.eclipse.emf.ant happened when I (not @AxelRICHARD) added the org.eclipse.emf.common and org.eclipse.emf.ecore dependencies to org.omg.sysml.model.bundle. I only added the latter two explicitly, and the ant dependency was added automatically. But we aren't using it in the bundle, so I think it is OK to delete it.

@himi
Copy link
Copy Markdown
Member

himi commented May 2, 2026

Thank you for the comment. So may I remove it?

@seidewitz
Copy link
Copy Markdown
Member

@himi

Thank you for the comment. So may I remove it?

Sure, if you like.

I wasn't sure from you message of 2 days ago if there still any changes you would like @AxelRICHARD to make. What is the status of updating the version number updates (other than plugin version)?

Copy link
Copy Markdown
Member

@himi himi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed org.eclipse.emf.ant dependency in org.omg.sysml.model.bundle and it worked correctly.

@himi
Copy link
Copy Markdown
Member

himi commented May 4, 2026

@seidewitz

What is the status of updating the version number updates (other than plugin version)?
I'm not so sure what you are mentioning about but is it related to the jar in org.omg.sysml.model.bundle/lib?

@AxelRICHARD
Copy link
Copy Markdown
Author

@seidewitz @himi I still have to update the pom.xml to handle the version number updates (other than plugin version).
I will add a new commit on this PR asap and let you know when it will be done.
Thank you

Update the root set-version antrun step to keep
org.omg.sysml.model.bundle metadata in sync by rewriting the embedded
model JAR path in MANIFEST.MF, build.properties, and .classpath, and
normalize internal org.omg bundle Require-Bundle version pins to the
reactor version.

Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@AxelRICHARD
Copy link
Copy Markdown
Author

@seidewitz @himi The update is ok.

@AxelRICHARD
Copy link
Copy Markdown
Author

@seidewitz @himi It is ok, you can do a last review, thank you.

@seidewitz
Copy link
Copy Markdown
Member

@AxelRICHARD
I can confirm that the version update is working. However, I am still having problems cleanly building after changing the version number in the parent POM. Here is what I am doing:

  1. Change version number in parent POM.
  2. Eclipse clean and build all projects in repository.
  3. Maven clean repository.
  4. Maven install repository.
  5. Maven update org.omg.sysml.model.bundle.

However, the first time I do step 4 (Maven install), the build fails because the org.omg.sysml.model-0.60.0-SNAPSHOT.jar is (oddly) empty. If I rerun the install, it then completes successfully.

Can you reproduce this behavior? Can you fix it? Or do I need to do something different?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants