[MDEPLOY-265] Allow old alt*DeploymentRepository property format if default layout is used

The legacy format (<=2.x) of alt*DeploymentRepository is id::layout::url.
The new format (>= 3.x) of alt*DeploymentRepository is id::url which is
equivalent to id::default:url from the legacy format.

This change introduces backwards compatibility with 2.x by supporting
alt*DeploymentRepository values in the id::layout::url format if and only if
the layout is equal to "default".  The "default" layout is the most commonly
used layout, so this should maintain backwards compatibility with the large
majority of projects using the alt*DeploymentRepository properties.

* Usage of the legacy format with the "default" layout will result in a warning
  message being logged.
* Usage of the legacy format with layouts other than "default" will result in
  an exception being thrown.

This closes #15
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index ab0c72b..ae26134 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -259,10 +259,9 @@
 
                 if ( "default".equals( layout ) )
                 {
-                    throw new MojoFailureException( altDeploymentRepo,
-                            "Invalid legacy syntax for repository.",
-                            "Invalid legacy syntax for alternative repository. Use \"" + id + "::" + url + "\" instead."
-                    );
+                    getLog().warn( "Using legacy syntax for alternative repository. "
+                            + "Use \"" + id + "::" + url + "\" instead." );
+                    repo = createDeploymentArtifactRepository( id, url );
                 }
                 else
                 {
diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
index 9a02b1c..63fe2de 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -568,16 +568,10 @@
             new ProjectDeployerRequest()
                 .setProject( project )
                 .setAltDeploymentRepository( "altDeploymentRepository::default::http://localhost" );
-        try
-        {
-            mojo.getDeploymentRepository( pdr );
-            fail( "Should throw: Invalid legacy syntax for repository." );
-        }
-        catch( MojoFailureException e )
-        {
-            assertEquals( e.getMessage(), "Invalid legacy syntax for repository.");
-            assertEquals( e.getLongMessage(), "Invalid legacy syntax for alternative repository. Use \"altDeploymentRepository::http://localhost\" instead.");
-        }
+
+        assertEquals( repository,
+                mojo.getDeploymentRepository( pdr ) );
+
     }
 
     public void testLegacyAltDeploymentRepositoryWithLegacyLayout()
@@ -640,7 +634,7 @@
         DeployMojo mojo = spy( new DeployMojo() );
 
         ArtifactRepository repository = mock( ArtifactRepository.class );
-        when( mojo.createDeploymentArtifactRepository( "altDeploymentRepository", "http://localhost"
+        when( mojo.createDeploymentArtifactRepository( "altDeploymentRepository", "scm:svn:http://localhost"
         ) ).thenReturn( repository );
 
         project.setVersion( "1.0-SNAPSHOT" );
@@ -649,16 +643,9 @@
                 new ProjectDeployerRequest()
                         .setProject( project )
                         .setAltDeploymentRepository( "altDeploymentRepository::default::scm:svn:http://localhost" );
-        try
-        {
-            mojo.getDeploymentRepository( pdr );
-            fail( "Should throw: Invalid legacy syntax for repository." );
-        }
-        catch( MojoFailureException e )
-        {
-            assertEquals( e.getMessage(), "Invalid legacy syntax for repository.");
-            assertEquals( e.getLongMessage(), "Invalid legacy syntax for alternative repository. Use \"altDeploymentRepository::scm:svn:http://localhost\" instead.");
-        }
+
+        assertEquals( repository,
+                mojo.getDeploymentRepository( pdr ) );
     }
     public void testLegacyScmSvnAltDeploymentRepository()
             throws Exception