mirror of
https://github.com/apache/archiva.git
synced 2025-02-28 13:39:13 +00:00
[MRM-131] implement mailing lists tab
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@489863 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
928391db88
commit
90e4382b62
@ -135,6 +135,8 @@ public class ShowArtifactAction
|
||||
|
||||
private String artifactPath;
|
||||
|
||||
private List mailingLists;
|
||||
|
||||
public String artifact()
|
||||
throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException,
|
||||
ResourceDoesNotExistException, ProxyException, ArtifactResolutionException
|
||||
@ -189,6 +191,23 @@ public String dependencies()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
public String mailingLists()
|
||||
throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException
|
||||
{
|
||||
if ( !checkParameters() )
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
MavenProject project = readProject();
|
||||
|
||||
model = project.getModel();
|
||||
|
||||
this.mailingLists = project.getMailingLists();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
public String dependees()
|
||||
throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException,
|
||||
RepositoryIndexException, RepositoryIndexSearchException
|
||||
@ -517,4 +536,9 @@ public String getRepositoryId()
|
||||
{
|
||||
return repositoryId;
|
||||
}
|
||||
|
||||
public List getMailingLists()
|
||||
{
|
||||
return mailingLists;
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,11 @@ else if ( "showArtifactDependencies".equals( actionMapping.getName() ) )
|
||||
return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
|
||||
params.remove( "version" ) + "/dependencies";
|
||||
}
|
||||
else if ( "showArtifactMailingLists".equals( actionMapping.getName() ) )
|
||||
{
|
||||
return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
|
||||
params.remove( "version" ) + "/mailingLists";
|
||||
}
|
||||
else if ( "showArtifactDependees".equals( actionMapping.getName() ) )
|
||||
{
|
||||
return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
|
||||
@ -122,6 +127,10 @@ else if ( parts.length == 4 )
|
||||
{
|
||||
return new ActionMapping( "showArtifactDependencies", "/", "", params );
|
||||
}
|
||||
else if ( "mailingLists".equals( parts[3] ) )
|
||||
{
|
||||
return new ActionMapping( "showArtifactMailingLists", "/", "", params );
|
||||
}
|
||||
else if ( "usedby".equals( parts[3] ) )
|
||||
{
|
||||
return new ActionMapping( "showArtifactDependees", "/", "", params );
|
||||
|
@ -165,6 +165,10 @@
|
||||
<result>/WEB-INF/jsp/showArtifact.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="showArtifactMailingLists" class="showArtifactAction" method="mailingLists">
|
||||
<result>/WEB-INF/jsp/showArtifact.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="showArtifactDependencies" class="showArtifactAction" method="dependencies">
|
||||
<result>/WEB-INF/jsp/showArtifact.jsp</result>
|
||||
</action>
|
||||
|
@ -0,0 +1,84 @@
|
||||
<%--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
--%>
|
||||
|
||||
<%@ taglib prefix="ww" uri="/webwork" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
<c:forEach items="${mailingLists}" var="mailingList">
|
||||
<h3>
|
||||
${mailingList.name}
|
||||
</h3>
|
||||
<%-- TODO: description
|
||||
<p>
|
||||
Description blah blah blah
|
||||
</p>
|
||||
--%>
|
||||
<ul>
|
||||
<c:if test="${!empty(mailingList.subscribe)}">
|
||||
<li>
|
||||
<b>Subscribe:</b>
|
||||
<a href="mailto:${mailingList.subscribe}">${mailingList.subscribe}</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${!empty(mailingList.post)}">
|
||||
<li>
|
||||
<b>Post:</b>
|
||||
<a href="mailto:${mailingList.post}">${mailingList.post}</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${!empty(mailingList.unsubscribe)}">
|
||||
<li>
|
||||
<b>Unsubscribe:</b>
|
||||
<a href="mailto:${mailingList.unsubscribe}">${mailingList.unsubscribe}</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<%-- TODO: not in the POM yet
|
||||
<li>
|
||||
<b>List owner:</b>
|
||||
<a href="mailto:${mailingList.owner}">${mailingList.owner}</a>
|
||||
</li>
|
||||
--%>
|
||||
<c:if test="${!empty(mailingList.archive)}">
|
||||
<li>
|
||||
<b>Archive:</b>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="${mailingList.archive}">${mailingList.archive}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${!empty(mailingList.otherArchives)}">
|
||||
<li>
|
||||
<b>Other Archives:</b>
|
||||
<ul>
|
||||
<c:forEach items="${mailingList.otherArchives}" var="archive">
|
||||
<li>
|
||||
<a href="${archive}">${archive}</a>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</c:forEach>
|
||||
<c:if test="${empty(mailingLists)}">
|
||||
<strong>No mailing lists</strong>
|
||||
</c:if>
|
@ -114,9 +114,14 @@
|
||||
</ww:url>
|
||||
</c:set>
|
||||
<my:currentWWUrl url="${url}">Used By</my:currentWWUrl>
|
||||
<%-- TODO:
|
||||
<a href="TODO">Mailing Lists</a>
|
||||
--%>
|
||||
<c:set var="url">
|
||||
<ww:url action="showArtifactMailingLists">
|
||||
<ww:param name="groupId" value="%{groupId}"/>
|
||||
<ww:param name="artifactId" value="%{artifactId}"/>
|
||||
<ww:param name="version" value="%{version}"/>
|
||||
</ww:url>
|
||||
</c:set>
|
||||
<my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -130,6 +135,9 @@
|
||||
<c:when test="${dependencyTree != null}">
|
||||
<%@ include file="/WEB-INF/jsp/include/dependencyTree.jspf" %>
|
||||
</c:when>
|
||||
<c:when test="${mailingLists != null}">
|
||||
<%@ include file="/WEB-INF/jsp/include/mailingLists.jspf" %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>
|
||||
</c:otherwise>
|
||||
|
Loading…
x
Reference in New Issue
Block a user