Hierarchical Filesystem Repository

Hello everyone,

I have a question regarding repository definition for hierarchical filesystem repositories. We currently have a central NFS repository system that is mounted on our build servers and local machines. It follows a consistent pattern similar to the group:artifact:version of a maven repository. For example, the path to one of our artifacts might look like the following:

# the 'X' is a literal 'X' in the path name

Is it possible to define a filesystem repository that will search using that pattern? Our current setup is to use many flatDirs with local variables defining the version. Something like the following:

flatDir {
    '/repository-dir/group1/X/' + VERSION_1 + '/',
# Repository definition for group1:artifact1:VERSION_1
    '/repository-dir/group2/X/' + VERSION_2 + '/',
# Repository definition for group2:artifact2:VERSION_2
    # etc...

This is obviously sub optimal since we have one flatDir definition for every group (and there are a lot different groups) so there are a lot of repo misses while searching for artifacts that reside in flatDirs defined near the bottom of the list. A better solution would be to allow for some kind of override in the search pattern so I could have one definition of the repository root, with the corresponding hierarchical search pattern.

Obviously another alternative would be to simply copy each dependency individually, but it would be nice to use a more declarative approach. :stuck_out_tongue:

You could try defining an Ivy repository using a custom pattern layout.

This worked terrifically, thanks.