You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2006/08/26 18:01:35 UTC

svn commit: r437175 - in /maven/archiva/trunk/archiva-webapp/src/main: java/org/apache/maven/archiva/web/action/ java/org/apache/maven/archiva/web/mapper/ resources/ webapp/WEB-INF/jsp/ webapp/WEB-INF/jsp/include/ webapp/WEB-INF/tags/

Author: brett
Date: Sat Aug 26 09:01:32 2006
New Revision: 437175

URL: http://svn.apache.org/viewvc?rev=437175&view=rev
Log:
[MRM-131] add dependencies page

Added:
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf   (with props)
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf   (with props)
Modified:
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java
    maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag

Modified: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java Sat Aug 26 09:01:32 2006
@@ -70,46 +70,88 @@
 
     private Model model;
 
-    public String execute()
+    private List dependencies;
+
+    public String artifact()
         throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException
     {
-        if ( StringUtils.isEmpty( groupId ) )
+        if ( !checkParameters() )
         {
-            // TODO: i18n
-            addActionError( "You must specify a group ID to browse" );
             return ERROR;
         }
 
-        if ( StringUtils.isEmpty( artifactId ) )
-        {
-            // TODO: i18n
-            addActionError( "You must specify a artifact ID to browse" );
-            return ERROR;
-        }
+        MavenProject project = readProject();
+
+        model = project.getModel();
+
+        return SUCCESS;
+    }
 
-        if ( StringUtils.isEmpty( version ) )
+    public String dependencies()
+        throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException
+    {
+        if ( !checkParameters() )
         {
-            // TODO: i18n
-            addActionError( "You must specify a version to browse" );
             return ERROR;
         }
 
+        MavenProject project = readProject();
+
+        model = project.getModel();
+
+        // TODO: should this be the whole set of artifacts, and be more like the maven dependencies report?
+        dependencies = project.getModel().getDependencies();
+
+        return SUCCESS;
+    }
+
+    private MavenProject readProject()
+        throws ConfigurationStoreException, ProjectBuildingException
+    {
         Configuration configuration = configurationStore.getConfigurationFromStore();
         List repositories = repositoryFactory.createRepositories( configuration );
 
         Artifact artifact = artifactFactory.createProjectArtifact( groupId, artifactId, version );
         // TODO: maybe we can decouple the assembly parts of the project builder from the repository handling to get rid of the temp repo
         ArtifactRepository localRepository = repositoryFactory.createLocalRepository( configuration );
-        MavenProject project = projectBuilder.buildFromRepository( artifact, repositories, localRepository );
+        return projectBuilder.buildFromRepository( artifact, repositories, localRepository );
+    }
 
-        model = project.getModel();
+    private boolean checkParameters()
+    {
+        boolean result = true;
 
-        return SUCCESS;
+        if ( StringUtils.isEmpty( groupId ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a group ID to browse" );
+            result = false;
+        }
+
+        else if ( StringUtils.isEmpty( artifactId ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a artifact ID to browse" );
+            result = false;
+        }
+
+        else if ( StringUtils.isEmpty( version ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a version to browse" );
+            result = false;
+        }
+        return result;
     }
 
     public Model getModel()
     {
         return model;
+    }
+
+    public List getDependencies()
+    {
+        return dependencies;
     }
 
     public String getGroupId()

Modified: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java Sat Aug 26 09:01:32 2006
@@ -51,6 +51,11 @@
             return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
                 params.remove( "version" );
         }
+        else if ( "showArtifactDependencies".equals( actionMapping.getName() ) )
+        {
+            return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
+                params.remove( "version" ) + "/dependencies";
+        }
         else if ( "proxy".equals( actionMapping.getName() ) )
         {
             return PROXY_PREFIX + params.remove( "path" );
@@ -92,6 +97,18 @@
                     params.put( "artifactId", parts[1] );
                     params.put( "version", parts[2] );
                     return new ActionMapping( "showArtifact", "/", "", params );
+                }
+                else if ( parts.length == 4 )
+                {
+                    Map params = new HashMap();
+                    params.put( "groupId", parts[0] );
+                    params.put( "artifactId", parts[1] );
+                    params.put( "version", parts[2] );
+
+                    if ( "dependencies".equals( parts[3] ) )
+                    {
+                        return new ActionMapping( "showArtifactDependencies", "/", "", params );
+                    }
                 }
             }
         }

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/xwork.xml Sat Aug 26 09:01:32 2006
@@ -107,7 +107,11 @@
       <result>/WEB-INF/jsp/browseArtifact.jsp</result>
     </action>
 
