Forge
Explanation

CATIA Magic resources

What a CATIA Magic resource is, and how its archive is laid out.

CATIA Magic — Cameo Systems Modeler, Magic Cyber Systems Engineer, and their siblings — lets a team extend the tool with custom resources tailored to a domain. Understanding what a resource is explains most of what Forge does, because the plugin exists to assemble one correctly.

What a resource contains

A resource is a ZIP archive holding CATIA Magic assets. It can bundle any combination of:

  • Profiles — UML and SysML extensions (stereotypes and tags, constraints, customization elements) that tailor the metamodel to a domain.
  • Model libraries — reusable model elements shipped for a domain or methodology.
  • Templates — preconfigured projects, with package hierarchy, diagrams, validation rules and symbol styles, offered when a user starts a project.
  • Samples — example models demonstrating the methodology the resource delivers.
  • Custom diagrams — diagram palettes and layouts exposing only the notations a context needs.
  • Perspectives — interface presets that hide menus and features, for novice against expert audiences or for particular users.
  • Plugins — compiled Java extensions with their own descriptor and libraries.

Archive structure

CATIA Magic recognizes a resource by its folder structure. A resource named macrodata-refinement-8.9.27-2024x-refresh2.zip lays out as:

macrodata-refinement-8.9.27-2024x-refresh2.zip
├── data/
│   ├── defaults/
│   │   └── data/
│   │       ├── diagrams/
│   │       │   └── Lumon Architecture Diagram/
│   │       │       └── descriptor.xml
│   │       └── perspectives/
│   │           └── Lumon Systems Engineer.umd
│   └── resourcemanager/
│       └── MDR_Plugin_Macrodata Refinement_7199_descriptor.xml
├── modelLibraries/
│   └── LumonIndustryStandard.mdzip
├── plugins/
│   └── com.lumon.macrodatarefinement/
│       ├── libs/
│       │   ├── jackson-annotations-2.15.2.jar
│       │   ├── jackson-core-2.15.2.jar
│       │   └── jackson-databind-2.15.2.jar
│       ├── plugin.xml
│       └── macrodatarefinement-8.9.27-2024x-refresh3.jar
├── profiles/
│   └── Lumon Core Profile.mdzip
├── samples/
│   └── Lumon/
│       └── Macrodata Refinement Sample.mdzip
└── templates/
    └── Lumon/
        ├── description.html
        ├── Lumon Project Template.mdzip
        └── Lumon Project Template.html

Installing the resource extracts its contents into the matching CATIA Magic folders, after which the profiles, templates, samples, diagrams, perspectives and plugins appear inside the tool.

The two descriptors

Two XML files carry the metadata that makes the archive installable.

The resource descriptor, under data/resourcemanager/, names the resource, its version, its provider, the program editions it supports, the CATIA Magic versions it accepts, the resources it requires, and every file it installs with its destination path. The descriptor itself is installed along with the rest but never appears in its own installation node.

The plugin descriptor, plugin.xml, appears only when the resource bundles a plugin. It names the entry-point class, the class-loading strategy, the plugins the code requires, and each jar to put on the runtime classpath.

Both files are exacting, and both must agree with the archive's actual contents. Writing them by hand is where resource authoring usually goes wrong, which is why Forge generates them from properties: see Resource descriptor and Plugin descriptor.

One repository, one resource

Forge in its current version maps one Git repository to one resource, and that resource to at most one plugin jar. A project that needs a second resource needs a second repository.

On this page