# Structured flatDir repository

**URL:** <https://discuss.gradle.org/t/structured-flatdir-repository/3554>\
**Category:** Old Forum Archive\
**Created:** [May 16, 2013, 8:07am UTC](https://discuss.gradle.org/t/structured-flatdir-repository/3554 "2013-05-16T08:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Zillmann](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/johannes_zillmann/32/726_2.png) [@Johannes\_Zillmann](https://discuss.gradle.org/u/Johannes_Zillmann)\
**Post date:** [May 16, 2013, 8:07am UTC](https://discuss.gradle.org/t/structured-flatdir-repository/3554/1 "2013-05-16T08:07:00Z")

</div>

Hey gradlers,

is it possible to have a flatDir repo which is a not exactly flat but structured ? Instead of

```gradle
lib
  |- mockito-core-1.9.0.jar
  |- hamcrest-library-1.1.jar
  |- hibernate.jar

```

something like

```gradle
lib
  |- mockito
          |- mockito-core-1.9.0.jar
          |- hamcrest-library-1.1.jar
  |- hibernate.jar

```

? best Johannes

---

<div class="post-metadata">

**Author:** ![Rene](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rene/32/8082_2.png) [@Rene](https://discuss.gradle.org/u/Rene)\
**Post date:** [May 16, 2013, 9:50am UTC](https://discuss.gradle.org/t/structured-flatdir-repository/3554/2 "2013-05-16T09:50:00Z")

</div>

Hello Johannes, you can use a ivy repository pointing to your local filesystem to achieve that. With ivy you can customize the lookup pattern:

repositories {

ivy {

artifactPattern “$projectDir/lib/[organisation]/[module]-revision.[ext]”

} }

for details about customizing the artifact pattern, have a look at the gradle userguide at [http://www.gradle.org/docs/current/userguide/dependency\_management.html#sec:ivy\_repositories](http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:ivy_repositories)

cheers, René
