-- tested AMP unpacking in windows 
-- for retest in *nix platforms

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@129 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
mindthegab
2009-02-19 13:45:17 +00:00
parent e3e4f46b71
commit c1f2ae12de
3 changed files with 10 additions and 21 deletions

View File

@@ -19,7 +19,7 @@
</description>
<url>${site.url}</url>
<prerequisites>
<maven>2.0.9</maven>
<maven>2.0.8</maven>
</prerequisites>
<issueManagement>
<system>GForge</system>
@@ -71,20 +71,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>announcement-generate</goal>
</goals>
<id>announcement-generate</id>
</execution>
<execution>
<goals>
<goal>announcement-mail</goal>
</goals>
<id>announcement-mail</id>
</execution>
</executions>
<!-- Automatically notifies the list when release is done. Please supply username and password in the command line -->
<configuration>
<smtpHost>mail.sourcesense.com</smtpHost>

View File

@@ -7,8 +7,6 @@ import org.alfresco.maven.plugin.amp.Overlay;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.jar.ManifestException;
import sun.util.logging.resources.logging;
import java.io.File;
import java.io.IOException;

View File

@@ -35,6 +35,7 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
private static String fileSeparator = System.getProperty("file.separator");
public void setArchiveFilters( List filters )
{
filterSupport = new FilterSupport( filters, getLogger() );
@@ -126,7 +127,7 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
private String getAmpMapping(String name) {
if(name.startsWith("web"+ fileSeparator) && !name.startsWith("web"+ fileSeparator +"licenses"))
if(name.startsWith("web/") && !name.startsWith("web/licenses"))
{
return name.substring(4);
}
@@ -136,7 +137,7 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
{
String relativePath = "";
if((name.startsWith("config"+fileSeparator)))
if((name.startsWith("config/")))
{
relativePath = name.substring(7);
}
@@ -186,7 +187,11 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
Date entryDate, boolean isDirectory )
throws IOException
{
File f = FileUtils.resolveFile( dir, entryName );
File f = null;
if (entryName != null && !"".equals(entryName))
f = FileUtils.resolveFile( dir, entryName );
else
return;
try
{