When installing an AMP which - erroneously - overwrites some files which are already present in the original alfresco/share WAR, the MMT.install() fails with the following error (full stacktrace attached):
An IO error was encountered during deployment of the AMP into the WAR: C:\projekt\testAllInOne\alfresco\target\alfresco\WEB-INF\classes\alfresco\module\backup\ae0c7a40-6c46-11e2-bcd4-1fd7cb50abce.bin
A simple way to reproduce it is:
1. mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml (choose archetype org.alfresco.maven.archetype:alfresco-amp-archetype)
2. cd <the name of created project>
3. touch src/main/amp/web/jsp/error.jsp
4. mvn clean package -Pamp-to-war
If you skip step 3, the process will work and create an Alfresco WAR exploded folder including the AMP overlay.
The MMT failure should report which files are conflicting with the overlaid WAR, instead of complaining for a missing file related with backup.
As documented by the source code (http://maven-alfresco-archetypes.googlecode.com/svn/trunk/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/InstallMojo.java) the install method is invoked using the following parameters:
force = true
backup = false