[ 
https://issues.apache.org/jira/browse/MNG-7188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381591#comment-17381591
 ] 

Davor Krtic commented on MNG-7188:
----------------------------------

How does your link look like from Windows CMD or PS ?

>From some SO thread: Default Cygwin symlinks are just regular files
When I create a symlink after i do
{code:java}
export CYGWIN="winsymlinks:nativestrict"
{code}
then it works, but I have to start Cygwin as Administrator to be able to create 
symlinks.

How the links look from CMD :
{code:java}
15.07.2021  22:52    <JUNCTION>     link_default [...]
15.07.2021  22:52    <SYMLINKD>     link_strict [3.8.1]
{code}
And from PS:
{code:java}
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----l        15.07.2021     22:52                link_strict
-a---l        15.07.2021     22:52              0 link_default
{code}

> Maven fails to start in Cygwin when installed with SDKMAN
> ---------------------------------------------------------
>
>                 Key: MNG-7188
>                 URL: https://issues.apache.org/jira/browse/MNG-7188
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.8.1
>         Environment: Windows 10, Cygwin, SDKMAN
>            Reporter: Davor Krtic
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
>  Exception:
> {noformat}
> java.io.FileNotFoundException: 
> C:\cygwin64\home\davor.krtic\.sdkman\candidates\maven\current\bin\m2.conf 
> ...{noformat}
> {{current}} folder is a symlink which Windows doesn't recognize. (SDKMAN uses 
> symlinks to manage different versions)
> Changing the following line in the {{mvn}} script from:
> {code:java}
> MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
> {code}
> to:
> {code:java}
> MAVEN_HOME=`cd "$MAVEN_HOME" && pwd -P`
> {code}
> fixes the problem as it avoids symlinks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to