mirror of https://github.com/apache/maven.git
o try and start localizing the handling of -f, release poms, and normal poms to the embedder. just too much funk
going on in the core. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@572388 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cc1ca10d74
commit
441b918f80
|
@ -512,13 +512,13 @@ public class DefaultMaven
|
|||
if ( RELEASE_POMv4.equals( file.getName() ) )
|
||||
{
|
||||
getLogger().info( "NOTE: Using release-pom: " + file + " in reactor build." );
|
||||
|
||||
usingReleasePom = true;
|
||||
}
|
||||
|
||||
MavenProject project = getProject(
|
||||
MavenProject project = projectBuilder.build(
|
||||
file,
|
||||
localRepository,
|
||||
settings,
|
||||
globalProfileManager );
|
||||
|
||||
if ( isRoot )
|
||||
|
@ -609,29 +609,6 @@ public class DefaultMaven
|
|||
return projects;
|
||||
}
|
||||
|
||||
public MavenProject getProject( File pom,
|
||||
ArtifactRepository localRepository,
|
||||
Settings settings,
|
||||
ProfileManager globalProfileManager )
|
||||
throws ProjectBuildingException, ArtifactResolutionException, ProfileActivationException
|
||||
{
|
||||
if ( pom.exists() )
|
||||
{
|
||||
if ( pom.length() == 0 )
|
||||
{
|
||||
throw new ProjectBuildingException(
|
||||
"unknown",
|
||||
"The file " + pom.getAbsolutePath() +
|
||||
" you specified has zero length." );
|
||||
}
|
||||
}
|
||||
|
||||
return projectBuilder.build(
|
||||
pom,
|
||||
localRepository,
|
||||
globalProfileManager );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Methods used by all execution request handlers
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
@ -75,9 +75,16 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
{
|
||||
// Actual POM File
|
||||
|
||||
if ( request.getBaseDirectory() != null )
|
||||
if ( request.getPomFile() == null && request.getBaseDirectory() != null )
|
||||
{
|
||||
request.setPomFile( new File( request.getBaseDirectory(), Maven.POMv4 ).getAbsolutePath() );
|
||||
File pom = new File( request.getBaseDirectory(), Maven.RELEASE_POMv4 );
|
||||
|
||||
if ( !pom.exists() )
|
||||
{
|
||||
pom = new File( request.getBaseDirectory(), Maven.POMv4 );
|
||||
}
|
||||
|
||||
request.setPomFile( pom.getAbsolutePath() );
|
||||
}
|
||||
|
||||
if ( request.getSettings() == null )
|
||||
|
|
Loading…
Reference in New Issue