Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use File.isHidden() as it is platform-specific #303

Open
abstratt opened this issue Jun 8, 2019 · 0 comments
Open

Do not use File.isHidden() as it is platform-specific #303

abstratt opened this issue Jun 8, 2019 · 0 comments

Comments

@abstratt
Copy link

abstratt commented Jun 8, 2019

At a few places, such as this, the plug-in uses java.io.File.isHidden() to decide whether to ignore a file.

However, the behavior of File.isHidden() is platform-dependant. On Unixes, it considers files starting with "." to be hidden. On Windows, only files that actually have the "hidden" attribute set are considered hidden.

That produces results that are different depending on the platform. For instance:

mvn package -DonlyMuleSources=true

will result in a JAR file that contains any files starting with "." on Windows, but not on Linux/MacOS.

A workaround could be to consider a file hidden if it either starts with "." or File.isHidden().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant