public void initialiseMavenProject( MavenProjectBuilder builder, ArtifactRepository localRepository )
{
if ( file != null )
{
addAntRepositoriesToProfileManager();
ProjectBuilderConfiguration builderConfig = this.createProjectBuilderConfig( localRepository );
try
{
mavenProject = builder.build( file, builderConfig );
builder.calculateConcreteState( mavenProject, builderConfig, false );
}
catch ( ProjectBuildingException pbe )
{
throw new BuildException( "Unable to initialize POM " + file.getName() + ": " + pbe.getMessage(), pbe );
}
catch ( ModelInterpolationException mie )
{
throw new BuildException( "Unable to interpolate POM " + file.getName() + ": " + mie.getMessage(), mie );
}
}
else if ( refid != null )
{
this.getPomFromAntProject( refid );
}
else if ( mavenProject != null )
{
addAntRepositoriesToProfileManager();
ProjectBuilderConfiguration builderConfig = this.createProjectBuilderConfig( localRepository );
try
{
builder.calculateConcreteState( mavenProject, builderConfig, false );
}
catch ( ModelInterpolationException mie )