You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/02/09 04:21:30 UTC

svn commit: r376170 - in /maven/repository-manager/trunk/maven-repository-proxy/src: main/java/org/apache/maven/repository/proxy/ main/java/org/apache/maven/repository/proxy/configuration/ test/java/org/apache/maven/repository/proxy/ test/java/org/apac...

Author: epunzalan
Date: Wed Feb  8 19:21:27 2006
New Revision: 376170

URL: http://svn.apache.org/viewcvs?rev=376170&view=rev
Log:
MRM-43

Applied code formatting

Modified:
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManager.java
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java
    maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java
    maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java?rev=376170&r1=376169&r2=376170&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java Wed Feb  8 19:21:27 2006
@@ -33,8 +33,8 @@
 import org.apache.maven.wagon.authorization.AuthorizationException;
 import org.apache.maven.wagon.observers.ChecksumObserver;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -126,9 +126,9 @@
      *
      * @param artifact the artifact object to be downloaded from a remote repository
      * @return File object representing the remote artifact in the repository cache
-     * @throws ProxyException when an error occurred during retrieval of the requested artifact
+     * @throws ProxyException                when an error occurred during retrieval of the requested artifact
      * @throws ResourceDoesNotExistException when the requested artifact cannot be found in any of the
-     *      configured repositories
+     *                                       configured repositories
      */
     private File getArtifactFile( Artifact artifact )
         throws ResourceDoesNotExistException, ProxyException
@@ -156,13 +156,13 @@
 
     /**
      * Used to retrieve a remote file from the remote repositories.  This method is used only when the requested
-     *      path cannot be resolved into a repository object, for example, an Artifact.
+     * path cannot be resolved into a repository object, for example, an Artifact.
      *
      * @param path the remote path to use to search for the requested file
      * @return File object representing the remote file in the repository cache
      * @throws ResourceDoesNotExistException when the requested path cannot be found in any of the configured
-     *      repositories.
-     * @throws ProxyException when an error occurred during the retrieval of the requested path
+     *                                       repositories.
+     * @throws ProxyException                when an error occurred during the retrieval of the requested path
      */
     private File getRepositoryFile( String path )
         throws ResourceDoesNotExistException, ProxyException
@@ -172,14 +172,14 @@
 
     /**
      * Used to retrieve a remote file from the remote repositories.  This method is used only when the requested
-     *      path cannot be resolved into a repository object, for example, an Artifact.
+     * path cannot be resolved into a repository object, for example, an Artifact.
      *
-     * @param path the remote path to use to search for the requested file
+     * @param path        the remote path to use to search for the requested file
      * @param useChecksum forces the download to whether use a checksum (if present in the remote repository) or not
      * @return File object representing the remote file in the repository cache
      * @throws ResourceDoesNotExistException when the requested path cannot be found in any of the configured
-     *      repositories.
-     * @throws ProxyException when an error occurred during the retrieval of the requested path
+     *                                       repositories.
+     * @throws ProxyException                when an error occurred during the retrieval of the requested path
      */
     private File getRepositoryFile( String path, boolean useChecksum )
         throws ResourceDoesNotExistException, ProxyException
@@ -218,7 +218,7 @@
                     {
                         tries++;
 
-                        getLogger().info( "Trying " + path + " from " + repository.getId() + "...");
+                        getLogger().info( "Trying " + path + " from " + repository.getId() + "..." );
 
                         wagon.get( path, temp );
 
@@ -307,7 +307,7 @@
     /**
      * Used to remove the ChecksumObservers from the wagonManager object
      *
-     * @param wagon the wagonManager object to remote the ChecksumObservers from
+     * @param wagon       the wagonManager object to remote the ChecksumObservers from
      * @param checksumMap the map representing the list of ChecksumObservers added to the wagonManager object
      */
     private void releaseChecksums( Wagon wagon, Map checksumMap )
@@ -322,7 +322,7 @@
     /**
      * Used to request the wagonManager object to connect to a repository
      *
-     * @param wagon the wagonManager object that will be used to connect to the repository
+     * @param wagon      the wagonManager object that will be used to connect to the repository
      * @param repository the repository object to connect the wagonManager to
      * @return true when the wagonManager is able to connect to the repository
      */
@@ -350,8 +350,8 @@
      * Used to verify the checksum during a wagonManager download
      *
      * @param checksumMap the map of ChecksumObservers present in the wagonManager as transferlisteners
-     * @param path path of the remote object whose checksum is to be verified
-     * @param wagon the wagonManager object used to download the requested path
+     * @param path        path of the remote object whose checksum is to be verified
+     * @param wagon       the wagonManager object used to download the requested path
      * @return true when the checksum succeeds and false when the checksum failed.
      */
     private boolean doChecksumCheck( Map checksumMap, String path, Wagon wagon )
@@ -392,17 +392,20 @@
             }
             catch ( TransferFailedException e )
             {
-                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(), e );
+                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(),
+                                   e );
                 // do nothing try the next checksum
             }
             catch ( ResourceDoesNotExistException e )
             {
-                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(), e );
+                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(),
+                                   e );
                 // do nothing try the next checksum
             }
             catch ( AuthorizationException e )
             {
-                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(), e );
+                getLogger().debug( "An error occurred during the download of " + checksumPath + ": " + e.getMessage(),
+                                   e );
                 // do nothing try the next checksum
             }
             catch ( IOException e )

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManager.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManager.java?rev=376170&r1=376169&r2=376170&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManager.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManager.java Wed Feb  8 19:21:27 2006
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
-import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.repository.proxy.configuration.ProxyConfiguration;
+import org.apache.maven.wagon.ResourceDoesNotExistException;
 
 import java.io.File;
 
