Author: baerrach
Date: Mon Dec 15 20:23:40 2008
New Revision: 726947

URL: http://svn.apache.org/viewvc?rev=726947&view=rev
Log:
Moved fixWindowsDriveURI to IdeUtils.

Modified:
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java?rev=726947&r1=726946&r2=726947&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
 Mon Dec 15 20:23:40 2008
@@ -521,6 +521,21 @@
     {
         return StringUtils.replace( filename, '\\', '/' );
     }
+    
+    /**
+     * NOTE: This is to account for the unfortunate fact that "file:" URIs 
differ between Windows and Unix. On a Windows
+     * box, the path "C:\dir" is mapped to "file:/C:/dir". On a Unix box, the 
path "/home/dir" is mapped to
+     * "file:/home/dir". So, in the first case the slash after "file:" is not 
part of the corresponding filesystem path
+     * while in the later case it is. This discrepancy makes verifying the 
javadoc attachments in ".classpath" a little
+     * tricky.
+     * 
+     * @param input string input that may contain a windows URI
+     * @return all windows URI convert "file:C:/dir" to "file:/C:/dir"
+     */
+    public static String fixWindowsDriveURI( String input )
+    {
+        return input.replaceAll( "file:([a-zA-Z]):", "file:/$1:" );
+    }    
 
     /**
      * Returns a compiler plugin settings from a list of plugins .

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java?rev=726947&r1=726946&r2=726947&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java
 Mon Dec 15 20:23:40 2008
@@ -622,7 +622,7 @@
             throw new MojoExecutionException( "Unable to read file", ex );
         }
         result = replaceVariables( result, variables );
-        result = fixWindowsDriveURI( result );
+        result = IdeUtils.fixWindowsDriveURI( result );
 
         /*
          * NOTE: This is another hack to compensate for some metadata files 
that contain a complete XML file as the
@@ -661,21 +661,6 @@
     }
 
     /**
-     * NOTE: This is to account for the unfortunate fact that "file:" URIs 
differ between Windows and Unix. On a Windows
-     * box, the path "C:\dir" is mapped to "file:/C:/dir". On a Unix box, the 
path "/home/dir" is mapped to
-     * "file:/home/dir". So, in the first case the slash after "file:" is not 
part of the corresponding filesystem path
-     * while in the later case it is. This discrepancy makes verifying the 
javadoc attachments in ".classpath" a little
-     * tricky.
-     * 
-     * @param input string input that may contain a windows URI
-     * @return all windows URI convert "file:C:/dir" to "file:/C:/dir"
-     */
-    private String fixWindowsDriveURI( String input )
-    {
-        return input.replaceAll( "file:([a-zA-Z]):", "file:/$1:" );
-    }
-
-    /**
      * @param str input string
      * @param variables map of variables (keys) and replacement value (values)
      * @return the string with all variable values replaced.


Reply via email to