Skip to content

Commit

Permalink
bom (#460)
Browse files Browse the repository at this point in the history
* Added bom

* no need for this any more!

* Automated readme header
  • Loading branch information
therealryan authored Jul 13, 2023
1 parent f433c41 commit c4a5fd9
Show file tree
Hide file tree
Showing 21 changed files with 284 additions and 63 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Testing framework
* [validation](validation) Checking model consistency
* [assert](assert) Comparing models against systems
* [report](report) Visualising assertion results
* [bom](bom) Bill of materials
* [aggregator](aggregator) Aggregates build artifacts
* [example](example) Service constellation to exercise the flow framework
* [doc](doc) Documentation resources
Expand Down
3 changes: 2 additions & 1 deletion assert/assert-junit4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ It provides the `Flocessor` the `FlowRule` classes, which should be combined in

## Usage

After [importing the `bom`](../../bom):

```xml
<dependency>
<!-- system assertion -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>assert-junit4</artifactId>
<version>${flow.version}</version>
<scope>test</scope>
</dependency>
```
Expand Down
3 changes: 2 additions & 1 deletion assert/assert-junit5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ It provides the `Flocessor` class, which should be used as a generator for a [dy

## Usage

After [importing the `bom`](../../bom):

```xml
<dependency>
<!-- system assertion -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>assert-junit5</artifactId>
<version>${flow.version}</version>
<scope>test</scope>
</dependency>
```
Expand Down
69 changes: 69 additions & 0 deletions bom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

<!-- title start -->

# bom

Bill of materials



* [../flow](https://github.com/Mastercard/flow) Testing framework

<!-- title end -->

## Overview

This pom-only project offers a mechanism to coordinate the versions of the other flow artifacts that you consume.

## Usage

Import the bom into the `/project/dependencyManagement` section of your pom file:

```xml
<project>
...
<dependencyManagement>
<dependencies>
<dependency>
<!-- controls flow artifact versions -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>bom</artifactId>
<version>x.y.x</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
...
<project>
```
The latest release version is [![Maven Central](https://img.shields.io/maven-central/v/com.mastercard.test.flow/parent)](https://search.maven.org/search?q=com.mastercard.test.flow).

The versions of other flow artifacts in your `/project/dependencies` section will then automatically match that of the bom:

```xml
<project>
...
<dependencies>
<dependency>
<!-- flow construction. Version controlled by bom import -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>builder</artifactId>
</dependency>
<dependency>
<!-- flow grouping. Version controlled by bom import -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>group</artifactId>
</dependency>
<dependency>
<!-- JSON messages. Version controlled by bom import -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>message-json</artifactId>
</dependency>
</dependencies>
...
<project>
```

At some point you'll find yourself having to track down the source of a dependency version, a task that is complicated by the use of bom imports.
Running `mvn help:effective-pom -Dverbose=true` will be instructive in such cases.
132 changes: 132 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>parent</artifactId>
<version>0.0.16-SNAPSHOT</version>
</parent>
<artifactId>bom</artifactId>
<packaging>pom</packaging>
<description>Bill of materials</description>

<dependencyManagement>
<dependencies>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>builder</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>message-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>message-text</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-json</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-http</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-sql</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-web</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-xml</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>model</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>validation-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>validation-junit4</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>validation-junit5</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>coppice</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>report-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assert-filter</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assert-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assert-junit4</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<artifactId>assert-junit5</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>
</dependencyManagement>
</project>
3 changes: 2 additions & 1 deletion builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ and in the [example system model project](../example/app-model).

## Usage

After [importing the `bom`](../bom):

```xml
<dependency>
<!-- flow construction -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>builder</artifactId>
<version>${flow.version}</version>
</dependency>
```

Expand Down
25 changes: 13 additions & 12 deletions doc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
<packaging>jar</packaging>
<description>Documentation resources</description>

<dependencyManagement>
<dependencies>
<dependency>
<!-- controls flow artifact versions -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand All @@ -22,7 +35,6 @@
<!-- flow construction -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>builder</artifactId>
<version>${project.version}</version>
</dependency>
<!-- snippet-end:build -->

Expand All @@ -31,67 +43,57 @@
<!-- simple text message type (other types packaged separately) -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>message-text</artifactId>
<version>${project.version}</version>
</dependency>
<!-- snippet-end:message -->

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-json</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-http</artifactId>
<version>${project.version}</version>
</dependency>

<!-- snippet-start:model -->
<dependency>
<!-- flow grouping -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>model</artifactId>
<version>${project.version}</version>
</dependency>
<!-- snippet-end:model -->

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>validation-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>validation-junit4</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>report-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assert-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assert-junit4</artifactId>
<version>${project.version}</version>
</dependency>

<!-- snippet-start:validation -->
<dependency>
<!-- system model validation -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>validation-junit5</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- snippet-end:validation -->
Expand All @@ -101,7 +103,6 @@
<!-- system assertion -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>assert-junit5</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- snippet-end:assertion -->
Expand Down
Loading

0 comments on commit c4a5fd9

Please sign in to comment.