On 6 Jan 07, at 1:45 PM 6 Jan 07, [EMAIL PROTECTED] wrote:

Author: fgiust
Date: Sat Jan  6 10:45:46 2007
New Revision: 493534

URL: http://svn.apache.org/viewvc?view=rev&rev=493534
Log:
MREPOSITORY-2 project.scm.connection should not be required for bundle-create


Why not?

Modified:
maven/plugins/trunk/maven-repository-plugin/src/main/java/org/ apache/maven/plugins/repository/BundleCreateMojo.java maven/plugins/trunk/maven-repository-plugin/src/test/java/org/ apache/maven/plugins/repository/BundleCreateMojoTest.java

Modified: maven/plugins/trunk/maven-repository-plugin/src/main/java/ org/apache/maven/plugins/repository/BundleCreateMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven- repository-plugin/src/main/java/org/apache/maven/plugins/repository/ BundleCreateMojo.java?view=diff&rev=493534&r1=493533&r2=493534 ====================================================================== ======== --- maven/plugins/trunk/maven-repository-plugin/src/main/java/org/ apache/maven/plugins/repository/BundleCreateMojo.java (original) +++ maven/plugins/trunk/maven-repository-plugin/src/main/java/org/ apache/maven/plugins/repository/BundleCreateMojo.java Sat Jan 6 10:45:46 2007
@@ -80,7 +80,6 @@
         // name
         // version
         // url
-        // scm url
         // description
         // dependencies
         // licenses
@@ -89,13 +88,6 @@
         validate( project.getName(), "project.name" );

         validate( project.getUrl(), "project.url" );
-
-        if ( project.getScm() == null )
-        {
- throw new MojoExecutionException( "Project scm element is null." );
-        }
-
- validate( project.getScm().getConnection(), "project.scm.connection" );

         validate( project.getDescription(), "project.description" );


Modified: maven/plugins/trunk/maven-repository-plugin/src/test/java/ org/apache/maven/plugins/repository/BundleCreateMojoTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven- repository-plugin/src/test/java/org/apache/maven/plugins/repository/ BundleCreateMojoTest.java?view=diff&rev=493534&r1=493533&r2=493534 ====================================================================== ======== --- maven/plugins/trunk/maven-repository-plugin/src/test/java/org/ apache/maven/plugins/repository/BundleCreateMojoTest.java (original) +++ maven/plugins/trunk/maven-repository-plugin/src/test/java/org/ apache/maven/plugins/repository/BundleCreateMojoTest.java Sat Jan 6 10:45:46 2007
@@ -324,16 +324,11 @@

File testPom = new File( getBasedir(), "src/test/resources/ unit/no-scm/pom.xml" );

-        try
-        {
- BundleCreateMojo mojo = (BundleCreateMojo) lookupMojo ( "bundle-create", testPom );
-            mojo.execute();
- fail( "Must throw an exception on a project element scm is null" );
-        }
-        catch ( Exception e )
-        {
-            assertTrue( true );
-        }
+ BundleCreateMojo mojo = (BundleCreateMojo) lookupMojo ( "bundle-create", testPom );
+        mojo.execute();
+
+ // MREPOSITORY-2 project.scm.connection should not be required for bundle-create + // fail( "Must throw an exception on a project element scm is null" );

     }






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to