technomancy/leiningen — pull request #1433 by CraZySacX (2014-01-31 06:16:02+00:00)
Title: Allow plugins to whitelist modified keys that are used during jar/uberjar creation

I have a plugin that adds some build metadata to the version key in the project per semver.org (i.e. 0.1.0-SNAPSHOT+a3fefed). The version key is not in the whitelist defined in jar.clj, so this modification is lost when the profiles are unmerged from the 'new' project and only the whitelisted keys are re-merged into the original. As a result, the generated jar file ends with 0.1.0-SNAPSHOT.jar rather than 0.1.0-SNAPSHOT+a3fefed.jar. This pull request would allow plugins to add a vector of keys they have modified to ```:whitelist``` to be included during this re-merge as below:
```(assoc project :whitelist [:version :manifest])```

As a side note, I think this occurs because the middleware is defined in a plugin in a profile and is not rerun after the profiles are unmerged. If I explicitly tell the middleware to be run with the top-level ```:middleware``` key, the changes are re-applied correctly.