-    <action name="showArtifact" class="showArtifactAction">
+    <action name="showArtifact" class="showArtifactAction" method="artifact">
+      <result>/WEB-INF/jsp/showArtifact.jsp</result>
+    </action>
+
+    <action name="showArtifactDependencies" class="showArtifactAction" method="dependencies">
       <result>/WEB-INF/jsp/showArtifact.jsp</result>
     </action>
 

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp Sat Aug 26 09:01:32 2006
@@ -20,7 +20,7 @@
 <html>
 <head>
   <title>Browse Repository</title>
-  <ww:head />
+  <ww:head/>
 </head>
 
 <body>
@@ -33,15 +33,17 @@
       <c:forTokens items="${groupId}" delims="./" var="part">
         <c:choose>
           <c:when test="${empty(cumulativeGroup)}">
-            <c:set var="cumulativeGroup" value="${part}" />
+            <c:set var="cumulativeGroup" value="${part}"/>
           </c:when>
           <c:otherwise>
-            <c:set var="cumulativeGroup" value="${cumulativeGroup}/${part}" />
+            <c:set var="cumulativeGroup" value="${cumulativeGroup}.${part}"/>
           </c:otherwise>
         </c:choose>
-        <ww:url id="url" action="browseGroup" namespace="/">
-          <ww:param name="groupId" value="%{'${cumulativeGroup}'}" />
-        </ww:url>
+        <c:set var="url">
+          <ww:url action="browseGroup" namespace="/">
+            <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
+          </ww:url>
+        </c:set>
         <a href="${url}">${part}</a> /
       </c:forTokens>
       <strong>${artifactId}</strong>
@@ -49,12 +51,12 @@
 
     <h2>Versions</h2>
     <ul>
-      <ww:set name="versions" value="versions" />
+      <ww:set name="versions" value="versions"/>
       <c:forEach items="${versions}" var="version">
         <ww:url id="url" action="showArtifact" namespace="/">
-          <ww:param name="groupId" value="%{'${groupId}'}" />
-          <ww:param name="artifactId" value="%{'${artifactId}'}" />
-          <ww:param name="version" value="%{'${version}'}" />
+          <ww:param name="groupId" value="%{'${groupId}'}"/>
+          <ww:param name="artifactId" value="%{'${artifactId}'}"/>
+          <ww:param name="version" value="%{'${version}'}"/>
         </ww:url>
         <li><a href="${url}">${version}/</a></li>
       </c:forEach>

Added: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf?rev=437175&view=auto
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf (added)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf Sat Aug 26 09:01:32 2006
@@ -0,0 +1,44 @@
+<c:forEach items="${dependencies}" var="dependency">
+  <h3>
+    <c:set var="url">
+      <ww:url action="showArtifact" namespace="/">
+        <ww:param name="groupId" value="%{'${dependency.groupId}'}"/>
+        <ww:param name="artifactId" value="%{'${dependency.artifactId}'}"/>
+        <ww:param name="version" value="%{'${dependency.version}'}"/>
+      </ww:url>
+    </c:set>
+    <%-- TODO: showing the name and description would be nice, but that would require loading the POMs --%>
+    <a href="${url}">${dependency.artifactId}</a>
+  </h3>
+
+  <%-- TODO! use CSS, share with search results --%>
+  <p>
+            <span style="font-size: x-small">
+              <%-- TODO! share with browse as a tag --%>
+              <c:forTokens items="${dependency.groupId}" delims="." var="part">
+                <c:choose>
+                  <c:when test="${empty(cumulativeGroup)}">
+                    <c:set var="cumulativeGroup" value="${part}"/>
+                  </c:when>
+                  <c:otherwise>
+                    <c:set var="cumulativeGroup" value="${cumulativeGroup}.${part}"/>
+                  </c:otherwise>
+                </c:choose>
+                <c:set var="url">
+                  <ww:url action="browseGroup" namespace="/">
+                    <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
+                  </ww:url>
+                </c:set>
+                <a href="${url}">${part}</a> /
+              </c:forTokens>
+              <strong>${dependency.artifactId}</strong>
+              | <strong>Version(s):</strong> ${dependency.version}
+              <c:if test="${!empty(dependency.scope)}">
+                | <strong>Scope:</strong> ${dependency.scope}
+              </c:if>
+              <c:if test="${!empty(dependency.classifier)}">
+                | <strong>Classifier:</strong> ${dependency.classifier}
+              </c:if>
+            </span>
+  </p>
+</c:forEach>
\ No newline at end of file

