Wouldn't it be easier to add the file to a lib folder in your repo and just
use it using a files(...) dependency like this:

dependencies {
    runtime files('lib/jdbc-dependency.jar')


Maybe there's a better way but I don't see the benefit of putting it into
the Ivy repository as it will only be available on your computer, and just
as long as you don't clear the repository (or Ivy does it for you). There
might be a usecase for publishing someone elses artifacts to a central
repository if there's several people using that repository but otherwise I'd
not suggest doing it.

My 2 c's

/Leo

On Tue, Apr 5, 2011 at 3:50 AM, Andy Goodspeed <[email protected]>wrote:

> I am feeling rather dense. I am trying to place an arbitrary file - my
> database vendor's JDBC driver jar - into an Ivy repository for use by
> Gradle. (I am trying to replace an old Ant build without dependency
> management with a Gradle build using Ivy.)
>
> For the files I have that I can find in a public repository I am able to
> get them into Gradle, and therefore into Ivy. I am doing this with the
> following task after a successful build, which works whether it is good
> practice or not - comments welcome.
>
> task repoSetup(type: Copy) {
>   description = "Copy compile dependencies into Ivy repository"
>   from "${gradle.gradleUserHomeDir}/cache"
>   into "C:/ivy/repo"
> }
>
> I have the JDBC jar file supplied by my database vendor but I cannot find
> it in a public repository out there. So how do I get it into the Ivy
> repository, ideally with the organisation that I want? Is there some
> documentation that I have overlooked on doing this sort of thing?
>
> Thanks for any guidance.
>
> -Andy




-------------------------------------------------------
Leonard Axelsson
Agical AB

Blog: http://xlson.com/
Twitter: xlson

Reply via email to