Index: src/main/java/org/apache/maven/plugins/stage/DefaultRepositoryCopier.java =================================================================== --- src/main/java/org/apache/maven/plugins/stage/DefaultRepositoryCopier.java (revision 679829) +++ src/main/java/org/apache/maven/plugins/stage/DefaultRepositoryCopier.java (working copy) @@ -315,7 +315,7 @@ { InputStream is = new FileInputStream( f ); - String s = f.getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); + String s = f.getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 ); s = StringUtils.replace( s, "\\", "/" ); // We are marking any version directories with the in-process flag so that @@ -475,7 +475,29 @@ for ( Iterator iterator = files.iterator(); iterator.hasNext(); ) { String file = (String) iterator.next(); + logger.info( "Found file in the source repository: " + file ); + + //Archiva use "../" as parent directory href, and we dont want to parse again + // which causes infinite loop + //Remove this block when build with wagon-beta-3 since it eliminates parent directory from getFileList() + if ( "../".equals(file) ) + { + continue; + } + + //Work around for MRM-893 which causes the file to be fetched and crashes html parser + // in wagon http. Remove this block when MRM-893 is fixed + + //however it is more efficient to leave it here since + // will prevent unnecessary netword call for each file + if ( file.charAt( file.length() -1 ) != '/' ) + { + collected.add( basePath + file ); + continue; + } + + scan( wagon, basePath + file, collected ); } } Index: pom.xml =================================================================== --- pom.xml (revision 679829) +++ pom.xml (working copy) @@ -29,7 +29,9 @@ maven-stage-plugin maven-plugin Maven Stage Plugin + 1.0-SNAPSHOT + The Maven Stage Plugin copies artifacts from one repository to another. @@ -142,7 +144,7 @@ - 1.0-beta-2 + 1.0-beta-3 2.0.5