...
Replace io.wcm.samples.*
with the topmost package from your project.
Step 6: Enable reproducible builds in Maven
There is a special edge case using Sling-Initial-Content and Sling i18n JSON files (example) and wrong ordering of files in the bundle ZIP file which may lead to deployment failures.
To solve this problem add this Maven property to your project’s parent POM to enable the “reproducible builds” feature of Maven (which is useful anyways) for your project:
Code Block | ||
---|---|---|
| ||
<properties>
<!-- Enable reproducible builds -->
<project.build.outputTimestamp>2021-05-27T00:00:00Z</project.build.outputTimestamp>
</properties> |
It’s not relevant which actual timestamp value you are using here - it’s automatically updated during the release by the release or gitflow Maven plugins.
Step 7: Check for usage of build-helper-maven-plugin with add-resources goal
In wcm.io-based projects it was usual to apply special resource filtering to JSON files describing AEM client libraries to replace the “long cache key” with the current bundle version and SCM build number at build time. Usage example:
...
Unfortunately you have to copy the existing resource definitions from the aem-global-parent POM that are relevant for your module as they are not inherited/merged by Maven automatically.
Step
...
8: Check for optional dependencies
Watch out for maven dependencies in your POM that are declared as “optional”. The maven-bundle-plugin marked the package imports for those automatically as “resolution=optional” - this is not the case, you have to list mark packages yourself - example:
...
Filter by label (Content by label) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page Properties | ||
---|---|---|
| ||
|