Skip to main content

How do I run Model Validations?

Model Validations can be used and run in multiple ways:

  • CLI
  • Jenkins
  • Maven Plugin
  • Micro RadiantMicro Radiant (MicroRadiant). The graphical modeling IDE and tooling environment used to design, edit, and maintain NS applications and project models.

There are several ways to run the model-validations:

You can run the validations with the expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact.-maven-plugin (version 2022.0.1 and up):

mvn -f pom-expand.xml expanders:validate-model -Dvalidation.html=report.html -Dvalidation.junit=report.xml -Dvalidation.print=true

You can also configure the plugin in the pom-expand.xml:

<plugin>
<groupId>net.democritus.maven.plugins</groupId>
<artifactId>expanders-maven-plugin</artifactId>
<version>${expandersPluginProject.version}</version>
<configuration>
<htmlReport>report.html</htmlReport>
<junitReport>report.xml</junitReport>
</configuration>
</plugin>
error rules

If any rule with priority error fails, the validate-model goal will fail. This is to stop builds of invalid projects, since these issues will probably cause expansion or compilation errors down the line.

This can be disabled by passing the argument -Dvalidation.failIfError=false.