[ https://issues.apache.org/jira/browse/DOXIASITETOOLS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814869#comment-17814869 ]
Konrad Windszus edited comment on DOXIASITETOOLS-329 at 2/9/24 1:51 PM: ------------------------------------------------------------------------ Maybe one needs a more sophisticated approach here, which relies on SCM modification date. The filesystem one does not necessarily reflect a deliberate content change either (compare with https://softwareengineering.stackexchange.com/questions/350403/why-doesnt-git-set-the-file-time). Update: Unfortunately the information is not exposed via via Maven SCM providers (except for the SVN one). Although potentially this information is exposed via {{ScmProvider.info(...)}} (https://github.com/apache/maven-scm/blob/f5d8bb4fa69b0338377fd96a6cd3ec2499ad688c/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java#L943) only the SVN provider ever calls the relevant https://github.com/apache/maven-scm/blob/f5d8bb4fa69b0338377fd96a6cd3ec2499ad688c/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java#L124. Compare with SCM-914. was (Author: kwin): Maybe one needs a more sophisticated approach here, which relies on SCM modification date. The filesystem one does not necessarily reflect a deliberate content change either (compare with https://softwareengineering.stackexchange.com/questions/350403/why-doesnt-git-set-the-file-time). Update: Unfortunately the information is not exposed via via Maven SCM providers (except for the SVN one). Although potentially this information is exposed via {{ScmProvider.info(...)}} (https://github.com/apache/maven-scm/blob/f5d8bb4fa69b0338377fd96a6cd3ec2499ad688c/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java#L943) only the SVN provider ever calls the relevant https://github.com/apache/maven-scm/blob/f5d8bb4fa69b0338377fd96a6cd3ec2499ad688c/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java#L124. > Expose lastModification date in addition to publishDate in Velocity Context > --------------------------------------------------------------------------- > > Key: DOXIASITETOOLS-329 > URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-329 > Project: Maven Doxia Sitetools > Issue Type: Improvement > Components: Site renderer > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > Currently only the published date (the same for the whole site) is available > in the Velocity context > (https://github.com/apache/maven-doxia-sitetools/blob/5fe4a4c5359e6a23b78f385e15f77767cadaee99/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java#L495). > It would be useful to also populate the lastModification date of the doxia > source file (if available). > That way one could expose a more useful date for end-users (as the publish > date rarely is equal to the date when a page was last touched). Obviously for > Sinks/Documents not based on Doxia source files this is not available. -- This message was sent by Atlassian Jira (v8.20.10#820010)