mirror of https://github.com/apache/maven.git
Fix: 3944 - we can just use the existence of the project directory to determine whether it is in the build. This will be a contract of the setProjectDirectory method
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@732683 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3c978e962
commit
c4782c4a38
|
@ -141,6 +141,11 @@ public final class PomClassicDomainModel
|
||||||
this.parentFile = parentFile;
|
this.parentFile = parentFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This should only be set for projects that are in the build. Setting for poms in the repo may cause unstable behavior.
|
||||||
|
*
|
||||||
|
* @param projectDirectory
|
||||||
|
*/
|
||||||
public void setProjectDirectory(File projectDirectory)
|
public void setProjectDirectory(File projectDirectory)
|
||||||
{
|
{
|
||||||
this.projectDirectory = projectDirectory;
|
this.projectDirectory = projectDirectory;
|
||||||
|
@ -153,7 +158,7 @@ public final class PomClassicDomainModel
|
||||||
|
|
||||||
public boolean isPomInBuild()
|
public boolean isPomInBuild()
|
||||||
{
|
{
|
||||||
return projectDirectory != null && new File(projectDirectory, "pom.xml").isFile();
|
return projectDirectory != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -410,7 +410,7 @@ public class PomConstructionTest
|
||||||
new File( pom.getValue( "properties/siteOut" ).toString() ) );
|
new File( pom.getValue( "properties/siteOut" ).toString() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: cf. MNG-3944
|
/* FIXME: cf. MNG-3944*/
|
||||||
public void testInterpolationOfBasedirInPomWithUnusualName()
|
public void testInterpolationOfBasedirInPomWithUnusualName()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -418,7 +418,7 @@ public class PomConstructionTest
|
||||||
assertEquals( pom.getBasedir(), new File( pom.getValue( "properties/prop0" ).toString() ) );
|
assertEquals( pom.getBasedir(), new File( pom.getValue( "properties/prop0" ).toString() ) );
|
||||||
assertEquals( pom.getBasedir(), new File( pom.getValue( "properties/prop1" ).toString() ) );
|
assertEquals( pom.getBasedir(), new File( pom.getValue( "properties/prop1" ).toString() ) );
|
||||||
}
|
}
|
||||||
//*/
|
|
||||||
|
|
||||||
private PomArtifactResolver artifactResolver( String basedir )
|
private PomArtifactResolver artifactResolver( String basedir )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue