continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r432666 - in /maven/continuum/trunk/continuum-api/src: main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
Date Fri, 18 Aug 2006 18:04:41 GMT
Author: carlos
Date: Fri Aug 18 11:04:40 2006
New Revision: 432666

URL: http://svn.apache.org/viewvc?rev=432666&view=rev
Log:
[CONTINUUM-747] Continuum can't add a project with pom in https with authentication

Added:
    maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
  (with props)
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=432666&r1=432665&r2=432666&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Fri Aug 18 11:04:40 2006
@@ -51,7 +51,7 @@
 
         if ( metadata.getProtocol().startsWith( "http" ) )
         {
-            is = new MungedHttpsURL( metadata.toExternalForm(), username, password ).getURL().openStream();
+            is = new MungedHttpsURL( metadata.toExternalForm(), username, password ).getURLConnection().getInputStream();
         }
         else
         {

Added: maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java?rev=432666&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
(added)
+++ maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
Fri Aug 18 11:04:40 2006
@@ -0,0 +1,71 @@
+package org.apache.maven.continuum.project.builder;
+
+/*
+ * Copyright 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 java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.console.ConsoleLogger;
+
+/**
+ * Test for {@link AbstractContinuumProjectBuilder}
+ * 
+ * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class AbstractContinuumProjectBuilderTest
+    extends TestCase
+{
+
+    private ContinuumProjectBuilder builder;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        builder = new ContinuumProjectBuilder();
+        builder.enableLogging( new ConsoleLogger( Logger.LEVEL_DEBUG, "" ) );
+    }
+
+    /**
+     * Test for CONTINUUM-747. Disable as it requires a password protected resource under
https.
+     * 
+     * @throws Exception
+     */
+    public void disabledTestCreateMetadataFileURLStringString()
+        throws Exception
+    {
+        URL url = new URL( "https://someurl/pom.xml" );
+        String username = "myusername";
+        String password = "mypassword";
+        builder.createMetadataFile( url, username, password );
+    }
+
+    private class ContinuumProjectBuilder
+        extends AbstractContinuumProjectBuilder
+    {
+
+        public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String
username, String password )
+            throws ContinuumProjectBuilderException
+        {
+            return null;
+        }
+
+    }
+
+}
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-api/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message