Skip to content

Commit 00e12b8

Browse files
Updated to correct test cases failing on windows.
This closes #34
1 parent a080e0a commit 00e12b8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/test/java/org/codehaus/plexus/archiver/jar/DirectoryArchiverUnpackJarTest.java

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.codehaus.plexus.PlexusTestCase;
44
import org.codehaus.plexus.archiver.Archiver;
55
import org.codehaus.plexus.archiver.util.DefaultArchivedFileSet;
6-
import org.codehaus.plexus.components.io.attributes.Java7AttributeUtils;
76
import org.codehaus.plexus.components.io.functions.InputStreamTransformer;
87
import org.codehaus.plexus.components.io.resources.PlexusIoResource;
98

@@ -12,6 +11,9 @@
1211
import java.io.IOException;
1312
import java.io.InputStream;
1413
import java.nio.charset.Charset;
14+
import org.codehaus.plexus.archiver.util.ArchiveEntryUtils;
15+
import org.codehaus.plexus.logging.Logger;
16+
import org.codehaus.plexus.logging.console.ConsoleLogger;
1517

1618
public class DirectoryArchiverUnpackJarTest
1719
extends PlexusTestCase
@@ -52,12 +54,13 @@ public void test_dependency_sets_depSet_unpacked_rdonly()
5254
archiver.createArchive();
5355
assertTrue( new File( "target/depset_unpack/child-1/META-INF/MANIFEST.MF" ).exists() );
5456

57+
final Logger logger = new ConsoleLogger( Logger.LEVEL_DEBUG, this.getClass().getName() );
5558

5659
// make them writeable or mvn clean will fail
57-
Java7AttributeUtils.chmod( new File("target/depset_unpack/child-1/META-INF"), 0777);
58-
Java7AttributeUtils.chmod( new File("target/depset_unpack/child-1/META-INF/maven"), 0777);
59-
Java7AttributeUtils.chmod( new File("target/depset_unpack/child-1/META-INF/maven/test"), 0777);
60-
Java7AttributeUtils.chmod( new File("target/depset_unpack/child-1/META-INF/maven/test/child1"), 0777);
61-
Java7AttributeUtils.chmod( new File("target/depset_unpack/child-1/assembly-resources"), 0777);
60+
ArchiveEntryUtils.chmod( new File( "target/depset_unpack/child-1/META-INF" ), 0777, logger );
61+
ArchiveEntryUtils.chmod( new File( "target/depset_unpack/child-1/META-INF/maven" ), 0777, logger );
62+
ArchiveEntryUtils.chmod( new File( "target/depset_unpack/child-1/META-INF/maven/test" ), 0777, logger );
63+
ArchiveEntryUtils.chmod( new File( "target/depset_unpack/child-1/META-INF/maven/test/child1" ), 0777, logger );
64+
ArchiveEntryUtils.chmod( new File( "target/depset_unpack/child-1/assembly-resources" ), 0777, logger );
6265
}
6366
}

0 commit comments

Comments
 (0)