modelant publishes a Maven plugin net.mdatools:modelant.uml13.maven:3.1.0 with the following goals:
Please note:
<plugin> <groupId>net.mdatools</groupId> <artifactId>modelant.uml13.maven.plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>xsd-to-uml13</goal> </goals> <configuration> <schemaFile>...</schemaFile> <outputFile>...</outputFile> </configuration> </execution> </executions> </plugin>
where:
NOTE: The used compile phase is default and recommended only. Any other phase would work too.
See modelant.uml13.reverse module for details.
<plugin> <groupId>net.mdatools</groupId> <artifactId>modelant.uml13.maven.plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>reverseEngineerDatabaseInUml13</goal> </goals> <configuration> <driver>...</driver> <url>...</url> <user>...</user> <password>...</password> <schema>...</schema> <outputFile>...</outputFile> </configuration> </execution> </executions> </plugin>
where:
NOTE: The used compile phase is recommended only. Any other phase would work too.
See modelant.uml13.reverse module for details.
<plugin> <groupId>net.mdatools</groupId> <artifactId>modelant.uml13.maven.javauml</artifactId> <version>3.2.0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>reverseEngineerJavaInUml13</goal> </goals> <configuration> <sourcepath>...</sourcepath> <outputDirectory>...</outputDirectory> <includeDependencySources>false</includeDependencySources> <includeTransitiveDependencySources>false</includeTransitiveDependencySources> <debug>true</debug> <verbose>true</verbose> </configuration> </execution> </executions> </plugin>
where:
NOTE: The compile phase is set by default, so in <execution> we overwrite it.
See modelant.uml13.reverse module for details.
<build> <plugins> <plugin> <groupId>net.mdatools</groupId> <artifactId>modelant.uml13.maven.plugin</artifactId> <version>3.3.0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>compare-uml13-models</goal> </goals> <configuration> <sourceMetamodel>src/resource/source.xml</sourceMetamodel> <targetMetamodel>src/resource/target.xml</targetMetamodel> <export implementation="net.mdatools.modelant.core.operation.model.export.StructuredTextExport"/> </configuration> </execution> </executions> </plugin> </plugins> </build>
where:
In this example the MOF 1.4 ModelElement in the source model with name “Data_Types”, found in the ModelElement with name “Foundation” (as a namespace) corresponds to the MOF 1.4 ModelElement in the target model, named “Data_Types”. The resported outcome is in a JSON-like format.
<build> <plugins> <plugin> <groupId>net.mdatools</groupId> <artifactId>modelant.uml13.maven.plugin</artifactId> <version>3.3.0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>compare-uml13-models</goal> </goals> <configuration> <sourceMetamodel>...</sourceMetamodel> <targetMetamodel>...</targetMetamodel> <equals> <equal> <source>Logical_View::domain</source> <target>domain</target> </equal> ... <export implementation="net.mdatools.modelant.core.operation.model.export.StructuredTextExport"/> </equals> </configuration> </execution> </executions> </plugin> </plugins> </build>
The outcome of model comparison formatted by net.mdatools.modelant.core.operation.model.export.StructuredTextExport is like:
{ deleted = {list of source model elements, that do not exist in the target model}, added = {list of target model elements, that do not exist in the source model}, changed = {list of pairs of corresponding source and target model elements, that have some of the attributes or associations changed}, exactMatch = {list of pairs of corresponding source and target model elements, that match exactly} }