Forge
Reference

Plugin descriptor

Every attribute of the generated plugin.xml.

A plugin descriptor, plugin.xml, declares a plugin's metadata and the libraries it loads. Dassault documents the format in Plugin descriptor.

Forge writes this file from the resource.* and plugin.* properties and from the jars assemblePlugin collected, so a project edits properties rather than XML.

Example

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plugin class="com.lumon.macrodatarefinement.Main" class-lookup="GlobalFirst" id="com.lumon.macrodata-refinement" internalVersion="8009027" name="Macrodata Refinement" ownClassloader="false" provider-name="Mark S" version="8.9.27">
  <requires>
    <api version="1.2"/>
    <required-plugin id="com.nomagic.magicdraw.plugins.impl.sysml" internalVersion="202400000" name="SysML" version="2024x Refresh2"/>
  </requires>
  <runtime>
    <library name="macrodata-refinement-8.9.27-2024x-refresh2.jar"/>
    <library name="libs/jackson-annotations-2.15.2.jar"/>
    <library name="libs/jackson-core-2.15.2.jar"/>
    <library name="libs/jackson-databind-2.15.2.jar"/>
  </runtime>
</plugin>

Attributes

The Rule column below states the XML schema's own contract for each attribute — what Dassault's plugin manager accepts when it reads plugin.xml directly. That is a different contract from the Forge property that fills each attribute: class-lookup and ownClassloader carry a schema default, but the plugin.classLookup and plugin.ownClassloader properties that supply them do not carry a matching one and are mandatory whenever resource.type reads Plugin or Plugin (commercial). See Plugin metadata for the property rule.

plugin

NameDescriptionRule
classFully qualified name of the class the plugin manager loads and initializes, stored in the plugin runtime library and derived from com.nomagic.magicdraw.pluginsvalidatePluginClass fails the build unless the class extends com.nomagic.magicdraw.plugins.Plugin, is concrete and has a public no-argument constructor
class-lookupPriority of the parent class loader when the plugin uses ownClassloader. LocalFirst loads classes from the plugin's own loader even when the tool core also carries them, which is what lets a plugin use its own version of a shared libraryOptional in the XML schema; LocalFirst or GlobalFirst (default). The plugin.classLookup property that supplies it carries no default: see Plugin metadata
idUnique plugin identifier, used by the plugin manager and by other plugins declaring a requirement
internalVersionPlugin internal version, used when checking dependenciesPositive integer
namePlugin name
ownClassloaderWhether the plugin loads in a class loader of its own rather than the shared one. Use it when plugin library versions conflictOptional in the XML schema; boolean, default false. The plugin.ownClassloader property that supplies it carries no default: see Plugin metadata
provider-nameProvider name, company or author
versionPlugin version, used to check dependencies when internalVersion is absentPrefer semantic versioning; free text is accepted

requires

NameDescriptionRule
api versionModeling-tool API version requiredFor example, 1.2

required-plugin

NameDescriptionRule
idIdentifier of the required pluginMust match another plugin's id
internalVersionInternal version of the required pluginPositive integer
nameName of the required pluginMust match another plugin's name
versionVersion of the required pluginFor example, 2024x Refresh2

Forge fills these nodes from the catiaMagic dependencies a project declares. See Declare dependencies.

runtime

One <library> element per jar the plugin needs at runtime.

NameDescriptionRule
library namePath of the library, relative to the descriptor directory, using forward slashesFor example, pluginlib.jar, libs/otherlib.jar

On this page