mirror of https://github.com/apache/maven.git
PR: MNG-914
fix test git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307301 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
552ab6d2b3
commit
7134d66a5c
|
@ -37,6 +37,7 @@ import org.codehaus.plexus.util.dag.CycleDetectedException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
@ -143,13 +144,15 @@ public class PluginParameterExpressionEvaluatorTest
|
||||||
throws CycleDetectedException
|
throws CycleDetectedException
|
||||||
{
|
{
|
||||||
return new MavenSession( container, new Settings(), repo, new DefaultEventDispatcher(),
|
return new MavenSession( container, new Settings(), repo, new DefaultEventDispatcher(),
|
||||||
new ReactorManager( Collections.EMPTY_LIST ), Collections.EMPTY_LIST, ".", new Properties() );
|
new ReactorManager( Collections.EMPTY_LIST ), Collections.EMPTY_LIST, ".",
|
||||||
|
new Properties(), new Date() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLocalRepositoryExtraction()
|
public void testLocalRepositoryExtraction()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
ExpressionEvaluator expressionEvaluator = createExpressionEvaluator( createDefaultProject(), null, new Properties() );
|
ExpressionEvaluator expressionEvaluator = createExpressionEvaluator( createDefaultProject(), null,
|
||||||
|
new Properties() );
|
||||||
Object value = expressionEvaluator.evaluate( "${localRepository}" );
|
Object value = expressionEvaluator.evaluate( "${localRepository}" );
|
||||||
|
|
||||||
assertEquals( "local", ( (DefaultArtifactRepository) value ).getId() );
|
assertEquals( "local", ( (DefaultArtifactRepository) value ).getId() );
|
||||||
|
@ -165,7 +168,8 @@ public class PluginParameterExpressionEvaluatorTest
|
||||||
Model model = new Model();
|
Model model = new Model();
|
||||||
model.setBuild( build );
|
model.setBuild( build );
|
||||||
|
|
||||||
ExpressionEvaluator expressionEvaluator = createExpressionEvaluator( new MavenProject( model ), null, new Properties() );
|
ExpressionEvaluator expressionEvaluator = createExpressionEvaluator( new MavenProject( model ), null,
|
||||||
|
new Properties() );
|
||||||
|
|
||||||
Object value = expressionEvaluator.evaluate( "${project.build.directory}/${project.build.finalName}" );
|
Object value = expressionEvaluator.evaluate( "${project.build.directory}/${project.build.finalName}" );
|
||||||
|
|
||||||
|
@ -201,7 +205,8 @@ public class PluginParameterExpressionEvaluatorTest
|
||||||
return new MavenProject( new Model() );
|
return new MavenProject( new Model() );
|
||||||
}
|
}
|
||||||
|
|
||||||
private ExpressionEvaluator createExpressionEvaluator( MavenProject project, PluginDescriptor pluginDescriptor, Properties executionProperties )
|
private ExpressionEvaluator createExpressionEvaluator( MavenProject project, PluginDescriptor pluginDescriptor,
|
||||||
|
Properties executionProperties )
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
|
ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
|
||||||
|
@ -218,7 +223,8 @@ public class PluginParameterExpressionEvaluatorTest
|
||||||
|
|
||||||
MojoExecution mojoExecution = new MojoExecution( mojo );
|
MojoExecution mojoExecution = new MojoExecution( mojo );
|
||||||
|
|
||||||
return new PluginParameterExpressionEvaluator( session, mojoExecution, null, container.getLogger(), project, executionProperties );
|
return new PluginParameterExpressionEvaluator( session, mojoExecution, null, container.getLogger(), project,
|
||||||
|
executionProperties );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Artifact createArtifact( String groupId, String artifactId, String version )
|
protected Artifact createArtifact( String groupId, String artifactId, String version )
|
||||||
|
|
Loading…
Reference in New Issue