Author: brett
Date: Fri Jul 21 00:43:54 2006
New Revision: 424215

URL: http://svn.apache.org/viewvc?rev=424215&view=rev
Log:
rewrote browse to match white site

Added:
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/collapsed.gif
   (with props)
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/expanded.gif
   (with props)
Removed:
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BaseAction.java
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/RepositoryBrowseAction.java
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/utils/ConfigurationManager.java
Modified:
    
maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
    maven/repository-manager/trunk/maven-repository-webapp/pom.xml
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/SearchAction.java
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/resources/xwork.xml
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/results.jsp
    
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/site.css
    maven/repository-manager/trunk/pom.xml

Modified: 
maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
 Fri Jul 21 00:43:54 2006
@@ -18,9 +18,11 @@
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
+import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.repository.digest.Digester;
 import org.apache.maven.repository.digest.DigesterException;
 
@@ -29,8 +31,10 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
@@ -74,7 +78,7 @@
         {
             deleteDocuments( getTermList( artifactList ) );
         }
-        catch( IOException e )
+        catch ( IOException e )
         {
             throw new RepositoryIndexException( "Failed to delete an index 
document", e );
         }
@@ -253,5 +257,88 @@
         {
             files.append( name ).append( "\n" );
         }
+    }
+
+    public List enumerateGroupIds()
+        throws IOException
+    {
+        IndexReader indexReader = IndexReader.open( getIndexPath() );
+
+        Set groups = new HashSet();
+
+        try
+        {
+            for ( int i = 0; i < indexReader.numDocs(); i ++ )
+            {
+                Document doc = indexReader.document( i );
+                groups.add( doc.getField( FLD_GROUPID ).stringValue() );
+            }
+        }
+        finally
+        {
+            indexReader.close();
+        }
+
+        List sortedGroups = new ArrayList( groups );
+        Collections.sort( sortedGroups );
+        return sortedGroups;
+    }
+
+    public List getArtifacts( String groupId )
+        throws IOException
+    {
+        IndexReader indexReader = IndexReader.open( getIndexPath() );
+
+        Set artifactIds = new HashSet();
+
+        try
+        {
+            for ( int i = 0; i < indexReader.numDocs(); i ++ )
+            {
+                Document doc = indexReader.document( i );
+                if ( doc.getField( FLD_GROUPID ).stringValue().equals( groupId 
) )
+                {
+                    artifactIds.add( doc.getField( FLD_ARTIFACTID 
).stringValue() );
+                }
+            }
+        }
+        finally
+        {
+            indexReader.close();
+        }
+
+        List sortedArtifactIds = new ArrayList( artifactIds );
+        Collections.sort( sortedArtifactIds );
+        return sortedArtifactIds;
+    }
+
+    public List getVersions( String groupId, String artifactId )
+        throws IOException
+    {
+        IndexReader indexReader = IndexReader.open( getIndexPath() );
+
+        Set versions = new HashSet();
+
+        try
+        {
+            for ( int i = 0; i < indexReader.numDocs(); i ++ )
+            {
+                Document doc = indexReader.document( i );
+                if ( doc.getField( FLD_GROUPID ).stringValue().equals( groupId 
) &&
+                    doc.getField( FLD_ARTIFACTID ).stringValue().equals( 
artifactId ) )
+                {
+                    // DefaultArtifactVersion is used for correct ordering
+                    versions.add( new DefaultArtifactVersion( doc.getField( 
FLD_VERSION ).stringValue() ) );
+                }
+            }
+        }
+        finally
+        {
+            indexReader.close();
+        }
+
+        List sortedVersions = new ArrayList( versions );
+        Collections.sort( sortedVersions );
+        return sortedVersions;
     }
 }

