Skip to main content

Class Path Dependencies for expansion-resources

If your expansion-resource requires libraries to be available on the class-path when expanding, there is an option to define the resources in the expansionResource.xml.

First, add the dependencies to your pom.xml file:


Any dependencies with scope test or provided will be ignored.

Next, enable the option includeClassPathDependencies on the expanders-maven-plugin:


After the build, the expansionResource.xml should now contain the ClassPathDependency for your library:

<expansionResource name="org.normalizedsystems.moo:my-expanders">
<!-- ... -->

During expansion, these ClassPathDependencies will be resolved and added to the class-path.


If multiple expansion-resources reference different versions of the same artifact, only the newest version will be resolved.

Metamodel projects

For metamodel projects, the metamodel-stack version 4.6.0 introduces the option meta.packaging.useClassPathDependencies. If you put this option on the ApplicationInstance, it will replace the fat jar assembly build with a slim jar with ClassPathDependencies.

Supported Versions

The minimum version requirements for this functionality are:

  • expanders-maven-plugin:2022.1.3
  • prime-core:2022.4.1