- Posts: 5
- Thank you received: 0
×
Modelio 4.0.0 released (07 Nov 2019)
Modelio 4.0.0 has been released ( www.modelio.org/forum/4-announcements/45...-4-0-0-released.html )
[Solved] Cannot package module (in developer's tutorial)
- INTO-CPS-Rasmus
-
- Offline
- Fresh Boarder
-
Less More
7 years 10 months ago - 7 years 10 months ago #3252 by INTO-CPS-Rasmus
Hi,
I'm not sure if the problem has been solved, but I had an identical problem, which I managed to solve with help.
1. There was a problem with the 3.3.0 archetype, so the module.xml was incorrect.
2. In the pom.xml add:
</descriptors> <finalName>${project.name}_${project.version}</finalName>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
The module should now work in modelio.
3. As a last remark to use the "DiagramElementCreationExample" in modelio to craete a box, a change has to be made in the module.xml file being under tools:
<Scope-target metaclass="ModelTree"/>
change into
<Scope-source metaclass="ModelTree"/>
Regards
I'm not sure if the problem has been solved, but I had an identical problem, which I managed to solve with help.
1. There was a problem with the 3.3.0 archetype, so the module.xml was incorrect.
Warning: Spoiler! [ Click to expand ] [ Click to hide ]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Module id="${project.name}" class="modelio.org.helloworld.impl.HelloWorldModule" binaryversion="3.3.00.9023" version="${project.version}.9023" schema-level="2" uid="1ca34fa4-7a23-48c2-89f3-3e2a3c67f5c9">
<ClassPath>
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
<PathEntry path="lib/commons-lang3-3.1.jar"/>
</ClassPath>
<Profiles>
<Profile uid="374586a8-bdf3-4656-8bc4-44de2ce1d7a0" id="TestArchetypeProfile">
<Stereotype name="stereotype1" metaclass="Class" is-hidden="false" label="Stereotype 1" uid="8a2a2b4a-74cd-40c4-8e71-7bbff77536a8">
<Icon path="res/icons/Stereotype1_16.png"/>
<Image path="res/icons/Stereotype1_48.png"/>
</Stereotype>
<Stereotype name="stereotype2" metaclass="ClassDiagram" is-hidden="false" label="Stereotype 2" uid="74a7f5ab-3bb3-486f-a142-b286619867bf">
<Icon path="res/icons/Stereotype2_16.png"/>
<Image path="res/icons/Stereotype2_16.png"/>
</Stereotype>
<MetaclassReference uid="29cf609b-4b1e-4619-80dc-39b72f4d575b" metaclass="ModelElement">
<TagTypes>
<TagType name="TagName" uid="f66bdd4c-dec4-4ad4-9134-ad662e84b4fe" label="Name" parameter-card="1" is-hidden="false" is-signed="false"/>
</TagTypes>
</MetaclassReference>
</Profile>
</Profiles>
<Gui>
<Commands>
<Command id="HelloWorldCommand" label="%HelloWorldCommandLabel" tooltip="%HelloWorldCommandTooltip" image="res/icons/HelloWorldCommand_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="modelio.org.helloworld.command.HelloWorldCommand"/>
</Command>
<Command id="CreateElementCommandExample" label="%CreateElementCommandExampleLabel" tooltip="%CreateElementCommandExampleTooltip" image="res/icons/Stereotype1_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="GenericElementCreationHandler">
<HParameter name="metaclass" value="Class"/>
<HParameter name="stereotype" value="stereotype1"/>
</Handler>
</Command>
<Command id="CreateDiagramCommandExample" label="%CreateDiagramCommandExampleLabel" tooltip="%CreateDiagramCommandExampleTooltip" image="res/icons/Stereotype2_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="GenericDiagramCreationHandler">
<HParameter name="metaclass" value="ClassDiagram"/>
<HParameter name="stereotype" value="stereotype2"/>
</Handler>
</Command>
</Commands>
<Tools>
<Tool id="CreateElementDiagramCommandExample" label="%CreateElementDiagramCommandExampleLabel" tooltip="%CreateElementDiagramCommandExampleTooltip" image="res/icons/Stereotype1_16.png">
<Scope-target metaclass="ModelTree"/>
<Handler class="Box">
<HParameter name="metaclass" value="Class"/>
<HParameter name="stereotype" value="stereotype1"/>
</Handler>
</Tool>
</Tools>
<ContextualMenu>
<CommandRef refid="HelloWorldCommand"/>
<CommandRef refid="CreateElementCommandExample"/>
<CommandRef refid="CreateDiagramCommandExample"/>
</ContextualMenu>
<Diagrams>
<DiagramType base-diagram="ClassDiagram" stereotype="stereotype2">
<Palette keepBasePalette="false">
<ToolRef refid="CreateElementDiagramCommandExample" group="Customization"/>
</Palette>
<Handler class="StandardCustomizer"/>
</DiagramType>
</Diagrams>
<Views/>
</Gui>
<Dependencies/>
</Module>
<Module id="${project.name}" class="modelio.org.helloworld.impl.HelloWorldModule" binaryversion="3.3.00.9023" version="${project.version}.9023" schema-level="2" uid="1ca34fa4-7a23-48c2-89f3-3e2a3c67f5c9">
<ClassPath>
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
<PathEntry path="lib/commons-lang3-3.1.jar"/>
</ClassPath>
<Profiles>
<Profile uid="374586a8-bdf3-4656-8bc4-44de2ce1d7a0" id="TestArchetypeProfile">
<Stereotype name="stereotype1" metaclass="Class" is-hidden="false" label="Stereotype 1" uid="8a2a2b4a-74cd-40c4-8e71-7bbff77536a8">
<Icon path="res/icons/Stereotype1_16.png"/>
<Image path="res/icons/Stereotype1_48.png"/>
</Stereotype>
<Stereotype name="stereotype2" metaclass="ClassDiagram" is-hidden="false" label="Stereotype 2" uid="74a7f5ab-3bb3-486f-a142-b286619867bf">
<Icon path="res/icons/Stereotype2_16.png"/>
<Image path="res/icons/Stereotype2_16.png"/>
</Stereotype>
<MetaclassReference uid="29cf609b-4b1e-4619-80dc-39b72f4d575b" metaclass="ModelElement">
<TagTypes>
<TagType name="TagName" uid="f66bdd4c-dec4-4ad4-9134-ad662e84b4fe" label="Name" parameter-card="1" is-hidden="false" is-signed="false"/>
</TagTypes>
</MetaclassReference>
</Profile>
</Profiles>
<Gui>
<Commands>
<Command id="HelloWorldCommand" label="%HelloWorldCommandLabel" tooltip="%HelloWorldCommandTooltip" image="res/icons/HelloWorldCommand_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="modelio.org.helloworld.command.HelloWorldCommand"/>
</Command>
<Command id="CreateElementCommandExample" label="%CreateElementCommandExampleLabel" tooltip="%CreateElementCommandExampleTooltip" image="res/icons/Stereotype1_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="GenericElementCreationHandler">
<HParameter name="metaclass" value="Class"/>
<HParameter name="stereotype" value="stereotype1"/>
</Handler>
</Command>
<Command id="CreateDiagramCommandExample" label="%CreateDiagramCommandExampleLabel" tooltip="%CreateDiagramCommandExampleTooltip" image="res/icons/Stereotype2_16.png" group="" modify-model="" group-image="">
<Scope metaclass="ModelTree"/>
<Handler class="GenericDiagramCreationHandler">
<HParameter name="metaclass" value="ClassDiagram"/>
<HParameter name="stereotype" value="stereotype2"/>
</Handler>
</Command>
</Commands>
<Tools>
<Tool id="CreateElementDiagramCommandExample" label="%CreateElementDiagramCommandExampleLabel" tooltip="%CreateElementDiagramCommandExampleTooltip" image="res/icons/Stereotype1_16.png">
<Scope-target metaclass="ModelTree"/>
<Handler class="Box">
<HParameter name="metaclass" value="Class"/>
<HParameter name="stereotype" value="stereotype1"/>
</Handler>
</Tool>
</Tools>
<ContextualMenu>
<CommandRef refid="HelloWorldCommand"/>
<CommandRef refid="CreateElementCommandExample"/>
<CommandRef refid="CreateDiagramCommandExample"/>
</ContextualMenu>
<Diagrams>
<DiagramType base-diagram="ClassDiagram" stereotype="stereotype2">
<Palette keepBasePalette="false">
<ToolRef refid="CreateElementDiagramCommandExample" group="Customization"/>
</Palette>
<Handler class="StandardCustomizer"/>
</DiagramType>
</Diagrams>
<Views/>
</Gui>
<Dependencies/>
</Module>
2. In the pom.xml add:
</descriptors> <finalName>${project.name}_${project.version}</finalName>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
The module should now work in modelio.
3. As a last remark to use the "DiagramElementCreationExample" in modelio to craete a box, a change has to be made in the module.xml file being under tools:
<Scope-target metaclass="ModelTree"/>
change into
<Scope-source metaclass="ModelTree"/>
Regards
Last Edit: 7 years 10 months ago by INTO-CPS-Rasmus.
The topic has been locked.
Time to create page: 0.035 seconds