Skip to content

Commit

Permalink
improved logging for deploy and undeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mosabua committed Jul 7, 2011
1 parent de5d3b6 commit 8fa9454
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,16 @@ protected void deployApk(final File apkFile) throws MojoExecutionException, Mojo
public void doWithDevice(final IDevice device) throws MojoExecutionException {
try {
device.installPackage(apkFile.getAbsolutePath(), undeployBeforeDeploy);
getLog().info("Successfully installed to " + device.getSerialNumber() + " (avdName="
getLog().info("Successfully installed "
+ apkFile.getAbsolutePath() + " to "
+ device.getSerialNumber() + " (avdName="
+ device.getAvdName() + ")");
} catch (InstallException e) {
throw new MojoExecutionException("Install failed.", e);
throw new MojoExecutionException("Install of "
+ apkFile.getAbsolutePath() + "failed.", e);
}
}
});

}

/**
Expand Down Expand Up @@ -644,12 +646,14 @@ protected boolean undeployApk(final String packageName)
public void doWithDevice(final IDevice device) throws MojoExecutionException {
try {
device.uninstallPackage(packageName);
getLog().info("Successfully uninstalled from " + device.getSerialNumber() + " (avdName="
getLog().info("Successfully uninstalled " + packageName +
" from " + device.getSerialNumber() + " (avdName="
+ device.getAvdName() + ")");
result.set(true);
} catch (InstallException e) {
result.set(false);
throw new MojoExecutionException("Uninstall failed.", e);
throw new MojoExecutionException("Uninstall of " +
packageName + "failed.", e);
}
}
});
Expand Down

0 comments on commit 8fa9454

Please sign in to comment.