}
protected MavenProject getMavenProject()
{
MavenProjectStub mavenProjectStub = new MavenProjectStub()
{
@Override
public List<RemoteRepository> getRemotePluginRepositories()
{
if ( super.getRemotePluginRepositories() == null )
{
return RepositoryUtils.toRepos( request.getRemoteRepositories() );
}
return super.getRemotePluginRepositories();
}
@Override
public List<ArtifactRepository> getRemoteArtifactRepositories()
{
if ( super.getRemotePluginRepositories() == null )
{
return request.getRemoteRepositories();
}
return super.getRemoteArtifactRepositories();
}
@Override
public String getName()
{
return "foo";
}
@Override
public String getVersion()
{
return "1.0-SNAPSHOT";
}
@Override
public boolean isExecutionRoot()
{
return true;
}
@Override
public List<String> getCompileSourceRoots()
{
return Lists.newArrayList( "src/main/java" );
}
@Override
public List<String> getTestCompileSourceRoots()
{
return Lists.newArrayList( "src/test/java" );
}
};
mavenProjectStub.setPackaging( "jar" );
Build build = new Build();
build.setOutputDirectory( "target" );
build.setSourceDirectory( "src/main/java" );
build.setTestSourceDirectory( "src/test/java" );
mavenProjectStub.setBuild( build );
return mavenProjectStub;
}