[MCLEAN-93] Support junctions on NTFS#10
Conversation
|
I'm investigating if I can setup a test on windows. I've been sidetracked by trying to switch the tests to junit 5 / plexus-testing, but it's missing the helper methods to setup/lookup mojos... |
michael-o
left a comment
There was a problem hiding this comment.
When can this happen? I mean, can we create a junction in Java without using native code?
I'm going to experiment with something like: The idea comes from https://www.geeksforgeeks.org/creating-junction-points/ |
@michael-o The test is here: https://github.com/apache/maven-clean-plugin/pull/10/files#diff-f51e0a6f6bcc199bb061d2f1b751c0740ae8cd016a1e87b5349758c4ee96e7d1R297-R321 |
Not sure if you are asking about this regarding "tests" or regarding what "real world" use case this could occur in, but if asking in the second case: NPM does this on Windows. So if you link a NPM component with a package.json like: {
...
"dependencies": {
"someTestServer": "file:src/test/node_server/someTestServer"
}
}You will get a node_modules directory like: If you configure mvn clean to delete node_modules (or a directory above node_modules) - it will walk the junction point and delete your src files. |
|
Stupid Windows! |
|
Resolve #174 |
Jira issue: MCLEAN-93