spring-cloud / spring-cloud-cli

Spring Cloud CLI features
Apache License 2.0
155 stars 80 forks source link

Rabbit profile not working #145

Open dsyer opened 4 years ago

dsyer commented 4 years ago

The Cloud BOM gets erased from the launcher app poms by the flatten-maven-plugin.

Here's a workaround.

$ ls
cloud.yml thin-rabbit.properties
$ spring cloud stubrunner
...
2020-03-23 13:50:30.018  INFO 28638 --- [rC-Me-jWycxLg-2] o.s.a.r.c.CachingConnectionFactory       : Attempting to connect to: [localhost:5672]
$ cat cloud.yml
spring:
  profiles:
    active: rabbit
$ cat thin-rabbit.properties
boms.spring-cloud=org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR3
spencergibb commented 4 years ago

Is it because it is not used directly? I thought flatten just got rid of things like the snapshot and milestone repositories.

dsyer commented 4 years ago

Not sure. It might be because the stubrunner actually doesn't use the bom directly, so it relies on one of its parents to provide it. The parent is the one that is actually breaks this, but probably it has its own reasons to strip the BOM. IDK.