[Arakhnę-Dev] [333] * Fixing bug to avoid execution failure on Windows operating systems, due to the now-classical file separator problems. |
[ Thread Index |
Date Index
| More arakhne.org/dev Archives
]
- To: dev@xxxxxxxxxxx
- Subject: [Arakhnę-Dev] [333] * Fixing bug to avoid execution failure on Windows operating systems, due to the now-classical file separator problems.
- From: subversion@xxxxxxxxxxxxx
- Date: Mon, 13 Feb 2012 16:48:13 +0100
Revision: 333
Author: galland
Date: 2012-02-13 16:48:13 +0100 (Mon, 13 Feb 2012)
Log Message:
-----------
* Fixing bug to avoid execution failure on Windows operating systems, due to the now-classical file separator problems.
Modified Paths:
--------------
trunk/license-installer/src/main/java/org/arakhne/maven/plugins/licenseinstaller/InstallLicenseMojo.java
Modified: trunk/license-installer/src/main/java/org/arakhne/maven/plugins/licenseinstaller/InstallLicenseMojo.java
===================================================================
--- trunk/license-installer/src/main/java/org/arakhne/maven/plugins/licenseinstaller/InstallLicenseMojo.java 2012-02-07 17:40:58 UTC (rev 332)
+++ trunk/license-installer/src/main/java/org/arakhne/maven/plugins/licenseinstaller/InstallLicenseMojo.java 2012-02-13 15:48:13 UTC (rev 333)
@@ -269,7 +269,10 @@
StringBuffer sb = new StringBuffer();
sb.append(this.name);
sb.append("_"); //$NON-NLS-1$
- String b = licenseMap.getKey().replace(File.separatorChar, '.').replaceAll("^\\.", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+ String b = licenseMap.getKey();
+ b = b.replaceAll("[/\\:]", "."); //$NON-NLS-1$ //$NON-NLS-2$
+ b = b.replaceAll("^\\.", ""); //$NON-NLS-1$ //$NON-NLS-2$
sb.append(b);
filename = LICENSE_FILENAME_PATTERN.replaceAll("%s", sb.toString()); //$NON-NLS-1$