Commit acf19909 authored by mindthegab's avatar mindthegab
Browse files
-- tested AMP unpacking in windows 
-- for retest in *nix platforms

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk/plugins/maven-amp-plugin@129 04253f4f-3451-0410-a141-5562f1e59037
parent 161b0f7a
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -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>
+0 −2
Original line number Diff line number Diff line
@@ -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;

+9 −4
Original line number Diff line number Diff line
@@ -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
		{