</field>
</fields>
<codeSegments>
+ <codeSegment>
+ <version>1.2.0+</version>
+ <code><![CDATA[
+ private java.util.Map<String, java.util.List<String>> repositoryToGroupMap;
+
+ public java.util.Map<String, java.util.List<String>> getRepositoryToGroupMap()
+ {
+ if ( repositoryToGroupMap == null )
+ {
+ java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>();
+
+ for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups )
+ {
+ for ( String repositoryId : (java.util.List<String>) group.getRepositories() )
+ {
+ java.util.List<String> groups = map.get( repositoryId );
+ if ( groups == null )
+ {
+ groups = new java.util.ArrayList<String>();
+ map.put( repositoryId, groups );
+ }
+ groups.add( group.getId() );
+ }
+ }
+
+ repositoryToGroupMap = map;
+ }
+ return repositoryToGroupMap;
+ }
+ ]]></code>
+ </codeSegment>
<codeSegment>
<version>1.0.0+</version>
<code><![CDATA[
private List<RemoteRepositoryConfiguration> remoteRepositories;
private Map<String, RepositoryContentStatistics> repositoryStatistics;
+
+ private Map<String, List<String>> repositoryToGroupMap;
/**
* @plexus.requirement role-hint="jdo"
remoteRepositories = new ArrayList<RemoteRepositoryConfiguration>( config.getRemoteRepositories() );
managedRepositories = new ArrayList<ManagedRepositoryConfiguration>( config.getManagedRepositories() );
+ repositoryToGroupMap = config.getRepositoryToGroupMap();
Collections.sort( managedRepositories, new RepositoryConfigurationComparator() );
Collections.sort( remoteRepositories, new RepositoryConfigurationComparator() );
{
return baseUrl;
}
+
+ public Map<String, List<String>> getRepositoryToGroupMap()
+ {
+ return repositoryToGroupMap;
+ }
}
<th>Directory</th>
<td>${repository.location}</td>
</tr>
-<tr>
- <th>Index Directory</th>
- <td>${repository.indexDir}</td>
-</tr>
+<c:if test="${!empty(repository.indexDir)}">
+ <tr>
+ <th>Index Directory</th>
+ <td>${repository.indexDir}</td>
+ </tr>
+</c:if>
<tr>
<th>WebDAV URL</th>
<td><a href="${baseUrl}/${repository.id}/">${baseUrl}/${repository.id}/</a></td>
</c:choose>
</td>
</tr>
+<c:if test="${!empty(repositoryToGroupMap[repository.id])}">
+ <tr>
+ <th>Groups</th>
+ <td>
+ <c:forEach items="${repositoryToGroupMap[repository.id]}" varStatus="i" var="group">
+ ${group}<c:if test="${!i.last}">,</c:if>
+ </c:forEach>
+ </td>
+ </tr>
+</c:if>
<tr>
<th>Releases Included</th>
<td class="${repository.releases ? 'donemark' : 'errormark'} booleanIcon"> </td>