diff options
author | Emmanuel Venisse <evenisse@apache.org> | 2007-02-26 15:02:51 +0000 |
---|---|---|
committer | Emmanuel Venisse <evenisse@apache.org> | 2007-02-26 15:02:51 +0000 |
commit | 731f368e629bfdae9a62d16afe0dbf4ff4e0c5ac (patch) | |
tree | 4e9d9abe77deba2d8e08c748b2ecf4f71d9c95dc | |
parent | 43bb7a6d9ad75f7294b43b7ddf494d7c918951d7 (diff) | |
download | archiva-731f368e629bfdae9a62d16afe0dbf4ff4e0c5ac.tar.gz archiva-731f368e629bfdae9a62d16afe0dbf4ff4e0c5ac.zip |
Little fix for windows.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@511840 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java index 9aacbc392..8eef2b766 100644 --- a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java +++ b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java @@ -26,6 +26,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.DirectoryWalkListener; import org.codehaus.plexus.util.SelectorUtils; +import org.codehaus.plexus.util.StringUtils; import java.io.File; import java.util.Iterator; @@ -67,8 +68,8 @@ public class RepositoryScanner if ( !consumer.init( this.repository ) ) { - throw new IllegalStateException( "Consumer [" + consumer.getName() - + "] is reporting that it is incompatible with the [" + repository.getId() + "] repository." ); + throw new IllegalStateException( "Consumer [" + consumer.getName() + + "] is reporting that it is incompatible with the [" + repository.getId() + "] repository." ); } } @@ -114,7 +115,7 @@ public class RepositoryScanner { Consumer consumer = (Consumer) itConsumers.next(); - if ( wantsFile( consumer, basefile.getRelativePath() ) ) + if ( wantsFile( consumer, StringUtils.replace( basefile.getRelativePath(), "\\", "/" ) ) ) { try { @@ -127,16 +128,14 @@ public class RepositoryScanner /* Intentionally Catch all exceptions. * So that the discoverer processing can continue. */ - getLogger().error( - "Consumer [" + consumer.getName() + "] had an error when processing file [" - + basefile.getAbsolutePath() + "]: " + e.getMessage(), e ); + getLogger().error( "Consumer [" + consumer.getName() + "] had an error when processing file [" + + basefile.getAbsolutePath() + "]: " + e.getMessage(), e ); } } else { getLogger().debug( - "Skipping consumer " + consumer.getName() + " for file " - + basefile.getRelativePath() ); + "Skipping consumer " + consumer.getName() + " for file " + basefile.getRelativePath() ); } } } @@ -179,7 +178,7 @@ public class RepositoryScanner // Not included, and Not excluded? Default to EXCLUDE. return false; } - + public long getOnlyModifiedAfterTimestamp() { return onlyModifiedAfterTimestamp; |