Skip to content

Commit

Permalink
feat(init/java): model CDK version in property in Maven POMs (aws#7931)
Browse files Browse the repository at this point in the history
Instead of repeating the CDK libraries version for each library in the
POM, declare a property to hold this value and use it in the
dependencies section, as is the preferred way.

Fixes aws#7862
  • Loading branch information
RomainMuller authored May 12, 2020
1 parent 8c92da3 commit ce5b8fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cdk.version>%cdk-version%</cdk.version>
</properties>

<build>
Expand Down Expand Up @@ -39,7 +40,7 @@
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>core</artifactId>
<version>%cdk-version%</version>
<version>${cdk.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<version>0.1</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cdk.version>%cdk-version%</cdk.version>
</properties>
<build>
<plugins>
Expand Down Expand Up @@ -34,24 +35,24 @@
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>core</artifactId>
<version>%cdk-version%</version>
<version>${cdk.version}</version>
</dependency>

<!-- Respective AWS Construct Libraries -->
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>sns</artifactId>
<version>%cdk-version%</version>
<version>${cdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>sns-subscriptions</artifactId>
<version>%cdk-version%</version>
<version>${cdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>sqs</artifactId>
<version>%cdk-version%</version>
<version>${cdk.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
Expand Down

0 comments on commit ce5b8fb

Please sign in to comment.