spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
Reduce dependencies of spring-cloud-dataflow-rest-client
Problem description:
spring-cloud-dataflow-rest-client is shipping dependencies which are not required for a client which uses the rest API.
I noticed that hibernate-core and spring-data-jpa are included as implicit dependencies. This way our client accidentially started a h2 database locally.
Also the spring-cloud-skipper dependencies are included in the rest-client which might also not be needed?
Solution description:
Move the data model classes into their own maven artifact which should be used of spring-cloud-data-flow-core and spring-cloud-skipper-core.
This way there are way less implicit dependencies in the spring-cloud-dataflow-rest-client and you can set the version of java for the rest client and the model classes artifact themselves (which could still be 1.8 instead of 17 at a later version)
Also the start time is way faster than with all those dependencies.
Current quick fix: We excluded the artifacts we don't need from the rest client.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-rest-client</artifactId>
<!-- Excluded because we don't need JPA / Hibernate / Skipper for Rest-Calls -->
<exclusions>
<exclusion>
<artifactId>spring-data-jpa</artifactId>
<groupId>org.springframework.data</groupId>
</exclusion>
<exclusion>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
<exclusion>
<artifactId>spring-cloud-skipper</artifactId>
<groupId>org.springframework.cloud</groupId>
</exclusion>
</exclusions>
</dependency>
Description of alternatives: N/A
Additional context: N/A
Sorry, had to bump this to 2.12
No problem - I am glad that you take care of this.