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