I am working on a legacy java project which is built based on Ant. I want to migrate that to gradle. As a part of that, I have identified the libraries which can be downloaded from maven repos. But there are some custom jars, which are only required during compile time. Instead of downloading them to local folder and declare as flatdir repo, can I directly add SVN/HTTP(S) location as a repo location?
You could probably declare your remote location as an Ivy repository with a specific pattern that reflects the organizational structure within that repository. How are your libraries organized in terms of directory structure?
They are just libraries in a lib folder with no organization. I have tried declaring a remote IVY, but it failed stating no ivy.xml found. I don’t have any luxury to add ivy XMLs to the SVN repo as it is read only.
Do you still get the ivy.xml complaint if you specify @jar at the end of each dependency? Check out the User Guide, Section 50.4.1.2. Artifact only notation for more details.
repositories {
ivy {
url 'http://www.example.com'
layout 'pattern', {
artifact '[artifact].[ext]'
}
}
}
configurations {
myconfig
}
dependencies {
myconfig ':index:@html'
}
This still might not actually work for you, as depending upon how the subversion files are served up, it might still fail with a 401 error. Gradle will attempt to do a HEAD request, which doesn’t seem to be accepted by all SVN web serving front ends.
-Spencer