From ed0bde637b2a5d11a15e674fe7eaa08b876b3203 Mon Sep 17 00:00:00 2001 From: rgauss Date: Thu, 24 Jan 2013 02:04:03 +0000 Subject: [PATCH] Changed check for descriptor and manifest on WAR files only, not exploded dirs. Fixes issue 107 git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@662 04253f4f-3451-0410-a141-5562f1e59037 --- .../src/main/java/org/alfresco/maven/plugin/InstallMojo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 613c5885..7d85d9b9 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 @@ -109,11 +109,11 @@ public class InstallMojo extends AbstractMojo { } File descriptor = new File(warLocation.getPath() + File.separator + WEBAPP_DESCRIPTOR_PATH); - if(!descriptor.exists()) + if(warLocation.isDirectory() && !descriptor.exists()) 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(!manifest.exists()) + if(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