continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r697658 - /continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
Date Mon, 22 Sep 2008 02:35:32 GMT
Author: wsmoak
Date: Sun Sep 21 19:35:32 2008
New Revision: 697658

URL: http://svn.apache.org/viewvc?rev=697658&view=rev
Log:
[CONTINUUM-1721] Preserve the original pom url.  Need to find a home for this code, probably
in a utility method closer to where the url-with-credentials is used.

Modified:
    continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java

Modified: continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?rev=697658&r1=697657&r2=697658&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
(original)
+++ continuum/branches/CONTINUUM-1721/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
Sun Sep 21 19:35:32 2008
@@ -104,33 +104,7 @@
 
         if ( !StringUtils.isEmpty( pomUrl ) )
         {
-            try
-            {
-                URL url = new URL( pomUrl );
-                if ( pomUrl.startsWith( "http" ) && !StringUtils.isEmpty( scmUsername
) )
-                {
-                    StringBuffer urlBuffer = new StringBuffer();
-                    urlBuffer.append( url.getProtocol() ).append( "://" );
-                    urlBuffer.append( scmUsername ).append( ':' ).append( scmPassword ).append(
'@' ).append(
-                        url.getHost() );
-                    if ( url.getPort() != -1 )
-                    {
-                        urlBuffer.append( ":" ).append( url.getPort() );
-                    }
-                    urlBuffer.append( url.getPath() );
-
-                    pom = urlBuffer.toString();
-                }
-                else
-                {
-                    pom = pomUrl;
-                }
-            }
-            catch ( MalformedURLException e )
-            {
-                addActionError( "add.project.unknown.error" );
-                return doDefault();
-            }
+          pom = pomUrl;
         }
         else
         {



Mime
View raw message