Reputation: 33
I have a Spring Boot application which can run with Azure or GCP. The bean creation for a specific cloud provider is controlled using Spring profile. Maven is used to create the executable JAR using the Spring Boot Maven Plugin.
The Spring Boot application code uses Azure and GCP SDKs and I would like to create a cloud provider specific executable JAR using Maven profile. To do this, I tried excluding the SDKs of the other cloud provider and as per Spring Boot Maven Plugin documentation, we can
groupId
and artifactId
,
optionally with a classifier if needed.groupId
.This seems to be excluding the artifacts matching the above conditions but along with this, the transitive dependencies of those artifacts also need to be excluded. How can this be achieved with the Spring Boot Maven plugin?
There is a related question - How to exclude transitive dependencies of spring-boot-dependencies from maven import scope but is related to overriding a dependency.
Upvotes: 0
Views: 35