Propchange: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf?rev=437175&view=auto
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf (added)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf Sat Aug 26 09:01:32 2006
@@ -0,0 +1,200 @@
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<p>
+  <c:forTokens items="${model.groupId}" delims="." var="part">
+    <c:choose>
+      <c:when test="${empty(cumulativeGroup)}">
+        <c:set var="cumulativeGroup" value="${part}"/>
+      </c:when>
+      <c:otherwise>
+        <c:set var="cumulativeGroup" value="${cumulativeGroup}/${part}"/>
+      </c:otherwise>
+    </c:choose>
+    <ww:url id="url" action="browseGroup" namespace="/">
+      <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
+    </ww:url>
+    <a href="${url}">${part}</a> /
+  </c:forTokens>
+  <ww:url id="url" action="browseArtifact" namespace="/">
+    <ww:param name="groupId" value="%{'${model.groupId}'}"/>
+    <ww:param name="artifactId" value="%{'${model.artifactId}'}"/>
+  </ww:url>
+  <a href="${url}">${model.artifactId}</a> /
+  <strong>${model.version}</strong>
+
+  <!-- TODO: new versions?
+    (<strong class="statusFailed">Newer version available:</strong>
+    <a href="artifact.html">2.0.3</a>)
+  -->
+</p>
+
+<p>${mode.description}</p>
+
+<table>
+  <tr>
+    <th>Group ID</th>
+    <td>${model.groupId}</td>
+  </tr>
+  <tr>
+    <th>Artifact ID</th>
+    <td>${model.artifactId}</td>
+  </tr>
+  <tr>
+    <th>Version</th>
+    <td>${model.version}</td>
+  </tr>
+  <tr>
+    <th>Packaging</th>
+    <td><code>${model.packaging}</code></td>
+  </tr>
+  <%-- TODO: derivatives
+    <tr>
+      <th>Derivatives</th>
+      <td>
+        <a href="#">Source</a>
+        |
+        <a href="#">Javadoc</a>
+      </td>
+    </tr>
+  --%>
+  <c:if test="${model.parent != null}">
+    <tr>
+      <th>Parent</th>
+      <td>
+          ${model.parent.groupId} ${model.parent.artifactId} ${model.parent.version}
+        <ww:url id="url" action="showArtifact" namespace="/">
+          <ww:param name="groupId" value="%{'${model.parent.groupId}'}"/>
+          <ww:param name="artifactId" value="%{'${model.parent.artifactId}'}"/>
+          <ww:param name="version" value="%{'${model.parent.version}'}"/>
+        </ww:url>
+        (<a href="${url}">View</a>)
+      </td>
+    </tr>
+  </c:if>
+  <%-- TODO: deployment timestamp
+    <tr>
+      <th>Deployment Date</th>
+      <td>
+        15 Jan 2006, 20:38:00 +1000
+      </td>
+    </tr>
+  --%>
+  <!-- TODO: origin
+    <tr>
+      <th>Origin</th>
+      <td>
+        <a href="TODO">Apache Repository</a>
+      </td>
+    </tr>
+  -->
+</table>
+
+<c:if test="${!empty(model.url) || model.organization != null || !empty(model.licenses)
+    || model.issueManagement != null || model.ciManagement != null}">
+
+  <h2>Other Details</h2>
+  <table>
+    <c:if test="${!empty(model.url)}">
+      <tr>
+        <th>URL</th>
+        <td>
+          <a href="${model.url}">${model.url}</a>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${model.organization != null}">
+      <tr>
+        <th>Organisation</th>
+        <td>
+          <c:choose>
+            <c:when test="${model.organization != null}">
+              <a href="${model.organization.url}">${model.organization.name}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.organization.name}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.licenses)}">
+      <c:forEach items="${model.licenses}" var="license">
+        <tr>
+          <th>License</th>
+          <td>
+            <c:choose>
+              <c:when test="${!empty(license.url)}">
+                <a href="${license.url}">${license.name}</a>
+              </c:when>
+              <c:otherwise>
+                ${license.name}
+              </c:otherwise>
+            </c:choose>
+          </td>
+        </tr>
+      </c:forEach>
+    </c:if>
+    <c:if test="${model.issueManagement != null}">
+      <tr>
+        <th>Issue Tracker</th>
+        <td>
+          <c:choose>
+            <c:when test="${!empty(model.issueManagement.url)}">
+              <a href="${model.issueManagement.url}">${model.issueManagement.system}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.issueManagement.system}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${model.ciManagement != null}">
+      <tr>
+        <th>Continuous Integration</th>
+        <td>
+          <c:choose>
+            <c:when test="${!empty(model.ciManagement.url)}">
+              <a href="${model.ciManagement.url}">${model.ciManagement.system}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.ciManagement.system}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+  </table>
+</c:if>
+
+<c:if test="${model.scm != null}">
+  <h2>SCM</h2>
+  <table>
+    <c:if test="${!empty(model.scm.connection)}">
+      <tr>
+        <th>Connection</th>
+        <td>
+          <code>${model.scm.connection}</code>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.scm.developerConnection)}">
+      <tr>
+        <th>Dev. Connection</th>
+        <td>
+          <code>${model.scm.developerConnection}</code>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.scm.url)}">
+      <tr>
+        <th>Viewer</th>
+        <td>
+          <a href="${model.scm.url}">${model.scm.url}</a>
+        </td>
+      </tr>
+    </c:if>
+  </table>
+</c:if>
+

