File tree 3 files changed +15
-4
lines changed
main/java/org/codehaus/plexus/archiver/util
test/java/org/codehaus/plexus/archiver
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,12 @@ public T includeEmptyDirs(boolean includeEmptyDirectories) {
162
162
return (T ) this ;
163
163
}
164
164
165
+ @ SuppressWarnings ("unchecked" )
166
+ public T usingDefaultExcludes (boolean usingDefaultExcludes ) {
167
+ setUsingDefaultExcludes (usingDefaultExcludes );
168
+ return (T ) this ;
169
+ }
170
+
165
171
public void setStreamTransformer (@ Nonnull InputStreamTransformer streamTransformer ) {
166
172
this .streamTransformer = streamTransformer ;
167
173
}
Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ void testSymlinkArchivedFileSet() throws Exception {
449
449
final File tarFile2 = getTestFile ("target/output/pasymlinks-archivedFileset.tar" );
450
450
final TarArchiver tarArchiver = getPosixTarArchiver ();
451
451
tarArchiver .setDestFile (tarFile2 );
452
- DefaultArchivedFileSet archivedFileSet = DefaultArchivedFileSet . archivedFileSet ( tarFile );
453
- archivedFileSet . setUsingDefaultExcludes (false );
452
+ DefaultArchivedFileSet archivedFileSet =
453
+ DefaultArchivedFileSet . archivedFileSet ( tarFile ). usingDefaultExcludes (false );
454
454
tarArchiver .addArchivedFileSet (archivedFileSet );
455
455
tarArchiver .createArchive ();
456
456
Original file line number Diff line number Diff line change @@ -16,11 +16,16 @@ class DefaultFileSetTest {
16
16
void testCreate () {
17
17
final String [] includes = {"zz" , "yy" };
18
18
final String [] exc = {"xx1" , "xx2" };
19
- final DefaultFileSet dfs =
20
- fileSet (new File ("foo" )).prefixed ("pfx" ).include (includes ).exclude (exc );
19
+ final boolean usingDefaultExcludes = true ;
20
+ final DefaultFileSet dfs = fileSet (new File ("foo" ))
21
+ .prefixed ("pfx" )
22
+ .include (includes )
23
+ .exclude (exc )
24
+ .usingDefaultExcludes (usingDefaultExcludes );
21
25
assertEquals ("foo" , dfs .getDirectory ().getName ());
22
26
assertEquals ("pfx" , dfs .getPrefix ());
23
27
assertEquals ("zz" , dfs .getIncludes ()[0 ]);
24
28
assertEquals ("xx1" , dfs .getExcludes ()[0 ]);
29
+ assertEquals (usingDefaultExcludes , dfs .isUsingDefaultExcludes ());
25
30
}
26
31
}
You can’t perform that action at this time.
0 commit comments