You're welcome.

Check out Nexus from Sonatype, its an open source version of their
Repository manager. I've worked a little with it and it seems okay. There's
also Artifactory from the JFrog guys, but I havent got any experience with
that one.

To be honest I'm not sure what the best practice is in your case. There's
probably other people on the list with more experience with this kind of
problem, maybe they can answer what the best approach is.

To me it seems like having to maintain someone else artifact in your local
Repository would mean extra work without getting much benefit. With other
dependencies you can just go in and configure your repository to cache the
dependencies from Maven Central but in the case of a custom artifact that
you do not control yourself you'll either have to set up a project to deploy
to your repository or just deploy it manually when you need to update it.
That might not seem like a big deal, but it will mean that you're software
can't build without the repository available which wouldn't be the case with
all your other dependencies (unless you're on a restricted network, then my
point is kinda moot in the first place).

Finally, both options should work just fine. You know more about your use
case than I do so you're much better equiped to figuring out the what the
best approach is in your case.

Regards,
/Leo

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

> Thanks for the input, Leo. I am in unfamiliar territory so I really
> appreciate your perspective.
>
> I want to set up the repository for the team/enterprise and I am starting
> with the simplest build we have on my computer, going one step at a time. I
> started by getting it running with all of my jars in the lib directory of
> the project (they are currently that way in Subversion). Then I got it
> running resolving the dependencies from public repositories with the minimum
> set of dependencies that resolved everything, allowing me to remove the jars
> from the lib directory.
>
> Once I get that working the way I want - and this one jar is frustrating me
> - I want to move it to an enterprise repository. I am running Apache HTTP
> server locally to test accessing it through a URLResolver and that seems to
> work fine. I figure that however I get it into the Ivy repository on my
> computer is the way I would get it into Ivy on a repository server (running
> Apache HTTP too I assume) for location and enterprise accessibility.
>
> What I want to end up with (I think) is a build that goes through a shared
> repository for a location, then a shared repository for the enterprise. I
> don't expect our builds to go against public repositories or allow anyone
> outside of the company access to our repositories.
>
> Getting this jar into a repository seems like it should be easy. I gather
> by your response ("Wouldn't it be easier...") that it is not.(?)
>
> -Andy
>
>
>
>  *Leonard Axelsson <[email protected]>*
>
> 04/05/2011 03:36 AM
>  Please respond to
> [email protected]
>
>   To
> [email protected]
> cc
>   Subject
> Re: [gradle-user] Placing an arbitrary file into Ivy
>
>
>
>
> 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]*<[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/* <http://xlson.com/>
> Twitter: xlson
>
>


-------------------------------------------------------

Leonard Axelsson
Agical AB

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

Reply via email to