Skip to content

Commit

Permalink
Changed dependency on commons-io from compile to test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard Labno committed Jun 14, 2012
1 parent 5712bc5 commit a393a27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions impl/pom.xml
Expand Up @@ -49,6 +49,7 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Expand Up @@ -17,7 +17,6 @@
*/
package org.jboss.arquillian.extension.jrebel;

import org.apache.commons.io.filefilter.FileFilterUtils;
import org.jboss.arquillian.extension.jrebel.shrinkwrap.ArchiveHelper;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.asset.Asset;
Expand All @@ -34,6 +33,16 @@
import java.util.Map;

public final class RebelXmlHelper {
// ------------------------------ FIELDS ------------------------------

private static final FileFilter DIRECTORY_FILTER = new FileFilter() {
@Override
public boolean accept(File pathname)
{
return pathname.isDirectory();
}
};

// -------------------------- STATIC METHODS --------------------------

public static String createRebelXML(Archive<?> archive, String path)
Expand Down Expand Up @@ -105,13 +114,13 @@ public static Map<String, List<String>> rootize(Collection<FileAsset> assets)
final File mainSources = new File("src/main");
final List<String> rootPaths = new ArrayList<String>();
if (mainSources.exists()) {
for (File file : mainSources.listFiles((FileFilter) FileFilterUtils.directoryFileFilter())) {
for (File file : mainSources.listFiles(DIRECTORY_FILTER)) {
rootPaths.add(file.getAbsolutePath());
}
}
final File testSources = new File("src/test");
if (testSources.exists()) {
for (File file : testSources.listFiles((FileFilter) FileFilterUtils.directoryFileFilter())) {
for (File file : testSources.listFiles(DIRECTORY_FILTER)) {
rootPaths.add(file.getAbsolutePath());
}
}
Expand Down

0 comments on commit a393a27

Please sign in to comment.