You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/06/11 04:59:24 UTC
svn commit: r666507 -
/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java
Author: lu4242
Date: Tue Jun 10 19:59:23 2008
New Revision: 666507
URL: http://svn.apache.org/viewvc?rev=666507&view=rev
Log:
fix problem UnpackMojo.java does not work on linux
Modified:
myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java
Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java?rev=666507&r1=666506&r2=666507&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/unpack/UnpackMojo.java Tue Jun 10 19:59:23 2008
@@ -331,12 +331,12 @@
if (dir1 != null)
{
- addExcludes(dir1.getPath()+"\\", dir1, exclusions);
+ addExcludes(dir1.getPath(), dir1, exclusions);
}
if (dir2 != null)
{
- addExcludes(dir2.getPath()+"\\", dir2, exclusions);
+ addExcludes(dir2.getPath(), dir2, exclusions);
}
StringBuilder existingFiles = new StringBuilder();
@@ -369,6 +369,14 @@
{
String path = f.getPath();
path = path.replace(basePath,"");
+ while (path.startsWith("/"))
+ {
+ path = path.substring(1);
+ }
+ while (path.startsWith("\\"))
+ {
+ path = path.substring(1);
+ }
path = StringUtils.replace( path, "\\", "/" );
exclusions.add(path);
getLog().info("Adding: "+path);