[
https://issues.apache.org/jira/browse/IVY-1522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14721665#comment-14721665
]
ASF GitHub Bot commented on IVY-1522:
-------------------------------------
Github user nlalevee commented on the pull request:
https://github.com/apache/ant-ivy/pull/8#issuecomment-136174610
It seems to break badly Ivy on Windows. I tried to launch the test with a
fresh checkout of your PR, and Ivy could not even resolve dependencies.
Here are the logs:
```
BUILD FAILED
C:\Users\nlalevee\dev\ivy\git\build.xml:184: impossible to resolve
dependencies:
java.io.FileNotFoundException:
\:\Users\nlalevee\.ivy2\cache\[email protected]
(La syntaxe du nom de fichier, de râ–’pertoire ou de volume est incorrecte)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at
org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorUpdater.update(XmlModuleDescriptorUpdater.java:135)
at
org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.toIvyFile(XmlModuleDescriptorParser.java:160)
at
org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor.toIvyFile(DefaultModuleDescriptor.java:552)
at
org.apache.ivy.core.cache.DefaultResolutionCacheManager.saveResolvedModuleDescriptor(DefaultResolutionCacheManager.java:176)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:243)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:195)
at org.apache.ivy.Ivy.resolve(Ivy.java:509)
at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:325)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:272)
at
org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:228)
at
org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:179)
at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:88)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:272)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
```
> Ivy 2.4.0 improperly handles modules with colon (:) in version
> --------------------------------------------------------------
>
> Key: IVY-1522
> URL: https://issues.apache.org/jira/browse/IVY-1522
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.4.0
> Reporter: Daniel Holmes
> Priority: Critical
>
> This was not an issue in 2.2.0.
> I have some modules in my project which produce debian .deb files and those
> modules versions include a colon (:) in the version because the version
> scheme was reset, so an epoch is set.
> I also for this module use the extends tag, and in processing the parent
> location, this code in FileUtil which is called during a FileUtil.normalize()
> is causing the : in the resolve parent file name to have the : replaced with
> a :/.
> The comment on the if seems to explain that it is trying to handle a
> Windows/NetWare case, but the assumption to process any colon in the path is
> too broad.
> private static String[] dissect(String path) {
> char sep = File.separatorChar;
> path = path.replace('/', sep).replace('\\', sep);
> // // make sure we are dealing with an absolute path
> // if (!isAbsolutePath(path)) {
> // throw new BuildException(path + " is not an absolute path");
> // }
> String root = null;
> int colon = path.indexOf(':');
> if (colon > 0) { // && (ON_DOS || ON_NETWARE)) {
> int next = colon + 1;
> root = path.substring(0, next);
> char[] ca = path.toCharArray();
> root += sep;
> // remove the initial separator; the root has it.
> next = (ca[next] == sep) ? next + 1 : next;
> StringBuffer sbPath = new StringBuffer();
> // Eliminate consecutive slashes after the drive spec:
> for (int i = next; i < ca.length; i++) {
> if (ca[i] != sep || ca[i - 1] != sep) {
> sbPath.append(ca[i]);
> }
> }
> path = sbPath.toString();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)