Skip to content

Commit

Permalink
we prefer the variable
Browse files Browse the repository at this point in the history
  • Loading branch information
therealryan committed Jun 7, 2024
1 parent 3447820 commit ac16e7a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 24 deletions.
42 changes: 21 additions & 21 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,127 +13,127 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.mastercard.test.flow</groupId>
<groupId>${project.groupId}</groupId>
<artifactId>api</artifactId>
<version>${project.version}</version>
</dependency>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<dependency>
<groupId>com.mastercard.test.flow</groupId>
<groupId>${project.groupId}</groupId>
<artifactId>validation-junit5</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
12 changes: 10 additions & 2 deletions doc/src/test/java/com/mastercard/test/flow/doc/BomTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ void check() {
+ "\t\t\t\t<artifactId>%s</artifactId>\n"
+ "\t\t\t\t<version>%s</version>\n"
+ "\t\t\t</dependency>",
artifact.groupId(), artifact.artifactId(), artifact.version() ) )
artifact.groupId()
.replace( bom.groupId(), "${project.groupId}" ),
artifact.artifactId(),
artifact.version()
.replace( bom.version(), "${project.version}" ) ) )
.collect( joining(
"\n\n",
""
Expand All @@ -63,7 +67,11 @@ void check() {
+ "\t\t\t\t<artifactId>%s</artifactId>\n"
+ "\t\t\t\t<version>%s</version>\n"
+ "\t\t\t</dependency>",
dep.groupId(), dep.artifactId(), dep.version() ) )
dep.groupId()
.replace( bom.groupId(), "${project.groupId}" ),
dep.artifactId(),
dep.version()
.replace( bom.version(), "${project.version}" ) ) )
.collect( joining(
"\n\n",
""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PomData {
.orElseGet( () -> parent.groupId() );
version = Optional.of( xpath.evaluate( "/project/version", doc ) )
.filter( s -> !s.isEmpty() )
.orElse( "${project.version}" );
.orElseGet( () -> parent.version() );
packaging = xpath.evaluate( "/project/packaging", doc );
name = xpath.evaluate( "/project/name", doc );
description = xpath.evaluate( "/project/description", doc );
Expand Down

0 comments on commit ac16e7a

Please sign in to comment.