if(!pom.exists() && parentLoc.exists())
pom = parentLoc;
}
if(!pom.exists())
throw new AbortException(Messages.MavenModuleSetBuild_NoSuchPOMFile(pom));
if (rootPOM.startsWith("../") || rootPOM.startsWith("..\\")) {
File wsp = new File(workspaceProper);
if (!ws.equals(wsp)) {
rootPOMRelPrefix = ws.getCanonicalPath().substring(wsp.getCanonicalPath().length()+1)+"/";
} else {
rootPOMRelPrefix = wsp.getName() + "/";
}
} else {
rootPOMRelPrefix = "";
}
if(verbose)
logger.println("Parsing "
+ (nonRecursive ? "non-recursively " : "recursively ")
+ pom);
File settingsLoc;
if (alternateSettings == null) {
settingsLoc = null;
} else if (IOUtils.isAbsolute(alternateSettings)) {
settingsLoc = new File(alternateSettings);
} else {
// Check for settings.xml first in the workspace proper, and then in the current directory,
// which is getModuleRoot().
// This is backwards from the order the root POM logic uses, but it's to be consistent with the Maven execution logic.
settingsLoc = new File(workspaceProper, alternateSettings);
File mrSettingsLoc = new File(workspaceProper, alternateSettings);
if (!settingsLoc.exists() && mrSettingsLoc.exists())
settingsLoc = mrSettingsLoc;
}
if (debug)
{
logger.println(Messages.MavenModuleSetBuild_SettinsgXmlAndPrivateRepository(settingsLoc,privateRepository));
}
if ((settingsLoc != null) && (!settingsLoc.exists())) {
throw new AbortException(Messages.MavenModuleSetBuild_NoSuchAlternateSettings(settingsLoc.getAbsolutePath()));
}
try {
MavenEmbedderRequest mavenEmbedderRequest = new MavenEmbedderRequest( listener, mavenHome.getHomeDir(),
profiles, properties,