slachiewicz commented on issue #953:
URL: 
https://github.com/apache/maven-site-plugin/issues/953#issuecomment-6626810018

   Current state on master with wagon-file 3.5.3: `site:stage` deploys to 
`file://.../target/staging` through `FileWagon.putDirectory`, which copies with 
plexus-utils `FileUtils.copyDirectoryStructure`. As a result:
   
   - a valid symlink (file or directory, relative or absolute) is staged as a 
plain copy of its target, so no links survive;
   - a dangling link, a link to a missing path outside the site, or a loop 
(`loop -> .`) fails the stage with `Error copying directory structure: Unknown 
file type: .../target/site/<link>`.
   
   Links in `src/site/resources` never reach `target/site` anyway, because 
resource copying already resolves them; they only matter when something creates 
them in the generated site.
   
   The Wagon API has no switch for this, so the options are:
   
   1. Copy with NIO in the site plugin whenever the target is `file:`, for both 
`site:stage` and `site:deploy` to a `file:` URL. Relative links that stay 
inside the site are recreated as links; absolute, escaping or dangling links 
are copied or skipped with a warning; staging never fails on a link.
   2. The same copy, but only for `site:stage`; `site:deploy` to `file:` keeps 
the Wagon behaviour.
   3. Fix `FileWagon.putDirectory` in maven-wagon, so every Wagon user gets it; 
this issue would then close with a Wagon release and a version bump here.
   4. Only stop the failure: skip broken links with a warning and keep 
flattening valid ones.
   
   Option 1 looks like the most consistent to me, and it doesn't depend on a 
Wagon release or on where #1129 goes. @hboutemy, is that what you had in mind 
for publishing multi-module sites with scm-publish, or would you prefer one of 
the others?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to