You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/06/07 07:47:47 UTC

svn commit: r412295 [2/2] - in /maven/repository-manager/trunk: maven-repository-application/src/main/java/org/apache/maven/repository/manager/cli/ maven-repository-artifact-applet/ maven-repository-artifact-applet/src/main/java/org/apache/maven/reposi...

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoader.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoader.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoader.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoader.java Tue Jun  6 22:47:45 2006
@@ -1,13 +1,13 @@
 package org.apache.maven.repository.proxy.configuration;
 
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * 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
+ *      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,
@@ -50,70 +50,70 @@
 
         config.setRepositoryCachePath( getMandatoryProperty( props, REPO_LOCAL_STORE ) );
 
-        {//just get the first proxy and break
-            String propertyList = props.getProperty( PROXY_LIST );
-            if ( propertyList != null )
+        //just get the first proxy and break
+        String propertyList = props.getProperty( PROXY_LIST );
+        if ( propertyList != null )
+        {
+            StringTokenizer tok = new StringTokenizer( propertyList, "," );
+            while ( tok.hasMoreTokens() )
             {
-                StringTokenizer tok = new StringTokenizer( propertyList, "," );
-                while ( tok.hasMoreTokens() )
+                String key = tok.nextToken();
+                if ( StringUtils.isNotEmpty( key ) )
                 {
-                    String key = tok.nextToken();
-                    if ( StringUtils.isNotEmpty( key ) )
-                    {
-                        String host = getMandatoryProperty( props, "proxy." + key + ".host" );
-                        int port = Integer.parseInt( getMandatoryProperty( props, "proxy." + key + ".port" ) );
+                    String host = getMandatoryProperty( props, "proxy." + key + ".host" );
+                    int port = Integer.parseInt( getMandatoryProperty( props, "proxy." + key + ".port" ) );
 
-                        // the username and password isn't required
-                        String username = props.getProperty( "proxy." + key + ".username" );
-                        String password = props.getProperty( "proxy." + key + ".password" );
-
-                        if ( StringUtils.isNotEmpty( username ) )
-                        {
-                            config.setHttpProxy( host, port, username, password );
-                        }
-                        else
-                        {
-                            config.setHttpProxy( host, port );
-                        }
+                    // the username and password isn't required
+                    String username = props.getProperty( "proxy." + key + ".username" );
+                    String password = props.getProperty( "proxy." + key + ".password" );
 
-                        //accept only one proxy configuration
-                        break;
+                    if ( StringUtils.isNotEmpty( username ) )
+                    {
+                        config.setHttpProxy( host, port, username, password );
                     }
+                    else
+                    {
+                        config.setHttpProxy( host, port );
+                    }
+
+                    //accept only one proxy configuration
+                    break;
                 }
             }
         }
 
         List repositories = new ArrayList();
-        { //get the remote repository list
-            String repoList = getMandatoryProperty( props, REPO_LIST );
 
-            StringTokenizer tok = new StringTokenizer( repoList, "," );
-            while ( tok.hasMoreTokens() )
-            {
-                String key = tok.nextToken();
+        //get the remote repository list
+        String repoList = getMandatoryProperty( props, REPO_LIST );
 
-                Properties repoProps = getSubset( props, "repo." + key + "." );
-                String url = getMandatoryProperty( props, "repo." + key + ".url" );
-                String proxyKey = repoProps.getProperty( "proxy" );
+        StringTokenizer tok = new StringTokenizer( repoList, "," );
+        while ( tok.hasMoreTokens() )
+        {
+            String key = tok.nextToken();
 
-                boolean cacheFailures =
-                    Boolean.valueOf( repoProps.getProperty( "cache.failures", "false" ) ).booleanValue();
-                boolean hardFail = Boolean.valueOf( repoProps.getProperty( "hardfail", "true" ) ).booleanValue();
-                long cachePeriod = Long.parseLong( repoProps.getProperty( "cache.period", "0" ) );
+            Properties repoProps = getSubset( props, "repo." + key + "." );
+            String url = getMandatoryProperty( props, "repo." + key + ".url" );
+            String proxyKey = repoProps.getProperty( "proxy" );
 
-                ProxyRepository repository =
-                    new ProxyRepository( key, url, new DefaultRepositoryLayout(), cacheFailures, cachePeriod );
+            boolean cacheFailures =
+                Boolean.valueOf( repoProps.getProperty( "cache.failures", "false" ) ).booleanValue();
+            boolean hardFail = Boolean.valueOf( repoProps.getProperty( "hardfail", "true" ) ).booleanValue();
+            long cachePeriod = Long.parseLong( repoProps.getProperty( "cache.period", "0" ) );
 
-                repository.setHardfail( hardFail );
+            ProxyRepository repository =
+                new ProxyRepository( key, url, new DefaultRepositoryLayout(), cacheFailures, cachePeriod );
 
-                if ( StringUtils.isNotEmpty( proxyKey ) )
-                {
-                    repository.setProxied( true );
-                }
+            repository.setHardfail( hardFail );
 
-                repositories.add( repository );
+            if ( StringUtils.isNotEmpty( proxyKey ) )
+            {
+                repository.setProxied( true );
             }
+
+            repositories.add( repository );
         }
+
         config.setRepositories( repositories );
 
         validateDirectories( config );
@@ -161,7 +161,7 @@
     private String getMandatoryProperty( Properties props, String key )
         throws ValidationException
     {
-        final String value = props.getProperty( key );
+        String value = props.getProperty( key );
 
         if ( value == null )
         {

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java Tue Jun  6 22:47:45 2006
@@ -74,7 +74,7 @@
         proxyInfo.setHost( host );
         proxyInfo.setPort( port );
 
-        setHttpProxy( proxyInfo );
+        httpProxy = proxyInfo;
     }
 
     public void setHttpProxy( String host, int port, String username, String password )

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ValidationException.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ValidationException.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ValidationException.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ValidationException.java Tue Jun  6 22:47:45 2006
@@ -1,13 +1,13 @@
 package org.apache.maven.repository.proxy.configuration;
 
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * 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
+ *      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,

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/repository/ProxyRepository.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/repository/ProxyRepository.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/repository/ProxyRepository.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/repository/ProxyRepository.java Tue Jun  6 22:47:45 2006
@@ -29,22 +29,22 @@
     extends DefaultArtifactRepository
 {
     // zero caches forever
-    private long cachePeriod = 0;
+    private long cachePeriod;
 
-    private boolean cacheFailures = false;
+    private boolean cacheFailures;
 
     private boolean hardfail = true;
 
-    private boolean proxied = false;
+    private boolean proxied;
 
     public ProxyRepository( String id, String url, ArtifactRepositoryLayout layout, boolean cacheFailures,
                             long cachePeriod )
     {
         this( id, url, layout );
 
-        setCacheFailures( cacheFailures );
+        this.cacheFailures = cacheFailures;
 
-        setCachePeriod( cachePeriod );
+        this.cachePeriod = cachePeriod;
     }
 
     public ProxyRepository( String id, String url, ArtifactRepositoryLayout layout )

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java Tue Jun  6 22:47:45 2006
@@ -1,15 +1,5 @@
 package org.apache.maven.repository.proxy;
 
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.repository.proxy.configuration.ProxyConfiguration;
-import org.apache.maven.repository.proxy.repository.ProxyRepository;
-import org.apache.maven.wagon.ResourceDoesNotExistException;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-
-import java.io.File;
-
 /*
  * Copyright 2005-2006 The Apache Software Foundation.
  *
@@ -26,6 +16,16 @@
  * limitations under the License.
  */
 
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.repository.proxy.configuration.ProxyConfiguration;
+import org.apache.maven.repository.proxy.repository.ProxyRepository;
+import org.apache.maven.wagon.ResourceDoesNotExistException;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+
+import java.io.File;
+
 /**
  * @author Edwin Punzalan
  */
@@ -73,11 +73,11 @@
                     file.getAbsolutePath().startsWith( proxy.getConfiguration().getRepositoryCachePath() ) );
 
         //test cache
-        file = proxy.get( "/commons-logging/commons-logging/1.0/commons-logging-1.0.jar" );
+        proxy.get( "/commons-logging/commons-logging/1.0/commons-logging-1.0.jar" );
 
         try
         {
-            file = proxy.get( "/commons-logging/commons-logging/2.0/commons-logging-2.0.jar" );
+            proxy.get( "/commons-logging/commons-logging/2.0/commons-logging-2.0.jar" );
             fail( "Expected ResourceDoesNotExistException exception not thrown" );
         }
         catch ( ResourceDoesNotExistException e )

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/LegacyProxyManagerTest.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/LegacyProxyManagerTest.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/LegacyProxyManagerTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/LegacyProxyManagerTest.java Tue Jun  6 22:47:45 2006
@@ -73,11 +73,11 @@
                     file.getAbsolutePath().startsWith( proxy.getConfiguration().getRepositoryCachePath() ) );
 
         //test cache
-        file = proxy.get( "/commons-logging/jars/commons-logging-1.0.jar" );
+        proxy.get( "/commons-logging/jars/commons-logging-1.0.jar" );
 
         try
         {
-            file = proxy.get( "/commons-logging/jars/commons-logging-2.0.jar" );
+            proxy.get( "/commons-logging/jars/commons-logging-2.0.jar" );
             fail( "Expected ResourceDoesNotExistException exception not thrown" );
         }
         catch ( ResourceDoesNotExistException e )

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoaderTest.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoaderTest.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoaderTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/MavenProxyPropertyLoaderTest.java Tue Jun  6 22:47:45 2006
@@ -23,7 +23,6 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
-import java.util.Iterator;
 
 
 /**
@@ -32,6 +31,8 @@
 public class MavenProxyPropertyLoaderTest
     extends PlexusTestCase
 {
+    private static final int DEFAULT_CACHE_PERIOD = 3600;
+
     public void testLoadValidMavenProxyConfiguration()
         throws ValidationException, IOException
     {
@@ -50,51 +51,34 @@
 
             assertEquals( "Count repositories", 4, config.getRepositories().size() );
 
-            int idx = 0;
-            for ( Iterator repos = config.getRepositories().iterator(); repos.hasNext(); )
-            {
-                idx++;
-
-                ProxyRepository repo = (ProxyRepository) repos.next();
-
-                //switch is made to check for ordering
-                switch ( idx )
-                {
-                    case 1:
-                        assertEquals( "Repository name not as expected", "local-repo", repo.getKey() );
-                        assertEquals( "Repository url does not match its name", "file://target", repo.getUrl() );
-                        assertEquals( "Repository cache period check failed", 0, repo.getCachePeriod() );
-                        assertFalse( "Repository failure caching check failed", repo.isCacheFailures() );
-                        break;
-                    case 2:
-                        assertEquals( "Repository name not as expected", "www-ibiblio-org", repo.getKey() );
-                        assertEquals( "Repository url does not match its name", "http://www.ibiblio.org/maven2",
-                                      repo.getUrl() );
-                        assertEquals( "Repository cache period check failed", 3600, repo.getCachePeriod() );
-                        assertTrue( "Repository failure caching check failed", repo.isCacheFailures() );
-                        break;
-                    case 3:
-                        assertEquals( "Repository name not as expected", "dist-codehaus-org", repo.getKey() );
-                        assertEquals( "Repository url does not match its name", "http://dist.codehaus.org",
-                                      repo.getUrl() );
-                        assertEquals( "Repository cache period check failed", 3600, repo.getCachePeriod() );
-                        assertTrue( "Repository failure caching check failed", repo.isCacheFailures() );
-                        break;
-                    case 4:
-                        assertEquals( "Repository name not as expected", "private-example-com", repo.getKey() );
-                        assertEquals( "Repository url does not match its name", "http://private.example.com/internal",
-                                      repo.getUrl() );
-                        assertEquals( "Repository cache period check failed", 3600, repo.getCachePeriod() );
-                        assertFalse( "Repository failure caching check failed", repo.isCacheFailures() );
-                        break;
-                    default:
-                        fail( "Unexpected order count" );
-                }
-            }
+            ProxyRepository repo = (ProxyRepository) config.getRepositories().get( 0 );
+            assertEquals( "Repository name not as expected", "local-repo", repo.getKey() );
+            assertEquals( "Repository url does not match its name", "file://target", repo.getUrl() );
+            assertEquals( "Repository cache period check failed", 0, repo.getCachePeriod() );
+            assertFalse( "Repository failure caching check failed", repo.isCacheFailures() );
+
+            repo = (ProxyRepository) config.getRepositories().get( 1 );
+            assertEquals( "Repository name not as expected", "www-ibiblio-org", repo.getKey() );
+            assertEquals( "Repository url does not match its name", "http://www.ibiblio.org/maven2", repo.getUrl() );
+            assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getCachePeriod() );
+            assertTrue( "Repository failure caching check failed", repo.isCacheFailures() );
+
+            repo = (ProxyRepository) config.getRepositories().get( 2 );
+            assertEquals( "Repository name not as expected", "dist-codehaus-org", repo.getKey() );
+            assertEquals( "Repository url does not match its name", "http://dist.codehaus.org", repo.getUrl() );
+            assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getCachePeriod() );
+            assertTrue( "Repository failure caching check failed", repo.isCacheFailures() );
+
+            repo = (ProxyRepository) config.getRepositories().get( 3 );
+            assertEquals( "Repository name not as expected", "private-example-com", repo.getKey() );
+            assertEquals( "Repository url does not match its name", "http://private.example.com/internal",
+                          repo.getUrl() );
+            assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getCachePeriod() );
+            assertFalse( "Repository failure caching check failed", repo.isCacheFailures() );
         }
-        //make sure to delete the test directory after tests
         finally
         {
+            //make sure to delete the test directory after tests
             FileUtils.deleteDirectory( "target/remote-repo1" );
         }
     }

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java Tue Jun  6 22:47:45 2006
@@ -32,6 +32,10 @@
 {
     private ProxyConfiguration config;
 
+    private static final int DEFAULT_CACHE_PERIOD = 3600;
+
+    private static final int DEFAULT_PORT = 80;
+
     protected void setUp()
         throws Exception
     {
@@ -60,9 +64,9 @@
         ArtifactRepositoryLayout legacyLayout = new LegacyRepositoryLayout();
         ProxyRepository repo2 = new ProxyRepository( "repo2", "http://www.ibiblio.org/maven", legacyLayout );
         repo2.setCacheFailures( false );
-        repo2.setCachePeriod( 3600 );
+        repo2.setCachePeriod( DEFAULT_CACHE_PERIOD );
         repo2.setProxied( true );
-        config.setHttpProxy( "some.local.proxy", 80, "username", "password" );
+        config.setHttpProxy( "some.local.proxy", DEFAULT_PORT, "username", "password" );
         config.addRepository( repo2 );
         assertEquals( 2, config.getRepositories().size() );
 
@@ -80,14 +84,14 @@
         assertEquals( "http://www.ibiblio.org/maven", repo.getUrl() );
         assertFalse( repo.isCacheFailures() );
         assertTrue( repo.isHardfail() );
-        assertEquals( 3600, repo.getCachePeriod() );
+        assertEquals( DEFAULT_CACHE_PERIOD, repo.getCachePeriod() );
         assertEquals( repo2, repo );
         assertTrue( repo.isProxied() );
 
         ProxyInfo proxyInfo = config.getHttpProxy();
         assertNotNull( proxyInfo );
         assertEquals( "some.local.proxy", proxyInfo.getHost() );
-        assertEquals( 80, proxyInfo.getPort() );
+        assertEquals( DEFAULT_PORT, proxyInfo.getPort() );
         assertEquals( "username", proxyInfo.getUserName() );
         assertEquals( "password", proxyInfo.getPassword() );
 
@@ -96,7 +100,7 @@
             repositories.add( new ProxyRepository( "repo", "url", defLayout ) );
             fail( "Expected UnsupportedOperationException not thrown." );
         }
-        catch ( java.lang.UnsupportedOperationException e )
+        catch ( UnsupportedOperationException e )
         {
             assertTrue( true );
         }

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/Cache.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/Cache.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/Cache.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/Cache.java Tue Jun  6 22:47:45 2006
@@ -132,7 +132,7 @@
      * @param key   the object to map the valued object
      * @param value the object to cache
      */
-    public Object put( Object key, Object value )
+    public void put( Object key, Object value )
     {
         Object old = null;
 
@@ -148,8 +148,6 @@
         }
 
         manageCache();
-
-        return old;
     }
 
     /**

Modified: maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java (original)
+++ maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java Tue Jun  6 22:47:45 2006
@@ -37,6 +37,10 @@
  */
 public class ArtifactUtils
 {
+    private ArtifactUtils()
+    {
+    }
+
     /**
      * Method used to build an artifact and then set its repository and file fields with the proper values
      *
@@ -245,6 +249,7 @@
                 // contains artifactId, version, classifier, and extension.
                 String avceGlob = tokens.nextToken();
 
+                //noinspection CollectionDeclaredAsConcreteClass
                 LinkedList avceTokenList = new LinkedList();
 
                 StringTokenizer avceTokenizer = new StringTokenizer( avceGlob, "-" );

Modified: maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/digest/DefaultDigester.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/digest/DefaultDigester.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/digest/DefaultDigester.java (original)
+++ maven/repository-manager/trunk/maven-repository-utils/src/main/java/org/apache/maven/repository/digest/DefaultDigester.java Tue Jun  6 22:47:45 2006
@@ -1,16 +1,5 @@
 package org.apache.maven.repository.digest;
 
-import org.codehaus.plexus.util.IOUtil;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 /*
  * Copyright 2005-2006 The Apache Software Foundation.
  *
@@ -26,6 +15,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * Create a digest for a file.

Modified: maven/repository-manager/trunk/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java Tue Jun  6 22:47:45 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.repository;
 
+/*
+ * 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 org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.codehaus.plexus.PlexusTestCase;

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=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/pom.xml (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/pom.xml Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BaseAction.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BaseAction.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BaseAction.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/BaseAction.java Tue Jun  6 22:47:45 2006
@@ -17,8 +17,8 @@
  */
 
 import com.opensymphony.xwork.Action;
-import org.apache.maven.repository.manager.web.job.DiscovererScheduler;
 import org.apache.maven.repository.manager.web.execution.DiscovererExecution;
+import org.apache.maven.repository.manager.web.job.DiscovererScheduler;
 
 /**
  * This is the Action class of index.jsp, which is the initial page of the web application.
@@ -53,6 +53,7 @@
         }
         catch ( Exception e )
         {
+            // TODO: better exception handling!
             e.printStackTrace();
             return ERROR;
         }

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/GeneralSearchAction.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/GeneralSearchAction.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/GeneralSearchAction.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/GeneralSearchAction.java Tue Jun  6 22:47:45 2006
@@ -1,5 +1,21 @@
 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.Action;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/PackageSearchAction.java Tue Jun  6 22:47:45 2006
@@ -20,14 +20,13 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.repository.indexing.ArtifactRepositoryIndex;
-import org.apache.maven.repository.indexing.DefaultRepositoryIndexSearcher;
+import org.apache.maven.repository.indexing.RepositoryIndex;
 import org.apache.maven.repository.indexing.RepositoryIndexException;
 import org.apache.maven.repository.indexing.RepositoryIndexSearchException;
-import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
 import org.apache.maven.repository.indexing.RepositoryIndexSearchLayer;
+import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
 import org.apache.maven.repository.indexing.query.SinglePhraseQuery;
 import org.apache.maven.repository.manager.web.job.Configuration;
-import org.apache.maven.repository.indexing.RepositoryIndex;
 
 import java.io.File;
 import java.net.MalformedURLException;

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/RepositoryBrowseAction.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/RepositoryBrowseAction.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/RepositoryBrowseAction.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/RepositoryBrowseAction.java Tue Jun  6 22:47:45 2006
@@ -1,5 +1,21 @@
 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.Action;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -11,6 +27,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.TreeMap;
 
 /**
@@ -38,15 +55,15 @@
 
     private String group;
 
-    private TreeMap artifactMap;
+    private Map artifactMap;
 
     private String folder;
 
     private int idx;
 
     public String execute()
-        throws Exception
     {
+        // TODO! fix hardcoded path
         String path = "E:/jeprox/maven-repository-manager/trunk/maven-repository-discovery/src/test/repository";
 
         ArtifactRepository repository =
@@ -58,21 +75,19 @@
 
         artifactMap = new TreeMap();
 
-        String groupId;
-
         while ( iterator.hasNext() )
         {
             Artifact artifact = (Artifact) iterator.next();
 
-            groupId = artifact.getGroupId();
+            String groupId = artifact.getGroupId();
 
             String key = groupId.replace( '.', '/' ) + "/" + artifact.getArtifactId() + "/" + artifact.getVersion();
 
-            ArrayList artifactList;
+            List artifactList;
 
             if ( artifactMap.containsKey( key ) )
             {
-                artifactList = (ArrayList) artifactMap.get( key );
+                artifactList = (List) artifactMap.get( key );
             }
             else
             {
@@ -87,28 +102,28 @@
         }
 
         //set the index for folder level to be displayed
-        setIdx( 1 );
+        idx = 1;
 
-        setFolder( "" );
+        folder = "";
 
         return SUCCESS;
     }
 
+    // TODO! is this method needed?
     public String doEdit()
-        throws Exception
     {
-        setIdx( getIdx() + 1 );
+        idx = idx + 1;
 
         //set folder to "" if we are at the root directory
-        if ( getIdx() == 1 )
+        if ( idx == 1 )
         {
-            setFolder( "" );
+            folder = "";
         }
 
         return SUCCESS;
     }
 
-    public TreeMap getArtifactMap()
+    public Map getArtifactMap()
     {
         return artifactMap;
     }

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/execution/DiscovererExecution.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/execution/DiscovererExecution.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/execution/DiscovererExecution.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/execution/DiscovererExecution.java Tue Jun  6 22:47:45 2006
@@ -16,29 +16,29 @@
  * limitations under the License.
  */
 
+import org.apache.lucene.index.IndexReader;
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.repository.indexing.RepositoryIndexException;
+import org.apache.maven.model.Model;
+import org.apache.maven.repository.discovery.ArtifactDiscoverer;
+import org.apache.maven.repository.discovery.MetadataDiscoverer;
 import org.apache.maven.repository.indexing.ArtifactRepositoryIndex;
 import org.apache.maven.repository.indexing.MetadataRepositoryIndex;
 import org.apache.maven.repository.indexing.PomRepositoryIndex;
+import org.apache.maven.repository.indexing.RepositoryIndexException;
 import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
 import org.apache.maven.repository.manager.web.job.Configuration;
-import org.apache.maven.repository.discovery.ArtifactDiscoverer;
-import org.apache.maven.repository.discovery.MetadataDiscoverer;
-import org.apache.maven.model.Model;
-import org.apache.lucene.index.IndexReader;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
-import java.util.List;
-import java.util.Iterator;
-import java.util.Properties;
 import java.io.File;
 import java.net.MalformedURLException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
 
 /**
  * This is the class that executes the discoverer and indexer.
@@ -80,8 +80,6 @@
 
     private ArtifactRepositoryLayout layout;
 
-    private Properties props;
-
     private String indexPath;
 
     private String blacklistedPatterns;
@@ -101,24 +99,16 @@
     public void executeDiscovererIfIndexDoesNotExist()
         throws MalformedURLException, RepositoryIndexException
     {
-        props = config.getProperties();
+        Properties props = config.getProperties();
         indexPath = props.getProperty( "index.path" );
 
         File indexDir = new File( indexPath );
-        boolean isExisting;
+        boolean isExisting = false;
 
         if ( IndexReader.indexExists( indexDir ) )
         {
             isExisting = true;
         }
-        else if ( !indexDir.exists() )
-        {
-            isExisting = false;
-        }
-        else
-        {
-            isExisting = false;
-        }
 
         if ( !isExisting )
         {
@@ -132,12 +122,12 @@
     public void executeDiscoverer()
         throws MalformedURLException, RepositoryIndexException
     {
-        props = config.getProperties();
+        Properties props = config.getProperties();
         indexPath = props.getProperty( "index.path" );
         layout = config.getLayout();
         blacklistedPatterns = props.getProperty( "blacklist.patterns" );
-        includeSnapshots = new Boolean( props.getProperty( "include.snapshots" ) ).booleanValue();
-        convertSnapshots = new Boolean( props.getProperty( "convert.snapshots" ) ).booleanValue();
+        includeSnapshots = Boolean.valueOf( props.getProperty( "include.snapshots" ) ).booleanValue();
+        convertSnapshots = Boolean.valueOf( props.getProperty( "convert.snapshots" ) ).booleanValue();
 
         try
         {
@@ -149,11 +139,11 @@
         }
 
         getLogger().info( "[DiscovererExecution] Started discovery and indexing.." );
-        if ( props.getProperty( "layout" ).equals( "default" ) )
+        if ( "default".equals( props.getProperty( "layout" ) ) )
         {
             executeDiscovererInDefaultRepo();
         }
-        else if ( props.getProperty( "layout" ).equals( "legacy" ) )
+        else if ( "legacy".equals( props.getProperty( "layout" ) ) )
         {
             executeDiscovererInLegacyRepo();
         }
@@ -210,17 +200,7 @@
         for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
         {
             Artifact artifact = (Artifact) iter.next();
-            try
-            {
-                artifactIndex.indexArtifact( artifact );
-            }
-            catch ( Exception e )
-            {
-                if ( e instanceof RepositoryIndexException )
-                {
-                    throw (RepositoryIndexException) e;
-                }
-            }
+            artifactIndex.indexArtifact( artifact );
 
             if ( artifactIndex.isOpen() )
             {
@@ -248,17 +228,8 @@
         for ( Iterator iter = metadataList.iterator(); iter.hasNext(); )
         {
             RepositoryMetadata repoMetadata = (RepositoryMetadata) iter.next();
-            try
-            {
-                metadataIndex.index( repoMetadata );
-            }
-            catch ( Exception e )
-            {
-                if ( e instanceof RepositoryIndexException )
-                {
-                    throw (RepositoryIndexException) e;
-                }
-            }
+            metadataIndex.index( repoMetadata );
+
             if ( metadataIndex.isOpen() )
             {
                 metadataIndex.optimize();
@@ -281,17 +252,7 @@
         for ( Iterator iter = models.iterator(); iter.hasNext(); )
         {
             Model model = (Model) iter.next();
-            try
-            {
-                pomIndex.indexPom( model );
-            }
-            catch ( Exception e )
-            {
-                if ( e instanceof RepositoryIndexException )
-                {
-                    throw (RepositoryIndexException) e;
-                }
-            }
+            pomIndex.indexPom( model );
 
             if ( pomIndex.isOpen() )
             {

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/Configuration.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/Configuration.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/Configuration.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/Configuration.java Tue Jun  6 22:47:45 2006
@@ -1,12 +1,5 @@
 package org.apache.maven.repository.manager.web.job;
 
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-
-import java.util.Properties;
 /*
  * Copyright 2005-2006 The Apache Software Foundation.
  *
@@ -22,6 +15,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+import java.util.Properties;
 
 /**
  * This class contains the configuration values to be used by the scheduler

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererJob.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererJob.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererJob.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererJob.java Tue Jun  6 22:47:45 2006
@@ -16,32 +16,14 @@
  * limitations under the License.
  */
 
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
-import org.apache.maven.model.Model;
-import org.apache.maven.repository.discovery.ArtifactDiscoverer;
-import org.apache.maven.repository.discovery.DefaultArtifactDiscoverer;
-import org.apache.maven.repository.discovery.DefaultMetadataDiscoverer;
-import org.apache.maven.repository.discovery.LegacyArtifactDiscoverer;
-import org.apache.maven.repository.discovery.MetadataDiscoverer;
-import org.apache.maven.repository.indexing.ArtifactRepositoryIndex;
-import org.apache.maven.repository.indexing.MetadataRepositoryIndex;
-import org.apache.maven.repository.indexing.PomRepositoryIndex;
 import org.apache.maven.repository.indexing.RepositoryIndexException;
-import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
 import org.apache.maven.repository.manager.web.execution.DiscovererExecution;
 import org.codehaus.plexus.scheduler.AbstractJob;
 import org.quartz.JobDataMap;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 
-import java.io.File;
 import java.net.MalformedURLException;
-import java.util.Iterator;
-import java.util.List;
 
 /**
  * This class is the discoverer job that is executed by the scheduler.
@@ -53,7 +35,7 @@
 {
     public static final String ROLE = DiscovererJob.class.getName();
 
-    public static String MAP_DISCOVERER_EXECUTION = "EXECUTION";
+    public static final String MAP_DISCOVERER_EXECUTION = "EXECUTION";
 
     /**
      * Execute the discoverer and the indexer.
@@ -76,10 +58,12 @@
         }
         catch ( RepositoryIndexException e )
         {
+            // TODO!
             e.printStackTrace();
         }
         catch ( MalformedURLException me )
         {
+            // TODO!
             me.printStackTrace();
         }
 

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererScheduler.java
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererScheduler.java?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererScheduler.java (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/job/DiscovererScheduler.java Tue Jun  6 22:47:45 2006
@@ -16,26 +16,18 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.text.ParseException;
-import java.util.Properties;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
-import org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory;
-import org.apache.maven.repository.discovery.ArtifactDiscoverer;
-import org.apache.maven.repository.discovery.MetadataDiscoverer;
-import org.apache.maven.repository.indexing.RepositoryIndexingFactory;
 import org.apache.maven.repository.manager.web.execution.DiscovererExecution;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.scheduler.AbstractJob;
 import org.codehaus.plexus.scheduler.Scheduler;
 import org.quartz.CronTrigger;
 import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
 import org.quartz.SchedulerException;
 
+import java.text.ParseException;
+import java.util.Properties;
+
 /**
  * This class sets the job to be executed in the plexus-quartz scheduler
  *
@@ -54,8 +46,6 @@
      */
     private Scheduler scheduler;
 
-    private Properties props;
-
     /**
      * @plexus.requirement
      */
@@ -64,17 +54,16 @@
     /**
      * Method that sets the schedule in the plexus-quartz scheduler
      *
-     * @throws IOException
      * @throws ParseException
      * @throws SchedulerException
      */
     public void setSchedule()
-        throws IOException, ParseException, SchedulerException
+        throws ParseException, SchedulerException
     {
-        props = config.getProperties();
+        Properties props = config.getProperties();
         JobDetail jobDetail = new JobDetail( "discovererJob", "DISCOVERER", DiscovererJob.class );
         JobDataMap dataMap = new JobDataMap();
-        dataMap.put( DiscovererJob.LOGGER, getLogger() );
+        dataMap.put( AbstractJob.LOGGER, getLogger() );
         dataMap.put( DiscovererJob.MAP_DISCOVERER_EXECUTION, execution );
         jobDetail.setJobDataMap( dataMap );
 

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/decorators.xml
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/decorators.xml?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/decorators.xml (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/decorators.xml Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
 <decorators defaultdir="/WEB-INF/jsp/decorators">
   <decorator name="default" page="default.jsp">
     <pattern>/*</pattern>

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=412295&r1=412294&r2=412295&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 Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<%--
+  ~ 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 uri="webwork" prefix="ww" %>
 
 <html>
@@ -7,24 +23,24 @@
 
 <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:set name="previousFolder" value="''" />
+  <ww:set name="counter" value="0" />
   <ww:if test="folder != ''">
-    <ww:set name="folderHeader" value="folder.split('/')"/>
+    <ww:set name="folderHeader" value="folder.split('/')" />
     <ww:iterator value="#folderHeader">
-      <ww:set name="counter" value="#counter + 1"/>
+      <ww:set name="counter" value="#counter + 1" />
       <ww:if test="#previousFolder == ''">
-        <ww:set name="previousFolder" value="top"/>
+        <ww:set name="previousFolder" value="top" />
       </ww:if>
       <ww:else>
-        <ww:set name="previousFolder" value="#previousFolder + '/' + top"/>
+        <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> /
+          value="#counter" /></ww:param><ww:param name="folder"></ww:param></ww:url>"></ww:if><ww:property /></a> /
     </ww:iterator>
   </ww:if>
 </h3>
-<br/>
+<br />
 
 <ww:set name="previousFolder" value="'the previous folder'"/>
 <ww:set name="in" value="idx" scope="page"/>
@@ -33,14 +49,18 @@
 <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"/>
@@ -57,32 +77,32 @@
   </ww:iterator>
 
   <ww:if test="folder != ''">
-    <ww:set name="previousFolder" value="''"/>
-    <ww:set name="artifactList" value="artifactMap.get(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>
+          <td><ww:property value="groupId" /></td>
         </tr>
         <tr align="left">
           <th>Artifact ID</th>
-          <td><ww:property value="artifactId"/></td>
+          <td><ww:property value="artifactId" /></td>
         </tr>
         <tr align="left">
           <th>Version</th>
-          <td><ww:property value="version"/></td>
+          <td><ww:property value="version" /></td>
         </tr>
         <tr align="left">
           <th>Derivatives</th>
-          <td><ww:property value="groupId"/></td>
+          <td><ww:property value="groupId" /></td>
         </tr>
         <tr align="left">
           <th>Parent</th>
-          <td><ww:property value="folder"/></td>
+          <td><ww:property value="folder" /></td>
         </tr>
       </table>
-      <br/>
+      <br />
     </ww:iterator>
   </ww:if>
 </body>

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=412295&r1=412294&r2=412295&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 Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<%--
+  ~ 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 uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
 <html>
 <head>

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/form.jspf
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/form.jspf?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/form.jspf (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/form.jspf Tue Jun  6 22:47:45 2006
@@ -12,7 +12,6 @@
   ~ 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.
-  ~
   --%>
 
 <script type="text/javascript">

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/index.jsp
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/index.jsp?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/index.jsp (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/jsp/index.jsp Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<%--
+  ~ 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 uri="webwork" prefix="ww" %>
 <html>
 <head>

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/web.xml?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/WEB-INF/web.xml Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
 <!DOCTYPE web-app PUBLIC
     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd" >

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-base.css
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-base.css?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-base.css (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-base.css Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
 body {
     margin: 0px;
     padding: 0px;

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-theme.css
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-theme.css?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-theme.css (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/maven-theme.css Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
 body {
     padding: 0px 0px 10px 0px;
 }

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/print.css
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/print.css?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/print.css (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/css/print.css Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
 #banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {
     display: none !important;
 }

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=412295&r1=412294&r2=412295&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 Tue Jun  6 22:47:45 2006
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
 #sidebar {
     float: right;
     font-size: small;

Modified: maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/index.jsp?rev=412295&r1=412294&r2=412295&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/index.jsp (original)
+++ maven/repository-manager/trunk/maven-repository-webapp/src/main/webapp/index.jsp Tue Jun  6 22:47:45 2006
@@ -1 +1,17 @@
+<%--
+  ~ 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.
+  --%>
+
 <%response.sendRedirect( request.getContextPath() + "/index.action" );%>