diff --git a/plugins/maven-amp-plugin/pom.xml b/plugins/maven-amp-plugin/pom.xml index b752b8f5..80d778c4 100644 --- a/plugins/maven-amp-plugin/pom.xml +++ b/plugins/maven-amp-plugin/pom.xml @@ -1,18 +1,14 @@ - + 4.0.0 org.alfresco.maven.plugin maven-amp-plugin maven-plugin Alfresco AMP Plugin - 3.0.3-SNAPSHOT - - 3.0.3 - + 3.0.3 org.alfresco maven-alfresco-lifecycle - 1.1.1-SNAPSHOT + 3.9.0 ../../pom.xml @@ -39,14 +35,14 @@ columbro Gabriele Columbro gabriele.columbro@alfresco.com - + Alfresco http://www.alfresco.com rdanner Russ Danner - + Rivet Logic diff --git a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java index dd28df36..377a9f32 100644 --- a/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java +++ b/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/AmpProjectPackagingTask.java @@ -11,9 +11,7 @@ import org.codehaus.plexus.util.DirectoryScanner; import org.codehaus.plexus.util.StringUtils; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStream; /** * Handles the project own resources, that is: @@ -31,15 +29,10 @@ public class AmpProjectPackagingTask extends AbstractAmpPackagingTask { private static final String MODULE_PROPERTIES = "module.properties"; - private static final String FILE_MAPPINGS = "file-mappings.properties"; private static final String WEB_PATH = "web/"; private static final String CONFIG_PATH = "config/"; - - private static final String FILE_MAPPINGS_CONTENT = "# Add mapping for /WEB-INF/, since MMT doesn't support it by default\n" + - "/web/WEB-INF=/WEB-INF\n"; - private Resource[] webResources = new Resource[0]; @@ -78,8 +71,6 @@ public class AmpProjectPackagingTask handeWebAppSourceDirectory( context ); - synthesiseFileMappings(context); - // Notice: this will work only in case we are copying only this AMP or this AMP is // set as last overlay of the maven-amp-plugin @@ -153,46 +144,6 @@ public class AmpProjectPackagingTask } } } - - - /** - * Synthesizes (creates) a standard file-mappings.properties file so that resources in webapp/WEB-INF - * get written to the correct location by the MMT. - * - * @param context The packaging context - * @throws MojoExecutionException if the file could not be created - */ - protected void synthesiseFileMappings(final AmpPackagingContext context) - throws MojoExecutionException - { - try - { - File fileMappings = new File(context.getAmpDirectory(), FILE_MAPPINGS); - OutputStream out = null; - - fileMappings.createNewFile(); // Note: ignore if the file already exists - we simply overwrite its existing contents - - try - { - out = new FileOutputStream(fileMappings, false); - - out.write(FILE_MAPPINGS_CONTENT.getBytes()); - } - finally - { - if (out != null) - { - out.flush(); - out.close(); - } - } - } - catch (final IOException ioe) - { - throw new MojoExecutionException("Could not create file-mappings.properties in [" + context.getAmpDirectory().getAbsolutePath() + "]", ioe); - } - } - /** * Handles the webapp sources.