issue #267 - added logging to install amp goal

This commit is contained in:
mindthegab 2015-05-20 12:01:07 -04:00
parent 603fe956c6
commit f946d711ea
2 changed files with 8 additions and 2 deletions

View File

@ -98,19 +98,25 @@ public class InstallMojo extends AbstractMojo {
if(ampLocation.isDirectory())
{
try {
mmt.installModules(ampLocation.getAbsolutePath(),
getLog().info("Installing all AMPs from directory " + ampLocation.getAbsolutePath() + " into WAR/exploded webapp at " + warLocation.getAbsolutePath());
mmt.installModules(ampLocation.getAbsolutePath(),
warLocation.getAbsolutePath(), false, // preview
force, // force install
backup); // backup
getLog().info("AMPs installed successfully");
} catch (IOException e) {
throw new MojoExecutionException("ampLocation " + ampLocation.getAbsolutePath() + " did not contain AMP files - AMP installation cannot proceed");
} // backup
} else if(ampLocation.isFile())
{
getLog().info("Installing AMP " + ampLocation.getAbsolutePath() + " into WAR/exploded webapp at " + warLocation.getAbsolutePath());
mmt.installModule(ampLocation.getAbsolutePath(),
warLocation.getAbsolutePath(), false, // preview
force, // force install
backup); // backup
getLog().info("AMP installed successfully");
} else
{
throw new MojoFailureException("ampLocation " + ampLocation.getAbsolutePath() + " was neither an AMP file or a folder containing AMP files - AMP installation cannot proceed");

View File

@ -51,7 +51,7 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
getLogger().info("Installing " + getSourceFile() + " into " + destLocation);
try {
mmt.installModule(
mmt.installModule(
getSourceFile().getAbsolutePath(),
destLocation.getAbsolutePath(),
false, //preview