tcurdt / jdeb

This library provides an Ant task and a Maven plugin to create Debian packages from Java builds in a truly cross platform manner.
https://github.com/tcurdt/jdeb
Apache License 2.0
476 stars 252 forks source link

Add option to ignore broken symlinks in directories #700

Open DimitriosSG opened 2 weeks ago

DimitriosSG commented 2 weeks ago

When using the "directory" src type, the plugin fails with the following error when it encounters a broken symlink: Caused by: java.io.FileNotFoundException: <filepath> (No such file or directory) Most other maven plugins (for example the rpm-maven-plugin and maven-assembly-plugin) ignore any broken symlinks and process the rest of the directory.

When building large projects with lots of dependencies, there is a change one of them has a broken symlink somewhere, so plugins should be able to deal with it (by ignoring the broken symlink), or at least have an option to do that.

I can workaround the issue by first packaging the stuff I want into a tgz (using maven-assembly-plugin) and then using that as the src for jdeb, but jdeb should exhibit a behavior that's consistent with other maven plugins.

I've also attached my plugin configuration (project-specific and company-specific identifiers removed) jdeb.txt

tcurdt commented 1 week ago

Sounds like a useful addition. Just needs someone to implement it. Does not sound too hard.