dockerPreparePlugin
dockerPreparePlugin copied to clipboard
commonService labeled dependencies cannot be found if they are defined in a subproject
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.
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'
...