Propchange: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp Sat Aug 26 09:01:32 2006
@@ -16,11 +16,12 @@
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
 
 <html>
 <head>
   <title>Browse Repository</title>
-  <ww:head />
+  <ww:head/>
 </head>
 
 <body>
@@ -35,7 +36,7 @@
 </div>
 --%>
 
-<ww:set name="model" value="model" />
+<ww:set name="model" value="model"/>
 <h1>
   <c:choose>
     <c:when test="${empty(model.name)}">
@@ -48,218 +49,43 @@
 </h1>
 
 <div id="contentArea">
-<div id="tabs">
-  <p>
-    <strong>Info</strong>
-    <%-- TODO: perhaps using ajax?
-        <a href="TODO">Dependencies</a>
-        <a href="TODO">Depended On</a>
-        <a href="TODO">Mailing Lists</a>
-        <a href="TODO">Developers</a>
-        <a href="TODO">POM</a>
-    --%>
-  </p>
-</div>
-
-<div id="tabArea">
-<p>
-  <c:forTokens items="${model.groupId}" delims="." var="part">
+  <div id="tabs">
+    <p>
+      <c:set var="url">
+        <ww:url action="showArtifact">
+          <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}">Info</my:currentWWUrl>
+      <c:set var="url">
+        <ww:url action="showArtifactDependencies">
+          <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}">Dependencies</my:currentWWUrl>
+      <%-- TODO:
+          <a href="TODO">Depended On</a>
+          <a href="TODO">Mailing Lists</a>
+      --%>
+    </p>
+  </div>
+
+  <%-- TODO: perhaps using ajax? --%>
+  <%-- TODO: panels? this is ugly as is! --%>
+  <div id="tabArea">
     <c:choose>
-      <c:when test="${empty(cumulativeGroup)}">
-        <c:set var="cumulativeGroup" value="${part}" />
+      <c:when test="${dependencies != null}">
+        <%@ include file="/WEB-INF/jsp/include/artifactDependencies.jspf" %>
       </c:when>
       <c:otherwise>
-        <c:set var="cumulativeGroup" value="${cumulativeGroup}/${part}" />
+        <%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>
       </c:otherwise>
     </c:choose>
