[
https://issues.apache.org/jira/browse/MINVOKER-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843516#comment-17843516
]
ASF GitHub Bot commented on MINVOKER-335:
-----------------------------------------
michael-o commented on PR #231:
URL:
https://github.com/apache/maven-invoker-plugin/pull/231#issuecomment-2094497350
This IT is incomplete because the GHA Windows runners are configured not
like a regular machine. It fails for me:
```
Running pre-build script:
D:\Entwicklung\Projekte\maven-invoker-plugin\target\it\MINVOKER-335-symlinks-in-source\setup.groovy
java.nio.file.FileSystemException:
D:\Entwicklung\Projekte\maven-invoker-plugin\target\it\MINVOKER-335-symlinks-in-source\src\it\clone-symlinks\testDirLink:
Dem Client fehlt ein erforderliches Recht.
at
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at
sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)
at java.nio.file.Files.createSymbolicLink(Files.java:1043)
at
org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1.run(Script1.groovy:31)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:460)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:495)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:469)
at
org.apache.maven.shared.scriptinterpreter.GroovyScriptInterpreter.evaluateScript(GroovyScriptInterpreter.java:69)
at
org.apache.maven.shared.scriptinterpreter.ScriptRunner.executeRun(ScriptRunner.java:223)
at
org.apache.maven.shared.scriptinterpreter.ScriptRunner.run(ScriptRunner.java:160)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1823)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1545)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.lambda$runBuilds$4(AbstractInvokerMojo.java:1307)
at
org.apache.maven.plugins.invoker.JobExecutor.lambda$forEach$0(JobExecutor.java:63)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Running post-build script:
D:\Entwicklung\Projekte\maven-invoker-plugin\target\it\MINVOKER-335-symlinks-in-source\verify.groovy
java.nio.file.NoSuchFileException:
D:\Entwicklung\Projekte\maven-invoker-plugin\target\it\MINVOKER-335-symlinks-in-source\target\it\clone-symlinks\testDirLink
at
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsLinkSupport.readLink(WindowsLinkSupport.java:56)
at
sun.nio.fs.WindowsFileSystemProvider.readSymbolicLink(WindowsFileSystemProvider.java:628)
at java.nio.file.Files.readSymbolicLink(Files.java:1432)
at
org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script1.run(Script1.groovy:25)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:460)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:495)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:469)
at
org.apache.maven.shared.scriptinterpreter.GroovyScriptInterpreter.evaluateScript(GroovyScriptInterpreter.java:69)
at
org.apache.maven.shared.scriptinterpreter.ScriptRunner.executeRun(ScriptRunner.java:223)
at
org.apache.maven.shared.scriptinterpreter.ScriptRunner.run(ScriptRunner.java:160)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.runPostBuildHook(AbstractInvokerMojo.java:1905)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1886)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1545)
at
org.apache.maven.plugins.invoker.AbstractInvokerMojo.lambda$runBuilds$4(AbstractInvokerMojo.java:1307)
at
org.apache.maven.plugins.invoker.JobExecutor.lambda$forEach$0(JobExecutor.java:63)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
```
You cannot create a symlink on Windows unless you have an elevated shell or
developer mode. See:
https://www.reddit.com/r/Batch/comments/p8m0bn/creating_smbolic_link_symlink_without_admin/
You need to create a selector script which tries to create a symlink, if it
succeeds you can continue with the IT otherwise you need to skipt it.
> Symlinks from source project are copied as file
> -----------------------------------------------
>
> Key: MINVOKER-335
> URL: https://issues.apache.org/jira/browse/MINVOKER-335
> Project: Maven Invoker Plugin
> Issue Type: Bug
> Reporter: Slawomir Jaranowski
> Assignee: Slawomir Jaranowski
> Priority: Major
> Fix For: 3.7.0
>
>
> Source project:
> {noformat}
> -rw-r--r-- 1 xxx 40 May 1 18:44 test.txt
> drwxr-xr-x 2 xxx 64 May 1 19:26 testDir
> lrwxr-xr-x 1 xxx 7 May 1 19:27 testDirLink -> testDir
> lrwxr-xr-x 1 xxx 8 May 1 19:29 testLink.txt -> test.txt
> {noformat}
> after copy in {{target/it/..}}
> {noformat}
> -rw-r--r-- 1 xxx 40 May 1 18:44 test.txt
> drwxr-xr-x 2 xxx 64 May 1 19:30 testDir
> lrwxr-xr-x 1 xxx 7 May 1 19:30 testDirLink -> testDir
> -rw-r--r-- 1 xxx 40 May 1 18:44 testLink.txt
> {noformat}
> symlinks for directory are preserved only symlinks for file are broken
--
This message was sent by Atlassian Jira
(v8.20.10#820010)