dockerPreparePlugin icon indicating copy to clipboard operation
dockerPreparePlugin copied to clipboard

commonService labeled dependencies cannot be found if they are defined in a subproject

Open gclayburg opened this issue 7 years ago • 1 comments

You can get a fatal error like this:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':policyconsole:expandBootJar'.
> 
  WARNING!!! one or more commonService dependencies not found in your project 
  commonService = [org.springframework.boot:spring-boot-starter-web, org.springframework.boot:spring-boot-actuator] 
  but,
  found =         [org.springframework.boot:spring-boot-starter-web]

when org.springframework.boot:spring-boot-actuator is actually defined in a subproject instead of the same project where this plugin is applied.

gclayburg avatar Oct 24 '17 19:10 gclayburg

As a workaround you can just also add this dependency in the project where this plugin is applied:

dockerprepare {
  commonService = ['org.springframework.boot:spring-boot-starter-web','org.springframework.boot:spring-boot-actuator']
}

dependencies{
    compile group: 'org.springframework.boot', name: 'spring-boot-actuator', version:'1.4.7.RELEASE'
...

gclayburg avatar Oct 24 '17 19:10 gclayburg