You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2010/04/02 19:13:42 UTC
svn commit: r930327 -
/maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
Author: hboutemy
Date: Fri Apr 2 17:13:05 2010
New Revision: 930327
URL: http://svn.apache.org/viewvc?rev=930327&view=rev
Log:
made comparison with reference optional
Modified:
maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
Modified: maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java?rev=930327&r1=930326&r2=930327&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java (original)
+++ maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java Fri Apr 2 17:13:05 2010
@@ -127,6 +127,7 @@ public class IntegrationTestMojo
boolean fileNamesEquals = CollectionUtils.isEqualCollection( referenceFiles, projectFiles );
+ if ( !fileNamesEquals )
{
for ( Iterator refs = referenceFiles.iterator(); refs.hasNext(); )
{
@@ -139,14 +140,11 @@ public class IntegrationTestMojo
}
else
{
- getLog().debug( "Not contained " + ref );
+ getLog().error( "Not contained " + ref );
}
}
- getLog().debug( "Remains " + projectFiles );
- }
+ getLog().error( "Remains " + projectFiles );
- if ( !fileNamesEquals )
- {
throw new IntegrationTestFailure( "Reference and generated project differs" );
}
@@ -225,7 +223,11 @@ public class IntegrationTestMojo
File reference = new File( goalFile.getParentFile(), "reference" );
- assertTest( reference, new File( basedir, request.getArtifactId() ) );
+ if ( reference.exists() )
+ {
+ // compare generated project with reference
+ assertTest( reference, new File( basedir, request.getArtifactId() ) );
+ }
if ( result.getCause() != null )
{