continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1126835 - /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Date Tue, 24 May 2011 02:35:34 GMT
Author: ctan
Date: Tue May 24 02:35:34 2011
New Revision: 1126835

URL: http://svn.apache.org/viewvc?rev=1126835&view=rev
Log:
[CONTINUUM-2630] do not cache credentials when adding an m2 project

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=1126835&r1=1126834&r2=1126835&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Tue May 24 02:35:34 2011
@@ -75,7 +75,9 @@ public abstract class AbstractContinuumP
 
     protected final Logger log = LoggerFactory.getLogger( getClass() );
 
-    private DefaultHttpClient httpClient;
+    private HttpParams params;
+    
+    private ClientConnectionManager cm;
 
     public void initialize()
         throws InitializationException
@@ -86,21 +88,21 @@ public abstract class AbstractContinuumP
         // https scheme
         schemeRegistry.register( new Scheme( "https", new EasySSLSocketFactory(), 443 ) );
 
-        HttpParams params = new BasicHttpParams();
+        params = new BasicHttpParams();
         // TODO put this values to a configuration way ???
         params.setParameter( ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30 );
         params.setParameter( ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(
30 ) );
         HttpProtocolParams.setVersion( params, HttpVersion.HTTP_1_1 );
 
-        ClientConnectionManager cm = new ThreadSafeClientConnManager( params, schemeRegistry
);
-
-        httpClient = new DefaultHttpClient( cm, params );
+        cm = new ThreadSafeClientConnManager( params, schemeRegistry );
     }
 
     protected File createMetadataFile( URL metadata, String username, String password,
                                        ContinuumProjectBuildingResult result )
         throws IOException, URISyntaxException, HttpException
     {
+        DefaultHttpClient httpClient = new DefaultHttpClient( cm, params );
+
         String url = metadata.toExternalForm();
         if ( metadata.getProtocol().startsWith( "http" ) )
         {



Mime
View raw message