mirror of https://github.com/apache/maven.git
Store the pom File object in the execution request instead of its path
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@587999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64e0d64a56
commit
0d161a73a4
|
@ -468,9 +468,9 @@ public class DefaultMaven
|
||||||
// make sure there is consistent ordering on all platforms, rather than using the filesystem ordering
|
// make sure there is consistent ordering on all platforms, rather than using the filesystem ordering
|
||||||
Collections.sort( files );
|
Collections.sort( files );
|
||||||
}
|
}
|
||||||
else if ( request.getPomFile() != null )
|
else if ( request.getPom() != null )
|
||||||
{
|
{
|
||||||
File projectFile = new File( request.getPomFile() ).getAbsoluteFile();
|
File projectFile = request.getPom().getAbsoluteFile();
|
||||||
|
|
||||||
if ( projectFile.exists() )
|
if ( projectFile.exists() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class DefaultMavenExecutionRequest
|
||||||
|
|
||||||
private boolean recursive = true;
|
private boolean recursive = true;
|
||||||
|
|
||||||
private String pomFile;
|
private File pom;
|
||||||
|
|
||||||
private String reactorFailureBehavior = REACTOR_FAIL_FAST;
|
private String reactorFailureBehavior = REACTOR_FAIL_FAST;
|
||||||
|
|
||||||
|
@ -146,9 +146,15 @@ public class DefaultMavenExecutionRequest
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated use {@link #getPom()} */
|
||||||
public String getPomFile()
|
public String getPomFile()
|
||||||
{
|
{
|
||||||
return pomFile;
|
return pom.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
public File getPom()
|
||||||
|
{
|
||||||
|
return pom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReactorFailureBehavior()
|
public String getReactorFailureBehavior()
|
||||||
|
@ -367,9 +373,17 @@ public class DefaultMavenExecutionRequest
|
||||||
return useReactor;
|
return useReactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated use {@link #setPom(File)} */
|
||||||
public MavenExecutionRequest setPomFile( String pomFilename )
|
public MavenExecutionRequest setPomFile( String pomFilename )
|
||||||
{
|
{
|
||||||
this.pomFile = pomFilename;
|
this.pom = new File( pomFilename );
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MavenExecutionRequest setPom( File pom )
|
||||||
|
{
|
||||||
|
this.pom = pom;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class ExecutionBuildContext
|
||||||
|
|
||||||
public String getPomFile()
|
public String getPomFile()
|
||||||
{
|
{
|
||||||
return request.getPomFile();
|
return request.getPom().getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getProfiles()
|
public List getProfiles()
|
||||||
|
|
|
@ -109,9 +109,14 @@ public interface MavenExecutionRequest
|
||||||
List getEventMonitors();
|
List getEventMonitors();
|
||||||
|
|
||||||
// Pom
|
// Pom
|
||||||
|
/** @deprecated use {@link #setPom(File)} */
|
||||||
MavenExecutionRequest setPomFile( String pomFilename );
|
MavenExecutionRequest setPomFile( String pomFilename );
|
||||||
|
/** @deprecated use {@link #getPom()} */
|
||||||
String getPomFile();
|
String getPomFile();
|
||||||
|
|
||||||
|
MavenExecutionRequest setPom( File pom );
|
||||||
|
File getPom();
|
||||||
|
|
||||||
// Errors
|
// Errors
|
||||||
MavenExecutionRequest setShowErrors( boolean showErrors );
|
MavenExecutionRequest setShowErrors( boolean showErrors );
|
||||||
boolean isShowErrors();
|
boolean isShowErrors();
|
||||||
|
|
Loading…
Reference in New Issue