MRM-378 Applied patch submitted by Philip Dodds. Added mailing lists and dependecies in ShowArtifactAction. Also updated the field names used in the <c:if> conditions in mailingLists.jspf, and added the classifer in the showArtifactLink tag in artifactDependencies.jspf.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@542475 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2007-05-29 10:12:01 +00:00
parent e2be79b0dd
commit d29e5f02ff
3 changed files with 31 additions and 13 deletions

View File

@ -26,10 +26,12 @@ import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ObjectNotFoundException;
import org.apache.maven.archiva.database.browsing.RepositoryBrowsing;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.ProjectRepository;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import java.util.Collections;
import java.util.List;
import java.util.Iterator;
/**
* Browse the repository.
@ -73,6 +75,10 @@ public class ShowArtifactAction
*/
private List reports;
private List mailingLists;
private List dependencies;
/**
* Show the versioned project information tab.
*
@ -96,7 +102,8 @@ public class ShowArtifactAction
// TODO: should this be the whole set of artifacts, and be more like the maven dependencies report?
// this.dependencies = VersionMerger.wrap( project.getModel().getDependencies() );
this.dependencies = model.getDependencies();
return SUCCESS;
}
@ -107,7 +114,8 @@ public class ShowArtifactAction
throws ObjectNotFoundException, ArchivaDatabaseException
{
this.model = repoBrowsing.selectVersion( groupId, artifactId, version );
this.mailingLists = model.getMailingLists();
return SUCCESS;
}
@ -206,4 +214,14 @@ public class ShowArtifactAction
{
return reports;
}
public List getMailingLists()
{
return mailingLists;
}
public List getDependencies()
{
return dependencies;
}
}

View File

@ -31,7 +31,7 @@
<p>
<my:showArtifactLink groupId="${dependency.groupId}" artifactId="${dependency.artifactId}"
version="${dependency.version}" versions="${dependency.versions}" scope="${dependency.scope}"
version="${dependency.version}" scope="${dependency.scope}"
classifier="${dependency.classifier}"/>
</p>
</c:forEach>

View File

@ -31,22 +31,22 @@
</p>
--%>
<ul>
<c:if test="${!empty(mailingList.subscribe)}">
<c:if test="${!empty(mailingList.subscribeAddress)}">
<li>
<b>Subscribe:</b>
<a href="mailto:${mailingList.subscribe}">${mailingList.subscribe}</a>
<a href="mailto:${mailingList.subscribeAddress}">${mailingList.subscribeAddress}</a>
</li>
</c:if>
<c:if test="${!empty(mailingList.post)}">
<c:if test="${!empty(mailingList.postAddress)}">
<li>
<b>Post:</b>
<a href="mailto:${mailingList.post}">${mailingList.post}</a>
<a href="mailto:${mailingList.postAddress}">${mailingList.postAddress}</a>
</li>
</c:if>
<c:if test="${!empty(mailingList.unsubscribe)}">
<c:if test="${!empty(mailingList.unsubscribeAddress)}">
<li>
<b>Unsubscribe:</b>
<a href="mailto:${mailingList.unsubscribe}">${mailingList.unsubscribe}</a>
<a href="mailto:${mailingList.unsubscribeAddress}">${mailingList.unsubscribeAddress}</a>
</li>
</c:if>
<%-- TODO: not in the POM yet
@ -55,17 +55,17 @@
<a href="mailto:${mailingList.owner}">${mailingList.owner}</a>
</li>
--%>
<c:if test="${!empty(mailingList.archive)}">
<c:if test="${!empty(mailingList.mainArchiveUrl)}">
<li>
<b>Archive:</b>
<ul>
<li>
<a href="${mailingList.archive}">${mailingList.archive}</a>
<a href="${mailingList.mainArchiveUrl}">${mailingList.mainArchiveUrl}</a>
</li>
</ul>
</li>
</c:if>
<c:if test="${!empty(mailingList.otherArchives)}">
<%-- <c:if test="${!empty(mailingList.otherArchives)}">
<li>
<b>Other Archives:</b>
<ul>
@ -76,7 +76,7 @@
</c:forEach>
</ul>
</li>
</c:if>
</c:if> --%>
</ul>
</c:forEach>
<c:if test="${empty(mailingLists)}">