federkasten / appbundle-maven-plugin

Maven plugin that creates an Application Bundle for OS X containing all your project dependencies and the necessary metadata
Apache License 2.0
179 stars 56 forks source link

Add /Applications/ symlink in the the resulting dmg #18

Closed parml closed 8 years ago

parml commented 9 years ago

Changeset pertains to following issue: https://github.com/federkasten/appbundle-maven-plugin/issues/16

As the target is set to Java 1.6, I chose to work with Commandline to create and remove the symlink. Will need to move to java.nio.file.Files.createSymbolicLink() when target moves to 1.7.

Link created as late as possible, removed as early as possible. Removing /Application symlink with java code ignorant of links (e.g. by some other plugin) could result in targeted contents being removed and thus be disastrous to the user.

maven-clean-plugin does check symlinks and not removing targeted contents, however we can't guarantee for all the plugins the user might use. Better safe and ugly than hated.

federkasten commented 9 years ago

I'm very sorry for the late reply.

I will review in this week.