Reputation: 23634
I have very simple structure of project that uses Spring-boot. It is web application that uses some lib that uses jdbc.
So my root setting.gradle
is following:
include ':app:myWeb', 'components:myBackend'
application's standalone build.gradle
compiles reusable lib with:
...
compile(project(":components:myBackend"))
...
But during compilation of myBackend I can get 2 types of errors:
1) no main class (but remember it is a lib), so I can fix it by turning off apply plugin: 'spring-boot'
2) Or error is following:
Could not resolve all dependencies for configuration ':components:myBackend:compile' Could not resolve org.springframework:spring-jdbc:. Required by:SBSServer.components:myBackend:unspecified
So my question is: how to create reusable library that uses spring-jdbc? The text of myBackend build.gradle is there http://codepad.org/Xg3Kys73
Upvotes: 1
Views: 1006
Reputation: 58124
Instead if removing the spring-boot plugin completely you probably just need to switch off the repackage task:
bootRepackage {
enabled = false
}
Upvotes: 1