Closed jigneshhadiya2 closed 6 months ago
Does this error occurs on a clean build (e.g. after mvn clean
or after a fresh clone), or when rebuilding a second time?
I'm not sure if it will make a difference, but you may try to edit src/main/cpp/build.xml
around the line 55:
<symlink overwrite="true" resource="${toString:native-binary}"
link="${basedir}/${native-binary-filename}"/>`
and try to replace the /
character by \
(the file separator on Window systems). If it works, I would like to know in order to improve that Ant script.
The following error occurred while executing this line: E:\Demo\PROJ-JNI\src\main\cpp\build.xml:59: Failed to create symlink E:\Demo\PROJ-JNI\target\target to target
E:\Demo\PROJ-JNI\target\target -> : The data present in the reparse point buffer is invalid.
Same issue again
Can you try to delete completely the <symlink>
element? It was provided for convenience, but I think it is not essential.
Found another issue with symlink
An Ant BuildException has occured: Failed to create symlink E:\Demo\PROJ-JNI\target/test-classes/org/osgeo/proj/PROJ-JNI to target around Ant part ...
don't know how can i remove symlink from here
Strangely, I could reproduce this error when executing Maven with the -Dmaven.test.skip=true
option, but not with a plain mvn clean package
. Which command did you used?
Issue is happening with mvn clean package
also
The second symlink
was needed for test execution only, so I was hopping that by skipping tests, the build would not try to create the link. We may try one more drastic action: in the pom.xml
file, delete completely the <execution>
section having <id>build-tests</id>
(around lines 210 to 221). Then try mvn clean package -DskipTests
.
It worked, Thanks.😊
Removed (for next release) the first symbolic link which was provided only for convenience purpose. The second symbolic link, created for testing purposes, it not yet removed because we have no good replacement. We may revisit after Maven 4 is ready.
This would be very helpful to put in the readme! I have spent alot of hours trying to resolve this very same issue.
[exec] Error: could not load cache [exec] Result: 1
An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] E:\Demo\PROJ-JNI\src\main\cpp\build.xml:59: Failed to create symlink E:\Demo\PROJ-JNI\target/target to target [ERROR] around Ant part ... ... @ 7:106 in E:\Demo\PROJ-JNI\target\antrun\build-main.xml: E:\Demo\PROJ-JNI\target\target -> : The data present in the reparse point buffer is invalid.