Skip to content

Commit ecf99dd

Browse files
committed
Exclude sba-server-cloud from bom and starter when cloud is excluded
1 parent c2514ec commit ecf99dd

File tree

4 files changed

+44
-9
lines changed

4 files changed

+44
-9
lines changed

pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@
168168
<configuration>
169169
<updatePomFile>true</updatePomFile>
170170
<flattenMode>oss</flattenMode>
171+
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
172+
<pomElements>
173+
<distributionManagement>remove</distributionManagement>
174+
<repositories>remove</repositories>
175+
</pomElements>
171176
</configuration>
172177
<executions>
173178
<execution>

spring-boot-admin-build/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<configuration>
7070
<updatePomFile>true</updatePomFile>
7171
<flattenMode>oss</flattenMode>
72+
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
7273
<pomElements>
7374
<parent>expand</parent>
7475
<distributionManagement>remove</distributionManagement>

spring-boot-admin-dependencies/pom.xml

+19-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040
<artifactId>spring-boot-admin-server-ui</artifactId>
4141
<version>${revision}</version>
4242
</dependency>
43-
<dependency>
44-
<groupId>de.codecentric</groupId>
45-
<artifactId>spring-boot-admin-server-cloud</artifactId>
46-
<version>${revision}</version>
47-
</dependency>
4843
<dependency>
4944
<groupId>de.codecentric</groupId>
5045
<artifactId>spring-boot-admin-client</artifactId>
@@ -90,4 +85,23 @@
9085
</plugin>
9186
</plugins>
9287
</build>
88+
<profiles>
89+
<profile>
90+
<id>include-cloud</id>
91+
<activation>
92+
<property>
93+
<name>!excludeSpringCloud</name>
94+
</property>
95+
</activation>
96+
<dependencyManagement>
97+
<dependencies>
98+
<dependency>
99+
<groupId>de.codecentric</groupId>
100+
<artifactId>spring-boot-admin-server-cloud</artifactId>
101+
<version>${revision}</version>
102+
</dependency>
103+
</dependencies>
104+
</dependencyManagement>
105+
</profile>
106+
</profiles>
93107
</project>

spring-boot-admin-starter-server/pom.xml

+19-4
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,28 @@
3232
<groupId>de.codecentric</groupId>
3333
<artifactId>spring-boot-admin-server</artifactId>
3434
</dependency>
35-
<dependency>
36-
<groupId>de.codecentric</groupId>
37-
<artifactId>spring-boot-admin-server-cloud</artifactId>
38-
</dependency>
3935
<dependency>
4036
<groupId>de.codecentric</groupId>
4137
<artifactId>spring-boot-admin-server-ui</artifactId>
4238
</dependency>
4339
</dependencies>
40+
<profiles>
41+
<profile>
42+
<id>include-cloud</id>
43+
<activation>
44+
<property>
45+
<name>!excludeSpringCloud</name>
46+
</property>
47+
</activation>
48+
<dependencies>
49+
<dependency>
50+
<groupId>de.codecentric</groupId>
51+
<artifactId>spring-boot-admin-server-cloud</artifactId>
52+
<!--fix for https://github.com/mojohaus/flatten-maven-plugin/issues/70 -->
53+
<version>${revision}</version>
54+
<scope>compile</scope>
55+
</dependency>
56+
</dependencies>
57+
</profile>
58+
</profiles>
4459
</project>

0 commit comments

Comments
 (0)