@@ -35,22 +35,22 @@
      *
      * @param path the expected repository path
      * @return File object referencing the requested path in the cache
-     * @throws ProxyException when an exception occurred during the retrieval of the requested path
+     * @throws ProxyException                when an exception occurred during the retrieval of the requested path
      * @throws ResourceDoesNotExistException when the requested object can't be found in any of the
-     *      configured repositories
+     *                                       configured repositories
      */
     File get( String path )
         throws ProxyException, ResourceDoesNotExistException;
 
     /**
      * Used to force remote download of the requested path from any the configured repositories.  This method will
-     *      only bypass the cache for searching but the requested path will still be cached.
+     * only bypass the cache for searching but the requested path will still be cached.
      *
      * @param path the expected repository path
      * @return File object referencing the requested path in the cache
-     * @throws ProxyException when an exception occurred during the retrieval of the requested path
+     * @throws ProxyException                when an exception occurred during the retrieval of the requested path
      * @throws ResourceDoesNotExistException when the requested object can't be found in any of the
-     *      configured repositories
+     *                                       configured repositories
      */
     File getRemoteFile( String path )
         throws ProxyException, ResourceDoesNotExistException;

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java?rev=376170&r1=376169&r2=376170&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java Wed Feb  8 19:21:27 2006
@@ -17,16 +17,15 @@
  */
 
 import org.apache.maven.repository.proxy.configuration.ProxyConfiguration;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
-import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.context.ContextException;
-import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 
 /**
  * @author Edwin Punzalan
- *
  * @plexus.component role="org.apache.maven.repository.proxy.ProxyManagerFactory"
  */
 public class ProxyManagerFactory

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/configuration/ProxyConfiguration.java?rev=376170&r1=376169&r2=376170&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 Wed Feb  8 19:21:27 2006
@@ -23,10 +23,10 @@
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.repository.proxy.repository.ProxyRepository;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.io.File;
 
 /**
  * Class to represent the configuration file for the proxy
@@ -46,6 +46,7 @@
     private boolean browsable;
 
     private ArtifactRepository repoCache;
+
     private List repositories = new ArrayList();
 
     /**
@@ -81,9 +82,9 @@
 
         ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();
 
-        repoCache = artifactRepositoryFactory.createArtifactRepository( "localCache", "file://" + 
-                                                                        new File( path ).getAbsolutePath(), layout,
-                                                                        standardPolicy, standardPolicy );
+        repoCache = artifactRepositoryFactory.createArtifactRepository( "localCache",
+                                                                        "file://" + new File( path ).getAbsolutePath(),
+                                                                        layout, standardPolicy, standardPolicy );
     }
 
     /**

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/DefaultProxyManagerTest.java?rev=376170&r1=376169&r2=376170&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 Wed Feb  8 19:21:27 2006
@@ -1,12 +1,12 @@
 package org.apache.maven.repository.proxy;
 
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+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.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 
 import java.io.File;
 

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/test/java/org/apache/maven/repository/proxy/configuration/ProxyConfigurationTest.java?rev=376170&r1=376169&r2=376170&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 Wed Feb  8 19:21:27 2006
@@ -24,8 +24,8 @@
 import org.codehaus.plexus.PlexusTestCase;
 
 import java.io.File;
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
 
 public class ProxyConfigurationTest
     extends PlexusTestCase