Flat Dir repositories

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Flat Dir repositories

rstudner
Can't seem to find much doc on this (probably in the 200 pages of  
docs.. which are great docs.. I just can't find it hah)

I've successfully used maven repo's with my gradle builds.

Was curious, for a flatDir repository, is it looking for a local  
filesystem that is built up like maven (pom's etc)..

or what I see all the examples doing this:

repositories {
     flatDir name: 'localRepository', dirs: 'lib'
}

Is it just looking for jar files in a folder called lib?

I am guessing the maven/pom route, only because how could it then  
resolve spring 2.5.6 "intelligently" from a lib folder that just  
luckily had exactly the right jars to support the group/name/version  
for spring.

Thanks
Roger


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Flat Dir repositories

Eske Sort
As you assume it just looks for jars/wars/whatever in the 'lib' folder. It resolves versions by looking at the version number in the filename. for instance:
myveryownjar-1.2.0.jar
spring-2.5.6.jar

etc.

At least that is my experience. Maybe someone has a more detailed understanding.

BR
Eske


2009/11/9 Roger Studner <[hidden email]>
Can't seem to find much doc on this (probably in the 200 pages of docs.. which are great docs.. I just can't find it hah)

I've successfully used maven repo's with my gradle builds.

Was curious, for a flatDir repository, is it looking for a local filesystem that is built up like maven (pom's etc)..

or what I see all the examples doing this:

repositories {
   flatDir name: 'localRepository', dirs: 'lib'
}

Is it just looking for jar files in a folder called lib?

I am guessing the maven/pom route, only because how could it then resolve spring 2.5.6 "intelligently" from a lib folder that just luckily had exactly the right jars to support the group/name/version for spring.

Thanks
Roger


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Flat Dir repositories

rstudner
In reply to this post by rstudner


Begin forwarded message:

From: Roger Studner <[hidden email]>
Date: November 8, 2009 8:25:24 PM EST
Subject: Flat Dir repositories

Can't seem to find much doc on this (probably in the 200 pages of docs.. which are great docs.. I just can't find it hah)

I've successfully used maven repo's with my gradle builds.

Was curious, for a flatDir repository, is it looking for a local filesystem that is built up like maven (pom's etc)..

or what I see all the examples doing this:

repositories {
   flatDir name: 'localRepository', dirs: 'lib'
}

Is it just looking for jar files in a folder called lib?

I am guessing the maven/pom route, only because how could it then resolve spring 2.5.6 "intelligently" from a lib folder that just luckily had exactly the right jars to support the group/name/version for spring.

Thanks
Roger


Reply | Threaded
Open this post in threaded view
|

Re: Flat Dir repositories

Adam Murdoch-2
In reply to this post by rstudner


Roger Studner wrote:

> Can't seem to find much doc on this (probably in the 200 pages of
> docs.. which are great docs.. I just can't find it hah)
>
> I've successfully used maven repo's with my gradle builds.
>
> Was curious, for a flatDir repository, is it looking for a local
> filesystem that is built up like maven (pom's etc)..
>
> or what I see all the examples doing this:
>
> repositories {
>     flatDir name: 'localRepository', dirs: 'lib'
> }
>
> Is it just looking for jar files in a folder called lib?
>

Pretty much. For each dependency that you declare in the build script,
Gradle will look for a corresponding file in the 'lib' directory. For
example, for a dependency on 'junit:junit:4.7', Gradle would look for
lib/junit-4.7.jar or lib/junit.jar. It assumes there are no transitive
dependencies.

> I am guessing the maven/pom route, only because how could it then
> resolve spring 2.5.6 "intelligently" from a lib folder that just
> luckily had exactly the right jars to support the group/name/version
> for spring.
>

They can be used along with client modules, where the transitive
dependency info is provided in the build script:
http://gradle.org/0.8/docs/userguide/dependency_management.html#sub:client_module_dependencies


--
Adam Murdoch
Gradle Developer
http://www.gradle.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email