in src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java [582:604]
protected MavenProject createMinimalProject( ArtifactRepository localRepository )
{
MavenProjectBuilder projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
DefaultProjectBuilderConfiguration builderConfig = new DefaultProjectBuilderConfiguration( );
builderConfig.setLocalRepository( localRepository );
builderConfig.setGlobalProfileManager( getProfileManager() );
try
{
MavenProject mavenProject = projectBuilder.buildStandaloneSuperProject(builderConfig);
// if we don't null out these fields then the pom that will be created is at the super-pom's
// GAV coordinates and we will not be able to inherit partial GAV coordinates from a parent GAV.
mavenProject.setGroupId(null);
mavenProject.setArtifactId(null);
mavenProject.setVersion(null);
return mavenProject;
}
catch ( ProjectBuildingException e )
{
throw new BuildException( "Unable to create dummy Pom", e );
}
}