Fix jar task broken by 87c3499

The :provided scope profiles were not being captured before un-merging
profiles.
Merge pull request #1688 from hugoduncan/fix-jar-refactoring

Fix jar task broken by 87c3499