[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-08-06 Thread Brad Larrick (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751391#comment-17751391
 ] 

Brad Larrick commented on MSITE-971:


[~michael-o] that works. :)

> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 4.0.0-M10
>
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-08-06 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751381#comment-17751381
 ] 

Michael Osipov commented on MSITE-971:
--

[~larrick], please test: https://github.com/apache/maven-site-plugin/pull/158

> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 4.0.0-M10
>
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-07-27 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747835#comment-17747835
 ] 

Michael Osipov commented on MSITE-971:
--

[~larrick], for the time being I recommend using the Maven Release Plugin, it 
will do all the required magic for now. I use it for my personal projects as 
well.

> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Assignee: Michael Osipov
>Priority: Major
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-07-26 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747573#comment-17747573
 ] 

Michael Osipov commented on MSITE-971:
--

Looking at {{help:effective-pom}} the output isn't interpolated as well:
{noformat}
${git.commit.id.describe}; 
${git.commit.time}
-MM-dd 
HH:mm:ssZ
true
17
17
17
3.8.8

${git.commit.time}
UTF-8
UTF-8
{noformat}
So I'd say that the behavior of Maven Site Plugin is consistent with the rest. 
Wether it should be fully interpolated is another question. One could add the 
same approach as done in {{DefaultSiteTool}}. I wonder whether there is a 
better solution to this. I don't want to add special handling just for one 
property...

> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Assignee: Michael Osipov
>Priority: Major
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-07-15 Thread Brad Larrick (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743453#comment-17743453
 ] 

Brad Larrick commented on MSITE-971:


[~michael-o] , I've uploaded a project that demonstrates the issue:

[https://github.com/bradleylarrick/site-plugin-example]

This is all for personal projects, so I don't use the Maven Release Plugin, but 
I still like to maintain reproducibility.

 

> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Priority: Major
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSITE-971) Site generation not resolving git.commit.time

2023-07-14 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSITE-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743284#comment-17743284
 ] 

Michael Osipov commented on MSITE-971:
--

[~larrick], interesting, this could be a global issue where {{MavenProject}} 
contains global/static values. Can you create a sample project?
Please note that a potential fix needs to be applied to {{AbstractMavenReport}} 
as well. Yet another problem is that the Velocity context is populated with 
this uninerpolated value. So even if this is fixed, the populated value would 
be wrong. I won't want a half-baked solution. Is there a reason why you don't 
supply a static value once and have the Maven Release Plugin update the value 
for you?

[~gnodet], what is your opinion, this should be this way or should they be 
fully interpolated?



> Site generation not resolving git.commit.time
> -
>
> Key: MSITE-971
> URL: https://issues.apache.org/jira/browse/MSITE-971
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: property interpolation
>Affects Versions: 4.0.0-M9
> Environment: Windows 10 and FreeBSD
>Reporter: Brad Larrick
>Priority: Major
>
> I'm using git-commit-id-maven-plugin to set project.build.outputTimestamp as 
> suggested in the Maven Guide Configuring for Reproducible Builds. I've 
> included the plugin in my pom and including the following property definition:
>  
> {code:java}
> ${git.commit.time}{code}
>  
> When I generate the site, the plugin fails with the message:
> {{site failed: Invalid project.build.outputTimestamp value 
> '${git.commit.time}}}
> This configuration works properly in the maven-jar-plugin, so I did some 
> investigation. The jar plugin is getting the outputTimestamp as a mojo 
> parameter:
>  
> {code:java}
> @Parameter( defaultValue = "${project.build.outputTimestamp}" )
> private String outputTimestamp;
> {code}
> This works properly, with outputTimestamp set to the last commit time.
> In the site-plugin code, the outputTimestamp is being pulled from the project 
> properties:
> {code:java}
> String outputTimestamp = 
> p.getProperties().getProperty("project.build.outputTimestamp");{code}
> In the case the property hasn't been resolved and the returned string is 
> ${git.commit.time}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)