|
3 | 3 | import org.codehaus.plexus.PlexusTestCase; |
4 | 4 | import org.codehaus.plexus.archiver.Archiver; |
5 | 5 | import org.codehaus.plexus.archiver.util.DefaultArchivedFileSet; |
6 | | -import org.codehaus.plexus.components.io.attributes.Java7AttributeUtils; |
7 | 6 | import org.codehaus.plexus.components.io.functions.InputStreamTransformer; |
8 | 7 | import org.codehaus.plexus.components.io.resources.PlexusIoResource; |
9 | 8 |
|
|
12 | 11 | import java.io.IOException; |
13 | 12 | import java.io.InputStream; |
14 | 13 | 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; |
15 | 17 |
|
16 | 18 | public class DirectoryArchiverUnpackJarTest |
17 | 19 | extends PlexusTestCase |
@@ -52,12 +54,13 @@ public void test_dependency_sets_depSet_unpacked_rdonly() |
52 | 54 | archiver.createArchive(); |
53 | 55 | assertTrue( new File( "target/depset_unpack/child-1/META-INF/MANIFEST.MF" ).exists() ); |
54 | 56 |
|
| 57 | + final Logger logger = new ConsoleLogger( Logger.LEVEL_DEBUG, this.getClass().getName() ); |
55 | 58 |
|
56 | 59 | // 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 ); |
62 | 65 | } |
63 | 66 | } |
0 commit comments