-    <ww:url id="url" action="browseGroup" namespace="/">
-      <ww:param name="groupId" value="%{'${cumulativeGroup}'}" />
-    </ww:url>
-    <a href="${url}">${part}</a> /
-  </c:forTokens>
-  <ww:url id="url" action="browseArtifact" namespace="/">
-    <ww:param name="groupId" value="%{'${model.groupId}'}" />
-    <ww:param name="artifactId" value="%{'${model.artifactId}'}" />
-  </ww:url>
-  <a href="${url}">${model.artifactId}</a> /
-  <strong>${model.version}</strong>
-
-  <!-- TODO: new versions?
-    (<strong class="statusFailed">Newer version available:</strong>
-    <a href="artifact.html">2.0.3</a>)
-  -->
-</p>
-
-<p>${mode.description}</p>
-
-<table>
-  <tr>
-    <th>Group ID</th>
-    <td>${model.groupId}</td>
-  </tr>
-  <tr>
-    <th>Artifact ID</th>
-    <td>${model.artifactId}</td>
-  </tr>
-  <tr>
-    <th>Version</th>
-    <td>${model.version}</td>
-  </tr>
-  <tr>
-      <th>Packaging</th>
-      <td><code>${model.packaging}</code></td>
-    </tr>
-    <%-- TODO: derivatives
-    <tr>
-      <th>Derivatives</th>
-      <td>
-        <a href="#">Source</a>
-        |
-        <a href="#">Javadoc</a>
-      </td>
-    </tr>
-  --%>
-  <c:if test="${model.parent != null}">
-    <tr>
-      <th>Parent</th>
-      <td>
-          ${model.parent.groupId} ${model.parent.artifactId} ${model.parent.version}
-        <ww:url id="url" action="showArtifact" namespace="/">
-          <ww:param name="groupId" value="%{'${model.parent.groupId}'}" />
-          <ww:param name="artifactId" value="%{'${model.parent.artifactId}'}" />
-          <ww:param name="version" value="%{'${model.parent.version}'}" />
-        </ww:url>
-        (<a href="${url}">View</a>)
-      </td>
-    </tr>
-  </c:if>
-  <%-- TODO: deployment timestamp
-    <tr>
-      <th>Deployment Date</th>
-      <td>
-        15 Jan 2006, 20:38:00 +1000
-      </td>
-    </tr>
-  --%>
-  <!-- TODO: origin
-    <tr>
-      <th>Origin</th>
-      <td>
-        <a href="TODO">Apache Repository</a>
-      </td>
-    </tr>
-  -->
-</table>
-
-<c:if test="${!empty(model.url) || model.organization != null || !empty(model.licenses)
-    || model.issueManagement != null || model.ciManagement != null}">
-
-  <h2>Other Details</h2>
-  <table>
-    <c:if test="${!empty(model.url)}">
-      <tr>
-        <th>URL</th>
-        <td>
-          <a href="${model.url}">${model.url}</a>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${model.organization != null}">
-      <tr>
-        <th>Organisation</th>
-        <td>
-          <c:choose>
-            <c:when test="${model.organization != null}">
-              <a href="${model.organization.url}">${model.organization.name}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.organization.name}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.licenses)}">
-      <c:forEach items="${model.licenses}" var="license">
-        <tr>
-          <th>License</th>
-          <td>
-            <c:choose>
-              <c:when test="${!empty(license.url)}">
-                <a href="${license.url}">${license.name}</a>
-              </c:when>
-              <c:otherwise>
-                ${license.name}
-              </c:otherwise>
-            </c:choose>
-          </td>
-        </tr>
-      </c:forEach>
-    </c:if>
-    <c:if test="${model.issueManagement != null}">
-      <tr>
-        <th>Issue Tracker</th>
-        <td>
-          <c:choose>
-            <c:when test="${!empty(model.issueManagement.url)}">
-              <a href="${model.issueManagement.url}">${model.issueManagement.system}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.issueManagement.system}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${model.ciManagement != null}">
-      <tr>
-        <th>Continuous Integration</th>
-        <td>
-          <c:choose>
-            <c:when test="${!empty(model.ciManagement.url)}">
-              <a href="${model.ciManagement.url}">${model.ciManagement.system}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.ciManagement.system}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-  </table>
-</c:if>
-
-<c:if test="${model.scm != null}">
-  <h2>SCM</h2>
-  <table>
-    <c:if test="${!empty(model.scm.connection)}">
-      <tr>
-        <th>Connection</th>
-        <td>
-          <code>${model.scm.connection}</code>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.scm.developerConnection)}">
-      <tr>
-        <th>Dev. Connection</th>
-        <td>
-          <code>${model.scm.developerConnection}</code>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.scm.url)}">
-      <tr>
-        <th>Viewer</th>
-        <td>
-          <a href="${model.scm.url}">${model.scm.url}</a>
-        </td>
-      </tr>
-    </c:if>
-  </table>
-</c:if>
-
-</div>
+  </div>
 </div>
 
 </body>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag?rev=437175&r1=437174&r2=437175&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag Sat Aug 26 09:01:32 2006
@@ -16,23 +16,26 @@
 
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ attribute name="action" required="true" %>
-<%@ attribute name="namespace" required="true" %>
+<%@ attribute name="action" %>
+<%@ attribute name="namespace" %>
+<%@ attribute name="url" %>
 <c:set var="currentUrl">
-  <ww:url />
-</c:set>
-<c:set var="url">
-  <ww:url action="${action}" namespace="${namespace}" />
+  <ww:url/>
 </c:set>
+<c:if test="${empty(url)}">
+  <c:set var="url">
+    <ww:url action="${action}" namespace="${namespace}"/>
+  </c:set>
+</c:if>
 <c:choose>
   <c:when test="${currentUrl == url}">
     <strong>
-      <jsp:doBody />
+      <jsp:doBody/>
     </strong>
   </c:when>
   <c:otherwise>
     <a href="${url}">
-      <jsp:doBody />
+      <jsp:doBody/>
     </a>
   </c:otherwise>
 </c:choose>