Commit
…isted in Workbench Artifact Repository
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,10 @@ | |
import java.io.StringWriter; | ||
import java.net.MalformedURLException; | ||
import java.nio.charset.Charset; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.Enumeration; | ||
import java.util.List; | ||
import java.util.Properties; | ||
import java.util.zip.ZipEntry; | ||
import java.util.zip.ZipException; | ||
|
@@ -459,12 +461,16 @@ public Collection<File> listFiles() { | |
* @return an collection of java.io.File with the matching files | ||
*/ | ||
public Collection<File> listFiles( final String filters ) { | ||
String wildcard = "*.jar"; | ||
if ( filters != null ) { | ||
wildcard = "*" + filters + "*.jar"; | ||
final List<String> wildcards = new ArrayList<String>(); | ||
if ( filters == null ) { | ||
wildcards.add( "*.jar" ); | ||
wildcards.add( "*.kjar" ); | ||
} else { | ||
wildcards.add( "*" + filters + "*.jar" ); | ||
wildcards.add( "*" + filters + "*.kjar" ); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
manstis
Author
Member
|
||
} | ||
Collection<File> files = FileUtils.listFiles( new File( M2_REPO_DIR ), | ||
new WildcardFileFilter( wildcard, | ||
new WildcardFileFilter( wildcards, | ||
IOCase.INSENSITIVE ), | ||
DirectoryFileFilter.DIRECTORY ); | ||
|
||
|
I am probably missing context here, but I am wondering if we should support file extension "kjar"? Even though the kjars have some additional metadata, they are still ordinary jar files. Using "kjar" extension will confuse other tools for sure.