- Added skipWarManifestCheck property which disables the check for a manifest file in warLocation

Fixes issue 109


git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@663 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
rgauss 2013-01-24 16:06:25 +00:00
parent ed0bde637b
commit c7e12d32c6

View File

@ -63,6 +63,13 @@ public class InstallMojo extends AbstractMojo {
* @parameter property="maven.alfresco.backup" default-value="false" * @parameter property="maven.alfresco.backup" default-value="false"
*/ */
private boolean backup; private boolean backup;
/**
* Whether or not to skip the check for a manifest file in the warLocation
*
* @parameter property="maven.alfresco.skipWarManifestCheck" default-value="false"
*/
private boolean skipWarManifestCheck;
public InstallMojo() { public InstallMojo() {
} }
@ -113,7 +120,7 @@ public class InstallMojo extends AbstractMojo {
throw new MojoExecutionException("No webapp found in " + descriptor.getAbsolutePath() + ". AMP installation cannot proceed. Are you binding amp:install to the right phase?"); throw new MojoExecutionException("No webapp found in " + descriptor.getAbsolutePath() + ". AMP installation cannot proceed. Are you binding amp:install to the right phase?");
File manifest = new File(warLocation.getPath() + File.separator + WEBAPP_MANIFEST_PATH); File manifest = new File(warLocation.getPath() + File.separator + WEBAPP_MANIFEST_PATH);
if(warLocation.isDirectory() && !manifest.exists()) if(!skipWarManifestCheck && warLocation.isDirectory() && !manifest.exists())
throw new MojoExecutionException("No MANIFEST.MF found in " + manifest.getAbsolutePath() + ". AMP installation cannot proceed. Are you binding amp:install to the right phase?"); throw new MojoExecutionException("No MANIFEST.MF found in " + manifest.getAbsolutePath() + ". AMP installation cannot proceed. Are you binding amp:install to the right phase?");
} }
} }