ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaikiran Pai <jai.forums2...@gmail.com>
Subject Ivy - Move to symlink creation standard Java API?
Date Wed, 26 Jul 2017 13:25:13 GMT
I was looking into a JIRA related to symlinking in Ivy and realized that 
(for reasons noted in the docs and the implementation) ourimplementation 
of symlinking relies on launching a process from within the JVM to 
invoke a shell command to create the symlinks. "retrieve" task is the 
only one that deals with symlink creation, from what I can see. 
Furthermore, knowing that this operation is expensive, we even had to 
introduce an additional optionfor that task to allow "mass 
symlinking"[1] so that we launch a single process to create N symlinks 
instead of N processes.

In short, the current implementation of symlinking in Ivy is expensive 
for reasons that have been known. Now that we have moved to Java 7, 
which has a standard APIfor symlink creation[2], I think we should just 
change our internal implementation to use this new standard API.Of 
course, we continue to fail to create symlinks on systems that don't 
support it, just like we do now, except that we let the Java API 
implementation handle those details.

Furthermore, once we move to thisstandard API, I don't think we need the 
"symlinkmass" option onthe retrieve task anymore since the whole purpose 
of it was to avoid launching N processes. So I think we can deprecate 
that option in the upcoming release.

Any thoughts?

[1] https://ant.apache.org/ivy/history/latest-milestone/use/retrieve.html

[2] 
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createSymbolicLink(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.attribute.FileAttribute...)

-Jaikiran


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message