<required>true</required>
<description>The id of the repository group.</description>
</field>
+ <field>
+ <name>mergedIndexPath</name>
+ <version>1.2.0+</version>
+ <type>String</type>
+ <required>false</required>
+ <defaultValue>/.indexer</defaultValue>
+ <description>The path of the merged index.</description>
+ </field>
<field>
<name>repositories</name>
<version>1.2.0+</version>
// handle browse requests for virtual repos
if ( RepositoryPathUtil.getLogicalResource( archivaLocator.getOrigResourcePath() ).endsWith( "/" ) )
{
- return getResource( request, repoGroupConfig.getRepositories(), archivaLocator,
- archivaLocator.getRepositoryId() );
+ return getResourceFromGroup( request, repoGroupConfig.getRepositories(), archivaLocator,
+ repoGroupConfig );
}
else
{
}
}
- private DavResource getResource( DavServletRequest request, List<String> repositories,
- ArchivaDavResourceLocator locator, String groupId )
+ private DavResource getResourceFromGroup( DavServletRequest request, List<String> repositories,
+ ArchivaDavResourceLocator locator,
+ RepositoryGroupConfiguration repositoryGroupConfiguration )
throws DavException
{
List<File> mergedRepositoryContents = new ArrayList<File>();
// remove last /
String pathInfo = StringUtils.removeEnd( request.getPathInfo(), "/" );
- if ( StringUtils.endsWith( pathInfo, "/.indexer" ) )
+ if ( StringUtils.endsWith( pathInfo, "/" + repositoryGroupConfiguration.getMergedIndexPath() )
+ || StringUtils.endsWith( pathInfo, "/" + repositoryGroupConfiguration.getMergedIndexPath() + "/" ) )
{
- File mergedRepoDir = buildMergedIndexDirectory( repositories, activePrincipal, request, groupId );
+ File mergedRepoDir = buildMergedIndexDirectory( repositories, activePrincipal, request,
+ repositoryGroupConfiguration.getId() );
mergedRepositoryContents.add( mergedRepoDir );
}
else