arturobernalg opened a new pull request, #1398:
URL: https://github.com/apache/maven-assembly-plugin/pull/1398
Fixes #765.
AbstractAssemblyMojo.getAdditionalProperties() returned the raw,
user-configured additionalProperties parameter, so ${maven.build.timestamp} in
a filtered fileSet or file was left as a literal placeholder -- maven-filtering
has no way to resolve it, since it's injected by Maven core's model
interpolation rather than being a real System or project property.
maven-resources-plugin hit the same gap and fixed it for resource filtering in
MRESOURCES-99 by computing the value itself and merging it into the properties
passed to filtering.
Added a MavenBuildTimestamp class (duplicated from maven-model-builder, the
same way resources-plugin's own copy is) and merge its computed
maven.build.timestamp, plus project.baseUri, into the properties returned by
getAdditionalProperties(), with the user's own configured additionalProperties
layered on top so an explicit override still wins.
Added unit tests plus an integration test (filtering-feature/massembly-603)
exercising a filtered fileSet with both placeholders; both pass against the fix
and fail (NPE, since additionalProperties is null by default) against unfixed
code. Full module suite, the integration test suite, checkstyle and spotless
pass locally.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
check one of the following:
- [x] I hereby declare this contribution to be licensed under the Apache
License Version 2.0, January 2004
- [ ] I hereby declare that I have filed an Apache Individual Contributor
License Agreement.
--
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]