maven-javadoc-plugin fails with: Text '${timestamp}' could not be parsed at index 0


Your maven build fails with an error like:

1 2 3 4 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:jar (attach-javadocs) on project io.wcm.samples.core: Execution attach-javadocs of goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:jar failed: Text '${timestamp}' could not be parsed at index 0 -> [Help 1]


This may happen especially after updating to global-parent 38 or aem-global-parent 1.5.6 which updates to maven-javadoc-plugin 3.3.0.

Source of the problem is a property definition like this in your POM:

1 <>${timestamp}</>

It sets the “reproducable build” timestamp to a maven variable. This fails with maven maven-javadoc-plugin 3.3.0 even if the referenced variable contains a valid timestamp.

The solution is to use a real timestamp like:

1 <>2021-05-27T00:00:00Z</>

As by now all current maven plugins used for releases (maven-release-plugin, gitflow-maven-plugin) fully support updating this property during the release process, it does not longer make sense to use a variable reference in it.