You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ws...@apache.org on 2008/09/22 00:23:37 UTC

svn commit: r697631 - /continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java

Author: wsmoak
Date: Sun Sep 21 15:23:36 2008
New Revision: 697631

URL: http://svn.apache.org/viewvc?rev=697631&view=rev
Log:
[CONTINUUM-1721] Remove the check which causes an error when adding a Maven 2 project without a scm element.

Modified:
    continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java

Modified: continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=697631&r1=697630&r2=697631&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java (original)
+++ continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java Sun Sep 21 15:23:36 2008
@@ -454,29 +454,7 @@
         // Validate the MavenProject using some Continuum rules
         // ----------------------------------------------------------------------
 
-        // SCM connection
-        Scm scm = project.getScm();
-
-        if ( scm == null )
-        {
-            result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM, getProjectName( project ) );
-
-            getLogger().error( "Missing 'scm' element in the " + getProjectName( project ) + " POM." );
-
-            return null;
-        }
-
-        String url = scm.getConnection();
-
-        if ( StringUtils.isEmpty( url ) )
-        {
-            result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM_CONNECTION, getProjectName( project ) );
-
-            getLogger().error(
-                "Missing 'connection' element in the 'scm' element in the " + getProjectName( project ) + " POM." );
-
-            return null;
-        }
+        // SCM connection should be optional -- we can get it from the pom url in many cases (CONTINUUM-1721)
 
         return project;
     }