You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2024/05/05 08:52:12 UTC
(maven-invoker-plugin) 01/01: [MINVOKER-335] Use selector script for preparing test with symlinks
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch MINVOKER-335-fix
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git
commit 697dab3b20dbbeec833ad3932741653509a2cb8d
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun May 5 10:50:59 2024 +0200
[MINVOKER-335] Use selector script for preparing test with symlinks
---
.../{setup.groovy => selector.groovy} | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/it/MINVOKER-335-symlinks-in-source/setup.groovy b/src/it/MINVOKER-335-symlinks-in-source/selector.groovy
similarity index 78%
rename from src/it/MINVOKER-335-symlinks-in-source/setup.groovy
rename to src/it/MINVOKER-335-symlinks-in-source/selector.groovy
index 1d0e0fb..869fe46 100644
--- a/src/it/MINVOKER-335-symlinks-in-source/setup.groovy
+++ b/src/it/MINVOKER-335-symlinks-in-source/selector.groovy
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
import java.nio.file.Files
import java.nio.file.Paths
@@ -28,7 +27,12 @@ def testFile = projectPath.resolve('test.txt')
Files.createDirectory(testDir)
Files.createFile(testFile)
-Files.createSymbolicLink(projectPath.resolve('testDirLink'), Paths.get('testDir'))
-Files.createSymbolicLink(projectPath.resolve('testLink.txt'), Paths.get('test.txt'))
+// if FS not support symlinks - we should skip test
+try {
+ Files.createSymbolicLink(projectPath.resolve('testDirLink'), Paths.get('testDir'))
+ Files.createSymbolicLink(projectPath.resolve('testLink.txt'), Paths.get('test.txt'))
+} catch (IOException e) {
+ return false
+}
-true
\ No newline at end of file
+return true