From c7e12d32c6eea3acf31e18e106beaba2d4bb5b41 Mon Sep 17 00:00:00 2001 From: rgauss Date: Thu, 24 Jan 2013 16:06:25 +0000 Subject: [PATCH] - 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 --- .../main/java/org/alfresco/maven/plugin/InstallMojo.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/InstallMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/InstallMojo.java index 7d85d9b9..643e7bba 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/InstallMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/InstallMojo.java @@ -63,6 +63,13 @@ public class InstallMojo extends AbstractMojo { * @parameter property="maven.alfresco.backup" default-value="false" */ 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() { } @@ -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?"); 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?"); } } \ No newline at end of file