Modified: maven/repository-manager/trunk/maven-repository-webapp/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/pom.xml?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/pom.xml (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/pom.xml Fri Jul 21 
00:43:54 2006
@@ -95,6 +95,10 @@
       <!-- TODO: actually, just exclude from WAR plugin -->
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+    </dependency>
   </dependencies>
   <build>
     <finalName>maven-repository-webapp</finalName>

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,316 @@
+package org.apache.maven.repository.manager.web.action;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import com.opensymphony.xwork.ActionSupport;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.repository.configuration.Configuration;
+import org.apache.maven.repository.configuration.ConfigurationStore;
+import org.apache.maven.repository.configuration.ConfigurationStoreException;
+import org.apache.maven.repository.configuration.ConfiguredRepositoryFactory;
+import org.apache.maven.repository.indexing.ArtifactRepositoryIndex;
+import org.apache.maven.repository.indexing.RepositoryIndexException;
+import org.apache.maven.repository.indexing.RepositoryIndexSearchLayer;
+import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+/**
+ * Browse the repository.
+ *
+ * @todo the tree part probably belongs in a browsing component, along with 
the methods currently in the indexer
+ * @plexus.component role="com.opensymphony.xwork.Action" 
role-hint="browseAction"
+ */
+public class BrowseAction
+    extends ActionSupport
+{
+    /**
+     * @plexus.requirement
+     */
+    private RepositoryIndexingFactory factory;
+
+    /**
+     * @plexus.requirement
+     */
+    private RepositoryIndexSearchLayer searchLayer;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfiguredRepositoryFactory repositoryFactory;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationStore configurationStore;
+
+    private List groups;
+
+    private String groupId;
+
+    private static final String GROUP_SEPARATOR = "/";
+
+    private List artifactIds;
+
+    private String artifactId;
+
+    private List versions;
+
+    public String browse()
+        throws ConfigurationStoreException, RepositoryIndexException, 
IOException
+    {
+        ArtifactRepositoryIndex index = getIndex();
+
+        if ( !index.indexExists() )
+        {
+            addActionError( "The repository is not yet indexed. Please wait, 
and then try again." );
+            return ERROR;
+        }
+
+        GroupTreeNode rootNode = buildGroupTree( index );
+
+        this.groups = collateGroups( rootNode );
+
+        return SUCCESS;
+    }
+
+    public String browseGroup()
+        throws ConfigurationStoreException, RepositoryIndexException, 
IOException
+    {
+        ArtifactRepositoryIndex index = getIndex();
+
+        if ( !index.indexExists() )
+        {
+            addActionError( "The repository is not yet indexed. Please wait, 
and then try again." );
+            return ERROR;
+        }
+
+        GroupTreeNode rootNode = buildGroupTree( index );
+
+        if ( StringUtils.isEmpty( groupId ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a group ID to browse" );
+            return ERROR;
+        }
+
+        StringTokenizer tok = new StringTokenizer( groupId, GROUP_SEPARATOR );
+        while ( tok.hasMoreTokens() )
+        {
+            String part = tok.nextToken();
+
+            if ( !rootNode.getChildren().containsKey( part ) )
+            {
+                // TODO: i18n
+                addActionError( "The group specified was not found" );
+                return ERROR;
+            }
+            else
+            {
+                rootNode = (GroupTreeNode) rootNode.getChildren().get( part );
+            }
+        }
+
+        this.groups = collateGroups( rootNode );
+
+        this.artifactIds = index.getArtifacts( groupId.replaceAll( 
GROUP_SEPARATOR, "." ) );
+
+        return SUCCESS;
+    }
+
+    public String browseArtifact()
+        throws ConfigurationStoreException, RepositoryIndexException, 
IOException
+    {
+        ArtifactRepositoryIndex index = getIndex();
+
+        if ( StringUtils.isEmpty( groupId ) )
+        {
+            // 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;
+        }
+
+        versions = index.getVersions( groupId.replaceAll( GROUP_SEPARATOR, "." 
), artifactId );
+
+        if ( versions.isEmpty() )
+        {
+            // TODO: i18n
+            addActionError( "Could not find any artifacts with the given group 
and artifact ID" );
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+    private GroupTreeNode buildGroupTree( ArtifactRepositoryIndex index )
+        throws IOException
+    {
+        // TODO: give action message if indexing is in progress
+
+        // TODO: this will be inefficient over a very large number of 
artifacts, should be cached
+
+        List groups = index.enumerateGroupIds();
+
+        GroupTreeNode rootNode = new GroupTreeNode();
+
+        // build a tree structure
+        for ( Iterator i = groups.iterator(); i.hasNext(); )
+        {
+            String groupId = (String) i.next();
+
+            StringTokenizer tok = new StringTokenizer( groupId, "." );
+
+            GroupTreeNode node = rootNode;
+
+            while ( tok.hasMoreTokens() )
+            {
+                String part = tok.nextToken();
+
+                if ( !node.getChildren().containsKey( part ) )
+                {
+                    GroupTreeNode newNode = new GroupTreeNode( part, node );
+                    node.addChild( newNode );
+                    node = newNode;
+                }
+                else
+                {
+                    node = (GroupTreeNode) node.getChildren().get( part );
+                }
+            }
+        }
+        return rootNode;
+    }
+
+    private List collateGroups( GroupTreeNode rootNode )
+    {
+        List groups = new ArrayList();
+        for ( Iterator i = rootNode.getChildren().values().iterator(); 
i.hasNext(); )
+        {
+            GroupTreeNode node = (GroupTreeNode) i.next();
+
+            while ( node.getChildren().size() == 1 )
+            {
+                node = (GroupTreeNode) 
node.getChildren().values().iterator().next();
+            }
+
+            groups.add( node.getFullName() );
+        }
+        return groups;
+    }
+
+    private ArtifactRepositoryIndex getIndex()
+        throws ConfigurationStoreException, RepositoryIndexException
+    {
+        Configuration configuration = 
configurationStore.getConfigurationFromStore();
+        File indexPath = new File( configuration.getIndexPath() );
+
+        ArtifactRepository repository = repositoryFactory.createRepository( 
configuration );
+
+        return factory.createArtifactRepositoryIndex( indexPath, repository );
+    }
+
+    public List getGroups()
+    {
+        return groups;
+    }
+
+    public List getArtifactIds()
+    {
+        return artifactIds;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    public List getVersions()
+    {
+        return versions;
+    }
+
+    private static class GroupTreeNode
+    {
+        private final String name;
+
+        private final String fullName;
+
+        private final Map children = new TreeMap();
+
+        GroupTreeNode()
+        {
+            name = null;
+            fullName = null;
+        }
+
+        GroupTreeNode( String name, GroupTreeNode parent )
+        {
+            this.name = name;
+            this.fullName = parent.fullName != null ? parent.fullName + 
GROUP_SEPARATOR + name : name;
+        }
+
+        public String getName()
+        {
+            return name;
+        }
+
+        public String getFullName()
+        {
+            return fullName;
+        }
+
+        public Map getChildren()
+        {
+            return children;
+        }
+
+        public void addChild( GroupTreeNode newNode )
+        {
+            children.put( newNode.name, newNode );
+        }
+    }
+}

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BrowseAction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/SearchAction.java
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/SearchAction.java?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/SearchAction.java
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/SearchAction.java
 Fri Jul 21 00:43:54 2006
@@ -32,10 +32,9 @@
 import java.io.File;
 import java.net.MalformedURLException;
 import java.util.List;
-import java.util.Map;
 
 /**
- * Searches for searchString in all indexed fields.
+ * Search all indexed fields by the given criteria.
  *
  * @plexus.component role="com.opensymphony.xwork.Action" 
role-hint="searchAction"
  */
@@ -71,11 +70,6 @@
      * @plexus.requirement
      */
     private ConfiguredRepositoryFactory repositoryFactory;
-
-    /**
-     * @plexus.requirement 
role="org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout"
-     */
-    private Map repositoryLayouts;
 
     /**
      * @plexus.requirement

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,153 @@
+package org.apache.maven.repository.manager.web.action;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import com.opensymphony.xwork.ActionSupport;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+import org.apache.maven.repository.configuration.Configuration;
+import org.apache.maven.repository.configuration.ConfigurationStore;
+import org.apache.maven.repository.configuration.ConfigurationStoreException;
+import org.apache.maven.repository.configuration.ConfiguredRepositoryFactory;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+
+/**
+ * Browse the repository.
+ *
+ * @plexus.component role="com.opensymphony.xwork.Action" 
role-hint="showArtifactAction"
+ */
+public class ShowArtifactAction
+    extends ActionSupport
+{
+    /**
+     * @plexus.requirement
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfiguredRepositoryFactory repositoryFactory;
+
+    /**
+     * @plexus.requirement
+     */
+    private MavenProjectBuilder projectBuilder;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationStore configurationStore;
+
+    private String groupId;
+
+    private String artifactId;
+
+    private String version;
+
+    private Model model;
+
+    public String execute()
+        throws ConfigurationStoreException, IOException, 
XmlPullParserException, ProjectBuildingException
+    {
+        Configuration configuration = 
configurationStore.getConfigurationFromStore();
+        ArtifactRepository repository = repositoryFactory.createRepository( 
configuration );
+
+        if ( StringUtils.isEmpty( groupId ) )
+        {
+            // 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;
+        }
+
+        if ( StringUtils.isEmpty( version ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a version to browse" );
+            return ERROR;
+        }
+
+        Artifact artifact = artifactFactory.createProjectArtifact( groupId, 
artifactId, version );
+        // TODO: is this going to be problematic because repository is remote 
format, but being used as local?
+        // TODO: should it try to use the repo manager as a remote repo, 
proxying out?
+        // TODO: maybe we can decouple the assembly parts of the project 
builder from the repository handling
+        MavenProject project = projectBuilder.buildFromRepository( artifact, 
Collections.EMPTY_LIST, repository );
+
+        if ( !new File( repository.getBasedir(), repository.pathOf( artifact ) 
).exists() )
+        {
+            // TODO: i18n
+            addActionError( "The given artifact was not found in the 
repository" );
+            return ERROR;
+        }
+
+        model = project.getModel();
+
+        return SUCCESS;
+    }
+
+    public Model getModel()
+    {
+        return model;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+}

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/ShowArtifactAction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/resources/xwork.xml
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/resources/xwork.xml?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/resources/xwork.xml
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/resources/xwork.xml
 Fri Jul 21 00:43:54 2006
@@ -39,6 +39,7 @@
     <global-results>
       <!-- TODO: might want an extra message on the configure page when this 
first happens -->
       <result name="config-needed" 
type="redirect">/admin/configure.action</result>
+      <result name="error">/WEB-INF/jsp/generalError.jsp</result>
     </global-results>
 
     <action name="index" class="searchAction" method="input">
@@ -61,6 +62,22 @@
       <result name="error">/WEB-INF/jsp/findArtifact.jsp</result>
     </action>
 
+    <action name="browse" class="browseAction" method="browse">
+      <result>/WEB-INF/jsp/browse.jsp</result>
+    </action>
+
+    <action name="browseGroup" class="browseAction" method="browseGroup">
+      <result>/WEB-INF/jsp/browseGroup.jsp</result>
+    </action>
+
+    <action name="browseArtifact" class="browseAction" method="browseArtifact">
+      <result>/WEB-INF/jsp/browseArtifact.jsp</result>
+    </action>
+
+    <action name="showArtifact" class="showArtifactAction">
+      <result>/WEB-INF/jsp/showArtifact.jsp</result>
+    </action>
+
     <!-- TODO! old actions
     <action name="proxy" 
class="org.apache.maven.repository.proxy.web.action.RepositoryProxyAction">
       <result name="success" type="stream">
@@ -70,11 +87,6 @@
       </result>
       <result name="notFound" type="dispatcher">notFoundError</result>
       <result name="proxyError" type="dispatcher">proxyError</result>
-    </action>
-
-    <action name="browse" 
class="org.apache.maven.repository.manager.web.action.RepositoryBrowseAction">
-      <result name="success" type="dispatcher">/WEB-INF/jsp/browse.jsp</result>
-      <result name="error" type="dispatcher">/WEB-INF/jsp/browse.jsp</result>
     </action>
     -->
   </package>

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
 Fri Jul 21 00:43:54 2006
@@ -14,96 +14,61 @@
   ~ limitations under the License.
   --%>
 
-<%@ taglib uri="webwork" prefix="ww" %>
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
 
 <html>
 <head>
-  <title>Repository Browser</title>
+  <title>Browse Repository</title>
+  <ww:head />
 </head>
 
 <body>
-<h3><a href="<ww:url value="browse!edit.action"><ww:param name="idx" 
value="0"/></ww:url>">basedir</a> /
-  <ww:set name="previousFolder" value="''" />
-  <ww:set name="counter" value="0" />
-  <ww:if test="folder != ''">
-    <ww:set name="folderHeader" value="folder.split('/')" />
-    <ww:iterator value="#folderHeader">
-      <ww:set name="counter" value="#counter + 1" />
-      <ww:if test="#previousFolder == ''">
-        <ww:set name="previousFolder" value="top" />
-      </ww:if>
-      <ww:else>
-        <ww:set name="previousFolder" value="#previousFolder + '/' + top" />
-      </ww:else>
-      <ww:if test="idx > (#counter + 1)"><a href="<ww:url 
value="browse!edit.action"><ww:param name="idx"><ww:property
-          value="#counter" /></ww:param><ww:param 
name="folder"></ww:param></ww:url>"></ww:if><ww:property /></a> /
-    </ww:iterator>
-  </ww:if>
-</h3>
-<br />
-
-<ww:set name="previousFolder" value="'the previous folder'"/>
-<ww:set name="in" value="idx" scope="page"/>
-<ww:iterator value="artifactMap.keySet().iterator()">
-  <ww:set name="groupName" value="top"/>
-<ww:if test="idx == 1 || (folder != '' and  #groupName.startsWith(folder))">
-  <%
-
-
-  int ctr = 1;
-
-
-  %>
-  <ww:set name="groupFolder" value="#groupName.split('/')"/>
-<ww:iterator value="#groupFolder">
-  <%
-
-
-if (ctr == ((Integer)pageContext.getAttribute("in")).intValue()) {
-
-  %>
-<ww:if test="top != #previousFolder">
-  <ww:set name="previousFolder" value="top"/>
-<a href="<ww:url value="browse!edit.action"><ww:param 
name="folder"><ww:property value="folder"/><ww:if test="folder != 
''">/</ww:if><ww:property/></ww:param><ww:param name="idx" 
value="idx"/></ww:url>"">
-  <ww:property/>/
-    </ a><br>
-  </ww:if>
-  <%
-    }
-    ctr++;
-  %>
-  </ww:iterator>
-  </ww:if>
-  </ww:iterator>
-
-  <ww:if test="folder != ''">
-    <ww:set name="previousFolder" value="''" />
-    <ww:set name="artifactList" value="artifactMap.get(folder)" />
-    <ww:iterator value="#artifactList">
-      <table border="1">
-        <tr align="left">
-          <th>Group ID</th>
-          <td><ww:property value="groupId" /></td>
-        </tr>
-        <tr align="left">
-          <th>Artifact ID</th>
-          <td><ww:property value="artifactId" /></td>
-        </tr>
-        <tr align="left">
-          <th>Version</th>
-          <td><ww:property value="version" /></td>
-        </tr>
-        <tr align="left">
-          <th>Derivatives</th>
-          <td><ww:property value="groupId" /></td>
-        </tr>
-        <tr align="left">
-          <th>Parent</th>
-          <td><ww:property value="folder" /></td>
-        </tr>
-      </table>
-      <br />
-    </ww:iterator>
-  </ww:if>
+
+<h1>Browse Repository</h1>
+
+<div id="contentArea">
+  <div id="nameColumn">
+    <h2>Groups</h2>
+    <ul>
+      <ww:set name="groups" value="groups" />
+      <c:forEach items="${groups}" var="groupId">
+        <ww:url id="url" action="browseGroup" namespace="/">
+          <ww:param name="groupId" value="%{'${groupId}'}" />
+        </ww:url>
+        <li><a href="${url}">${groupId}/</a></li>
+      </c:forEach>
+    </ul>
+  </div>
+
+  <%-- TODO: later, when supported in metadata
+  <div id="categoryColumn">
+    <h2>Category</h2>
+    <table>
+      <tr>
+        <td>
+          <a href="#">Java</a>
+        </td>
+      </tr>
+      <tr>
+        <td>
+          <a href="#">Ruby</a>
+        </td>
+      </tr>
+    </table>
+  </div>
+
+  <h2>Labels</h2>
+
+  <div id="labels">
+    <p>
+      <a href="#">jdo</a>
+      <a href="#">j2ee</a>
+      <a href="#">maven</a>
+    </p>
+  </div>
+  --%>
+</div>
+
 </body>
 </html>

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,66 @@
+<%--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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"; %>
+
+<html>
+<head>
+  <title>Browse Repository</title>
+  <ww:head />
+</head>
+
+<body>
+
+<h1>Browse Repository</h1>
+
+<div id="contentArea">
+  <div id="nameColumn">
+    <p>
+      <c:forTokens items="${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>
+      <strong>${artifactId}</strong>
+    </p>
+
+    <h2>Versions</h2>
+    <ul>
+      <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:url>
+        <li><a href="${url}">${version}/</a></li>
+      </c:forEach>
+    </ul>
+  </div>
+</div>
+
+</body>
+</html>

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,86 @@
+<%--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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"; %>
+
+<html>
+<head>
+  <title>Browse Repository</title>
+  <ww:head />
+</head>
+
+<body>
+
+<h1>Browse Repository</h1>
+
+<div id="contentArea">
+  <div id="nameColumn">
+    <p>
+      <c:forTokens items="${groupId}" delims="./" var="part" 
varStatus="status">
+        <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:choose>
+          <c:when test="${status.last}">
+            <strong>${part}</strong>
+          </c:when>
+          <c:otherwise>
+            <ww:url id="url" action="browseGroup" namespace="/">
+              <ww:param name="groupId" value="%{'${cumulativeGroup}'}" />
+            </ww:url>
+            <a href="${url}">${part}</a> /
+          </c:otherwise>
+        </c:choose>
+      </c:forTokens>
+    </p>
+
+    <ww:set name="groups" value="groups" />
+    <c:if test="${!empty(groups)}">
+      <h2>Group / Artifact</h2>
+      <ul>
+        <c:forEach items="${groups}" var="groupId">
+          <ww:url id="url" action="browseGroup" namespace="/">
+            <ww:param name="groupId" value="%{'${groupId}'}" />
+          </ww:url>
+          <li><a href="${url}">${groupId}/</a></li>
+        </c:forEach>
+      </ul>
+    </c:if>
+
+    <ww:set name="artifactIds" value="artifactIds" />
+    <c:if test="${!empty(artifactIds)}">
+      <h2>Artifacts</h2>
+      <ul>
+        <c:forEach items="${artifactIds}" var="artifactId">
+          <ww:url id="url" action="browseArtifact" namespace="/">
+            <ww:param name="groupId" value="%{'${groupId}'}" />
+            <ww:param name="artifactId" value="%{'${artifactId}'}" />
+          </ww:url>
+          <li><a href="${url}">${artifactId}/</a></li>
+        </c:forEach>
+      </ul>
+    </c:if>
+  </div>
+</div>
+
+</body>
+</html>

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/browseGroup.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
 Fri Jul 21 00:43:54 2006
@@ -75,11 +75,9 @@
         <my:currentWWUrl action="findArtifact" namespace="/">Find 
Artifact</my:currentWWUrl>
       </li>
 
-      <%-- TODO
-            <li class="none">
-              <a href="#">Browse</a>
-            </li>
-      --%>
+      <li class="none">
+        <my:currentWWUrl action="browse" namespace="/">Browse</my:currentWWUrl>
+      </li>
     </ul>
     <h5>Manage</h5>
     <ul>

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,33 @@
+<%--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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"; %>
+
+<html>
+<head>
+  <title>Error Occurred</title>
+  <ww:head />
+</head>
+
+<body>
+
+<h1>Error Occurred</h1>
+
+<ww:actionerror />
+
+</body>
+</html>

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/generalError.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/results.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/results.jsp?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/results.jsp
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/results.jsp
 Fri Jul 21 00:43:54 2006
@@ -41,7 +41,7 @@
                     <th></th>
           --%>
         </tr>
-        <ww:set name="searchResults" scope="request" value="searchResults" />
+        <ww:set name="searchResults" value="searchResults" />
         <c:forEach items="${searchResults}" var="result" varStatus="i">
           <tr class="${i.index % 2 == 0 ? "b" : "a"}">
             <td><c:out value="${result.artifact.groupId}" /></td>

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp?rev=424215&view=auto
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
 (added)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
 Fri Jul 21 00:43:54 2006
@@ -0,0 +1,254 @@
+<%--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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"; %>
+
+<html>
+<head>
+  <title>Browse Repository</title>
+  <ww:head />
+</head>
+
+<body>
+
+<%-- TODO: image by type
+<img src="images/jar.png" width="100" height="100" alt="jar" style="float: 
left" />
+--%>
+
+<%-- TODO: download link
+<div class="downloadButton">
+  <a href="#">Download</a>
+</div>
+--%>
+
+<ww:set name="model" value="model" />
+<h1>
+  <c:choose>
+    <c:when test="${empty(model.name)}">
+      ${model.artifactId}
+    </c:when>
+    <c:otherwise>
+      ${model.name}
+    </c:otherwise>
+  </c:choose>
+</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">
+    <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>
+  <%-- 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="${model.organization != null || !empty(model.licenses)
+    || model.issueManagement != null || model.ciManagement != null}">
+
+  <h2>Other Details</h2>
+  <table>
+    <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>
+
+</body>
+</html>

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/site.css
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/site.css?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/site.css
 (original)
+++ 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/site.css
 Fri Jul 21 00:43:54 2006
@@ -30,7 +30,7 @@
     padding: 1em;
 }
 
-#tabs b {
+#tabs strong {
     border: 1px solid black;
     padding-left: 1em;
     padding-right: 1em;

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/collapsed.gif
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/collapsed.gif?rev=424215&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/collapsed.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/expanded.gif
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/expanded.gif?rev=424215&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/images/expanded.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Modified: maven/repository-manager/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/repository-manager/trunk/pom.xml?rev=424215&r1=424214&r2=424215&view=diff
==============================================================================
--- maven/repository-manager/trunk/pom.xml (original)
+++ maven/repository-manager/trunk/pom.xml Fri Jul 21 00:43:54 2006
@@ -152,27 +152,32 @@
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-repository-metadata</artifactId>
-        <version>2.0.2</version>
+        <version>${maven.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-model</artifactId>
-        <version>2.0.2</version>
+        <version>${maven.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-artifact</artifactId>
-        <version>2.0.2</version>
+        <version>${maven.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-artifact-manager</artifactId>
-        <version>2.0.2</version>
+        <version>${maven.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven</groupId>
+        <artifactId>maven-project</artifactId>
+        <version>${maven.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-model-converter</artifactId>
-        <version>2.0.2</version>
+        <version>${maven.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>
@@ -364,4 +369,7 @@
       <url>http://snapshots.repository.codehaus.org</url>
     </pluginRepository>
   </pluginRepositories>
+  <properties>
+    <maven.version>2.0.4</maven.version>
+  </properties>
 </project>


Reply via email to