You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ev...@apache.org on 2007/02/26 16:02:51 UTC

svn commit: r511840 - /maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java

Author: evenisse
Date: Mon Feb 26 07:02:51 2007
New Revision: 511840

URL: http://svn.apache.org/viewvc?view=rev&rev=511840
Log:
Little fix for windows.

Modified:
    maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java

Modified: maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java?view=diff&rev=511840&r1=511839&r2=511840
==============================================================================
--- maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java (original)
+++ maven/archiva/trunk/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/RepositoryScanner.java Mon Feb 26 07:02:51 2007
@@ -26,6 +26,7 @@
 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 @@
 
             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 @@
             {
                 Consumer consumer = (Consumer) itConsumers.next();
 
-                if ( wantsFile( consumer, basefile.getRelativePath() ) )
+                if ( wantsFile( consumer, StringUtils.replace( basefile.getRelativePath(), "\\", "/" ) ) )
                 {
                     try
                     {
@@ -127,16 +128,14 @@
                         /* 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 @@
         // Not included, and Not excluded?  Default to EXCLUDE.
         return false;
     }
-    
+
     public long getOnlyModifiedAfterTimestamp()
     {
         return onlyModifiedAfterTimestamp;