Skip to content

Commit d166284

Browse files
hisenerBabak-abd
authored andcommitted
Move optional tags to module POMs
1 parent e9e992a commit d166284

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

extended/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
<artifactId>client-java-api-fluent</artifactId>
3535
<version>${project.version}</version>
3636
</dependency>
37+
<dependency>
38+
<groupId>io.prometheus</groupId>
39+
<artifactId>simpleclient</artifactId>
40+
<optional>${prometheus.client.optional}</optional>
41+
</dependency>
3742
<dependency>
3843
<groupId>org.apache.commons</groupId>
3944
<artifactId>commons-lang3</artifactId>

pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@
6969
<prometheus.client.version>0.16.0</prometheus.client.version>
7070
<reflections.version>0.10.2</reflections.version>
7171

72+
<!-- The `optional` tag in `dependencyManagement` is not inherited; see
73+
https://issues.apache.org/jira/browse/MNG-5227 and
74+
https://issues.apache.org/jira/browse/MNG-5632. Therefore, we specify
75+
optional dependencies here to manage them in a single location. -->
76+
<prometheus.client.optional>true</prometheus.client.optional>
77+
<com.amazonaws.aws-java-sdk-sts.optional>true</com.amazonaws.aws-java-sdk-sts.optional>
78+
<com.google.auth.google-auth-library-oauth2-http.optional>true</com.google.auth.google-auth-library-oauth2-http.optional>
79+
<org.springframework.boot.spring-boot-actuator.optional>true</org.springframework.boot.spring-boot-actuator.optional>
80+
7281
<e2e.skip>true</e2e.skip>
7382

7483
<gpg.keyname>48540ECBBF00A28EACCF04E720FD12AFB0C9EBA9</gpg.keyname>
@@ -185,19 +194,16 @@
185194
<groupId>org.springframework.boot</groupId>
186195
<artifactId>spring-boot-actuator</artifactId>
187196
<version>${spring.boot.version}</version>
188-
<optional>true</optional>
189197
</dependency>
190198
<dependency>
191199
<groupId>io.prometheus</groupId>
192200
<artifactId>simpleclient</artifactId>
193201
<version>${prometheus.client.version}</version>
194-
<optional>true</optional>
195202
</dependency>
196203
<dependency>
197204
<groupId>io.prometheus</groupId>
198205
<artifactId>simpleclient_httpserver</artifactId>
199206
<version>${prometheus.client.version}</version>
200-
<optional>true</optional>
201207
</dependency>
202208
<dependency>
203209
<groupId>com.google.code.gson</groupId>

spring/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
<artifactId>client-java-extended</artifactId>
2727
<version>${project.version}</version>
2828
</dependency>
29-
29+
<dependency>
30+
<groupId>io.prometheus</groupId>
31+
<artifactId>simpleclient</artifactId>
32+
<optional>${prometheus.client.optional}</optional>
33+
</dependency>
3034
<dependency>
3135
<groupId>org.springframework.boot</groupId>
3236
<artifactId>spring-boot</artifactId>
@@ -38,6 +42,7 @@
3842
<dependency>
3943
<groupId>org.springframework.boot</groupId>
4044
<artifactId>spring-boot-actuator</artifactId>
45+
<optional>${org.springframework.boot.spring-boot-actuator.optional}</optional>
4146
</dependency>
4247
<dependency>
4348
<groupId>com.github.ben-manes.caffeine</groupId>

util/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
<dependency>
1616
<groupId>io.prometheus</groupId>
1717
<artifactId>simpleclient</artifactId>
18+
<optional>${prometheus.client.optional}</optional>
1819
</dependency>
1920
<dependency>
2021
<groupId>io.prometheus</groupId>
2122
<artifactId>simpleclient_httpserver</artifactId>
23+
<optional>${prometheus.client.optional}</optional>
2224
</dependency>
2325
<dependency>
2426
<groupId>io.kubernetes</groupId>
@@ -65,6 +67,7 @@
6567
<dependency>
6668
<groupId>com.amazonaws</groupId>
6769
<artifactId>aws-java-sdk-sts</artifactId>
70+
<optional>${com.amazonaws.aws-java-sdk-sts.optional}</optional>
6871
</dependency>
6972
<dependency>
7073
<groupId>ch.qos.logback</groupId>
@@ -86,7 +89,7 @@
8689
<dependency>
8790
<groupId>com.google.auth</groupId>
8891
<artifactId>google-auth-library-oauth2-http</artifactId>
89-
<optional>true</optional>
92+
<optional>${com.google.auth.google-auth-library-oauth2-http.optional}</optional>
9093
</dependency>
9194
<!-- test dependencies -->
9295
<dependency>

0 commit comments

Comments
 (0)