Reputation: 10043
I am building a Spring Boot web application and in my setup I have a local repository that hosts all my thirdparty JARs - the repository is ivy format. I have been able to build the WAR file whilst connecting to Maven Central repository, and I now need to be able to build offline from my local repository.
I have copied all the dependencies required into the ivy format (/{module}/{name}/{version}/{name}-{version}.jar
) and I now want to turn off the mavenCentral()
repository and just build locally.
However, if i run gradle dependencies I am not seeing any of the transitive dependencies listed as I do when I am connected to maven central. In my local repo I have also added the appropriate .pom file (following same naming convention as the JAR file) and also tried adding the ivy.xml files but still no sign of the transitive dependencies.
Can anyone point me in the right direction or suggest what I am doing wrong here?
An example of one of my Spring-Boot JARs in my local repo:
$ ls /repo/org.springframework.boot/spring-boot-starter-web/1.1.8.RELEASE
spring-boot-starter-web-1.1.8.RELEASE.jar spring-boot-starter-web-1.1.8.RELEASE.pom
My build file configuring the local ivy repo:
repositories {
ivy { url "file://repo" }
}
Sample of running gradle dependencies:
+--- org.springframework.boot:spring-boot-starter-web: -> 1.1.8.RELEASE
+--- org.springframework.boot:spring-boot-starter-security: -> 1.1.8.RELEASE
+--- org.springframework.boot:spring-boot-starter-thymeleaf: -> 1.1.8.RELEASE
+--- org.springframework:spring-context-support: -> 4.0.7.RELEASE
Upvotes: 1
Views: 1162
Reputation: 13486
If you're not getting transitive dependencies then it probably can't find the metadata descriptor (ivy.xml). You may have to specify a custom layout. Check here for details.
Upvotes: 1