Re: [PR] [DOXIASITETOOLS-329] Expose last modification date for Doxia source [maven-doxia-sitetools]

2024-04-15 Thread via GitHub


michael-o commented on PR #136:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/136#issuecomment-2057008882

   > This approach does not work well as filesystem modification dates 
typically don't reflect the last modification in the SCM either and differ for 
the same file on different clones/working copies. Will come up with another PR 
leveraging the SCM last modified date.
   
   Don't forget that you can also build from a source tarball as well...


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [DOXIASITETOOLS-329] Expose last modification date for Doxia source [maven-doxia-sitetools]

2024-04-15 Thread via GitHub


kwin closed pull request #136: [DOXIASITETOOLS-329] Expose last modification 
date for Doxia source
URL: https://github.com/apache/maven-doxia-sitetools/pull/136


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [DOXIASITETOOLS-329] Expose last modification date for Doxia source [maven-doxia-sitetools]

2024-04-15 Thread via GitHub


kwin commented on PR #136:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/136#issuecomment-2056570935

   This approach does not work well as filesystem modification dates typically 
don't reflect the last modification in the SCM either and differ for the same 
file on different clones/working copies. Will come up with another PR 
leveraging the SCM last modified date.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [DOXIASITETOOLS-329] Expose last modification date for Doxia source [maven-doxia-sitetools]

2024-04-14 Thread via GitHub


michael-o commented on code in PR #136:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/136#discussion_r1564900683


##
doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java:
##
@@ -498,6 +503,16 @@ protected Context createDocumentVelocityContext(
 context.put("doxiaSiteRendererVersion", 
DOXIA_SITE_RENDERER_VERSION);
 }
 
+String doxiaSourcePath = docRenderingContext.getDoxiaSourcePath();
+if (doxiaSourcePath != null) {
+Path path = Paths.get(doxiaSourcePath);
+try {
+FileTime lastModifiedTime = Files.getLastModifiedTime(path);
+context.put("lastModificationDate", new 
Date(lastModifiedTime.toMillis()));

Review Comment:
   This should be the canonical term: "lastModifiedDate"



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [DOXIASITETOOLS-329] Expose last modification date for Doxia source [maven-doxia-sitetools]

2024-04-14 Thread via GitHub


michael-o commented on PR #136:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/136#issuecomment-2054170169

   @kwin, do you want to pick this up for the next release?


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org