Updating Library Dependencies

It is possible to override the versions of libraries included by maven by providing config files to the expanders in the form of YAML files.

library dependency YAML files

The config files have the following structure:

  <name>: <version>
- applicationLayer: <layer>
  technology: <technology>
    groupId: <groupId>
    artifactId: <artifactId>
    version: <version> | $<versionName>
    scope: <scope>

The versions entries can be used to define versions for artifacts. The name can then be referenced to define the version of a mavenArtifact. The expanders has a default YAML file that defines all dependencies included in the pom.xml files and it is possible to override the version entries used in this file to for example update the struts version:

  struts: 2.3.35

For reference, the YAML file for expanders 3.2.0 can be found in Default Library Config

The dependencies entries can be used to define additional dependencies. Use the following values for layer and technology:

<technology> = COMMON | STRUTS2 | COCOON2 | EJB2 | EJB3 | EJB3_0 | EJB3_1 | JPA | ANT | YAML

The version field can be a version string (e.g. “version: 1.2.3”) or a reference to a version defined under versions (e.g. “version: $foo”)

The artifact will be added as a dependency in the defined layer if the defined technology is used or if the technology is COMMON.

adding the YAML file to the expansion configuration

An option –libDependencyPath can be provided to net.democritus.runner.ExpandApplicationFromPath in order to configure extra YAML files. This should point to each separate file, separated with a valid file separator. E.g. in windows: --libDependencyPath ./dependencies/libs1.yaml;./dependencies/libs2.yaml


Release Expander version Change
201710 3.2.0 exposed yaml file with ‘–libDependencyPath’ option