[izpack-changes] r1645 - in izpack-src/branches/branch-3.9: . src/lib/com/izforge/izpack/ant

noreply at berlios.de noreply at berlios.de
Tue Nov 21 11:01:44 CET 2006


Author: jponge
Date: 2006-11-21 11:01:42 +0100 (Tue, 21 Nov 2006)
New Revision: 1645

Modified:
   izpack-src/branches/branch-3.9/Versions.txt
   izpack-src/branches/branch-3.9/src/lib/com/izforge/izpack/ant/IzPackTask.java
Log:
Fix for calling the IzPack Ant task from Maven builds (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)

Modified: izpack-src/branches/branch-3.9/Versions.txt
===================================================================
--- izpack-src/branches/branch-3.9/Versions.txt	2006-11-21 09:59:45 UTC (rev 1644)
+++ izpack-src/branches/branch-3.9/Versions.txt	2006-11-21 10:01:42 UTC (rev 1645)
@@ -4,9 +4,9 @@
 
 - Fixed the DesktopShortcutCheckboxEnabled Builtin Variable in docu (Fabrice Mirabile)
 - Fixed build.xml (PathSelectionPanel without using TargetPanel) (Fabrice Mirabile)
-- UserInputPanel multiline label fix (Vladimir Ralev, JBoss/RedHat)
+- UserInputPanel multiline label fix (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)
+- Fix for calling the IzPack Ant task from Maven builds (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)
 
-
   > 3.9.0 (build 2006.09.25)
 - Fix NullPointerException in CompilerConfig, if you specify a 
 	compiler listener and the compiler listener class can't be found (Dennis Reil)

Modified: izpack-src/branches/branch-3.9/src/lib/com/izforge/izpack/ant/IzPackTask.java
===================================================================
--- izpack-src/branches/branch-3.9/src/lib/com/izforge/izpack/ant/IzPackTask.java	2006-11-21 09:59:45 UTC (rev 1644)
+++ izpack-src/branches/branch-3.9/src/lib/com/izforge/izpack/ant/IzPackTask.java	2006-11-21 10:01:42 UTC (rev 1645)
@@ -213,6 +213,7 @@
             {
                 String name = (String) e.nextElement();
                 String value = properties.getProperty(name);
+                value = fixPathString(value);
                 c.addProperty(name, value);
             }
         }
@@ -225,6 +226,7 @@
             {
                 String name = (String) e.nextElement();
                 String value = (String) projectProps.get(name);
+                value = fixPathString(value);
                 c.addProperty(name, value);
             }            
         }
@@ -239,7 +241,21 @@
             // failed
         }
     }
-
+    
+    private static String fixPathString(String path)
+    {
+       /*
+        * The following code fixes a bug in in codehaus classworlds loader,
+        * which can't handle mixed path strings like "c:\test\../lib/mylib.jar".
+        * The bug is in org.codehaus.classworlds.UrlUtils.normalizeUrlPath().
+        */
+       StringBuffer fixpath = new StringBuffer(path);
+       for(int q=0; q<fixpath.length(); q++)
+          if(fixpath.charAt(q) == '\\')
+             fixpath.setCharAt(q, '/');
+       return fixpath.toString();
+    }
+    
     /**
      * Setter for property input.
      * 




More information about the izpack-changes mailing list