You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/10 16:42:54 UTC

[GitHub] [maven-clean-plugin] gnodet edited a comment on pull request #10: [MCLEAN-93] Support junctions on NTFS

gnodet edited a comment on pull request #10:
URL: https://github.com/apache/maven-clean-plugin/pull/10#issuecomment-1009093211


   > 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:
   ```
           Path testDir = Paths.get( "target/test-dir" ).toAbsolutePath();
           Files.createDirectories( testDir );
           Path orgDir = testDir.resolve( "org-dir" );
           Path jctDir = testDir.resolve( "jct-dir" );
           Files.createDirectories( orgDir );
   
           Process process = new ProcessBuilder()
                   .directory( testDir.toFile() )
                   .command( "mklink", "/J", jctDir.toString(), orgDir.toString() )
                   .start();
           int result = process.waitFor();
   ```
   The idea comes from https://www.geeksforgeeks.org/creating-junction-points/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org