From: Brett Porter Date: Sat, 23 Dec 2006 07:16:52 +0000 (+0000) Subject: [MRM-131] implement mailing lists tab X-Git-Tag: archiva-0.9-alpha-1~195 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=90e4382b629238920948b78decac168e18c05671;p=archiva.git [MRM-131] implement mailing lists tab git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@489863 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java index 966087b67..3cab3eda6 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java @@ -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 class ShowArtifactAction 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 class ShowArtifactAction { return repositoryId; } + + public List getMailingLists() + { + return mailingLists; + } } diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java index 71a2833bc..c18f0f1d5 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java @@ -59,6 +59,11 @@ public class RepositoryActionMapper 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 @@ public class RepositoryActionMapper { 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 ); diff --git a/archiva-webapp/src/main/resources/xwork.xml b/archiva-webapp/src/main/resources/xwork.xml index 6c0ff5564..8484a94b1 100644 --- a/archiva-webapp/src/main/resources/xwork.xml +++ b/archiva-webapp/src/main/resources/xwork.xml @@ -165,6 +165,10 @@ /WEB-INF/jsp/showArtifact.jsp + + /WEB-INF/jsp/showArtifact.jsp + + /WEB-INF/jsp/showArtifact.jsp diff --git a/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/mailingLists.jspf b/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/mailingLists.jspf new file mode 100644 index 000000000..238512911 --- /dev/null +++ b/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/mailingLists.jspf @@ -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" %> + + +

+ ${mailingList.name} +

+ <%-- TODO: description +

+ Description blah blah blah +

+ --%> + +
+ + No mailing lists + diff --git a/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp b/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp index 9ff9dce51..efab1c047 100644 --- a/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp +++ b/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp @@ -114,9 +114,14 @@ Used By - <%-- TODO: - Mailing Lists - --%> + + + + + + + + Mailing Lists @@ -130,6 +135,9 @@ <%@ include file="/WEB-INF/jsp/include/dependencyTree.jspf" %> + + <%@ include file="/WEB-INF/jsp/include/mailingLists.jspf" %> + <%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>