Adding showErrors to the tests, so we can see problems that come up.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@496399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-01-15 16:44:56 +00:00
parent 812e887a07
commit 01b08e86d1
1 changed files with 14 additions and 8 deletions

View File

@ -1,21 +1,21 @@
package org.apache.maven.embedder;
import junit.framework.TestCase;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.Model;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionResult;
import org.apache.maven.model.Model;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.io.Writer;
import java.io.FileWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.Arrays;
import junit.framework.TestCase;
public class MavenEmbedderTest
extends TestCase
@ -57,6 +57,7 @@ public class MavenEmbedderTest
MavenExecutionRequest request = new DefaultMavenExecutionRequest()
.setBaseDirectory( targetDirectory )
.setShowErrors( true )
.setGoals( Arrays.asList( new String[]{ "package" } ) );
MavenExecutionResult result = maven.execute( request );
@ -81,6 +82,7 @@ public class MavenEmbedderTest
MavenExecutionRequest request = new DefaultMavenExecutionRequest()
.setPomFile( new File( targetDirectory, "pom.xml" ).getAbsolutePath() )
.setShowErrors( true )
.setGoals( Arrays.asList( new String[]{ "package" } ) );
MavenExecutionResult result = maven.execute( request );
@ -107,6 +109,7 @@ public class MavenEmbedderTest
MavenExecutionRequest requestWithoutProfile = new DefaultMavenExecutionRequest()
.setPomFile( new File( targetDirectory, "pom.xml" ).getAbsolutePath() )
.setShowErrors( true )
.setGoals( Arrays.asList( new String[]{ "validate" } ) );
MavenExecutionResult r0 = maven.execute( requestWithoutProfile );
@ -123,6 +126,7 @@ public class MavenEmbedderTest
MavenExecutionRequest request = new DefaultMavenExecutionRequest()
.setPomFile( new File( targetDirectory, "pom.xml" ).getAbsolutePath() )
.setShowErrors( true )
.setGoals( Arrays.asList( new String[]{ "validate" } ) )
.addActiveProfile( "embedderProfile" );
@ -182,7 +186,9 @@ public class MavenEmbedderTest
public void testProjectReading()
throws Exception
{
MavenExecutionRequest request = new DefaultMavenExecutionRequest().setPomFile( getPomFile().getAbsolutePath() );
MavenExecutionRequest request = new DefaultMavenExecutionRequest()
.setShowErrors( true )
.setPomFile( getPomFile().getAbsolutePath() );
MavenExecutionResult result = maven.readProjectWithDependencies( request );