You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2016/04/09 17:07:10 UTC

Re: [2/2] ant git commit: symlink and executable file selectors

On 2016-04-09, <bo...@apache.org> wrote:

> symlink and executable file selectors

Two questions:

(1) does anybody know how to write tests for either on Windows? I've
currently only enabled antunit tests on Unix (at least that's what I
wanted to do).

(2) do we want to port it as optional task depending on Java7 for 1.9.8?
This would only benefit people who can use Java7 but not Java8.

Stefan

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


Re: [2/2] ant git commit: symlink and executable file selectors

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-04-12, Antoine Levy Lambert wrote:

> there is a command mklink on Windows [1] which is described as being
> able to create symbolic links.

Which is not available on Win7 - and even if it was, I'm not sure Java
would detect the things as symlinks. I'll give it a try and we'll see
what our jenkins slaves think about it.

> Concerning executable files, it seems that the executable nature of a
> file depends upon its extension, see [3].

That's what I would have expected myself as well, but the Jenkins build
failed for testAsFalseConditions in executable-test which indicates all
files looked executable to Java. Not sure what to do with this.

Stefan

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


Re: [2/2] ant git commit: symlink and executable file selectors

Posted by Antoine Levy Lambert <an...@gmx.de>.
Hello Stefan,

there is a command mklink on Windows [1] which is described as being able to create symbolic links.
There is also an API function CreateSymbolicLink [2].

Concerning executable files, it seems that the executable nature of a file depends upon its extension, see [3].
So maybe if we create a file xyz.bat the file should be found executable.
What I do not understand is that I have practical remembrances of changing the executable flag of a file under cygwin and this “chmod” command allowing dll s to actually work on Windows after they were untarred or copied with cygwin utilities.

I hope this helps. 

Using a library called jna (java native access) [4] we could call system level methods from java and make them available within ant tasks for testing or production purposes.

Regards,

Antoine

[1] https://technet.microsoft.com/en-us/library/cc753194.aspx
[2] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363878%28v=vs.85%29.aspx
[3] https://msdn.microsoft.com/en-us/library/windows/desktop/ms722429%28v=vs.85%29.aspx
[4] https://github.com/java-native-access/jna


On Apr 9, 2016, at 11:07 AM, Stefan Bodewig <bo...@apache.org> wrote:

> On 2016-04-09, <bo...@apache.org> wrote:
> 
>> symlink and executable file selectors
> 
> Two questions:
> 
> (1) does anybody know how to write tests for either on Windows? I've
> currently only enabled antunit tests on Unix (at least that's what I
> wanted to do).
> 
> (2) do we want to port it as optional task depending on Java7 for 1.9.8?
> This would only benefit people who can use Java7 but not Java8.
> 
> Stefan
> 
> 


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