You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maxim Solodovnik <so...@gmail.com> on 2021/07/17 00:55:05 UTC

maven-javadoc and reproducible builds

Hello All,

I'm a bit confused with documentation

This [1] guide instruct me to set
    <project.build.outputTimestamp>1</project.build.outputTimestamp>
and add
    <notimestamp>true</notimestamp>
to javadoc configuration in pluginManagement

as a result I'm getting

Caused by: java.time.format.DateTimeParseException: Text '1' could not be
parsed at index 0
    at java.time.format.DateTimeFormatter.parseResolved0
(DateTimeFormatter.java:2046)
    at java.time.format.DateTimeFormatter.parse
(DateTimeFormatter.java:1874)
    at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
(AbstractJavadocMojo.java:3007)
    at
org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
(AbstractJavadocMojo.java:5549)

and this seems to be "by design" [2]:

Shall I specify some additional custom property? (bottom?)
or maybe outputTimestamp should be set to some other value?

and documentation definitely need to be updated :(((

[1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
[2]
https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004

-- 
Best regards,
Maxim

Re: maven-javadoc and reproducible builds

Posted by Maxim Solodovnik <so...@gmail.com>.
Done: https://issues.apache.org/jira/browse/MJAVADOC-684 :)

On Sat, 17 Jul 2021 at 19:13, Michael Osipov <mi...@apache.org> wrote:

> Am 2021-07-17 um 09:51 schrieb Maxim Solodovnik:
> > Hello Michael,
> >
> > Shall I file JIRA at https://issues.apache.org/jira/projects/MJAVADOC/ ?
> > Or some other project?
>
> MJAVADOC
>
> > On Sat, 17 Jul 2021 at 14:46, Michael Osipov <mi...@apache.org>
> wrote:
> >
> >> Am 2021-07-17 um 02:55 schrieb Maxim Solodovnik:
> >>> Hello All,
> >>>
> >>> I'm a bit confused with documentation
> >>>
> >>> This [1] guide instruct me to set
> >>>       <project.build.outputTimestamp>1</project.build.outputTimestamp>
> >>> and add
> >>>       <notimestamp>true</notimestamp>
> >>> to javadoc configuration in pluginManagement
> >>>
> >>> as a result I'm getting
> >>>
> >>> Caused by: java.time.format.DateTimeParseException: Text '1' could not
> be
> >>> parsed at index 0
> >>>       at java.time.format.DateTimeFormatter.parseResolved0
> >>> (DateTimeFormatter.java:2046)
> >>>       at java.time.format.DateTimeFormatter.parse
> >>> (DateTimeFormatter.java:1874)
> >>>       at
> >> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> >>> (AbstractJavadocMojo.java:3007)
> >>>       at
> >>>
> >>
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> >>> (AbstractJavadocMojo.java:5549)
> >>>
> >>> and this seems to be "by design" [2]:
> >>>
> >>> Shall I specify some additional custom property? (bottom?)
> >>> or maybe outputTimestamp should be set to some other value?
> >>>
> >>> and documentation definitely need to be updated :(((
> >>>
> >>> [1]
> https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> >>> [2]
> >>>
> >>
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
> >>>
> >>
> >> This is a bug. Please report.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Best regards,
Maxim

Re: maven-javadoc and reproducible builds

Posted by Michael Osipov <mi...@apache.org>.
Am 2021-07-17 um 09:51 schrieb Maxim Solodovnik:
> Hello Michael,
> 
> Shall I file JIRA at https://issues.apache.org/jira/projects/MJAVADOC/ ?
> Or some other project?

MJAVADOC

> On Sat, 17 Jul 2021 at 14:46, Michael Osipov <mi...@apache.org> wrote:
> 
>> Am 2021-07-17 um 02:55 schrieb Maxim Solodovnik:
>>> Hello All,
>>>
>>> I'm a bit confused with documentation
>>>
>>> This [1] guide instruct me to set
>>>       <project.build.outputTimestamp>1</project.build.outputTimestamp>
>>> and add
>>>       <notimestamp>true</notimestamp>
>>> to javadoc configuration in pluginManagement
>>>
>>> as a result I'm getting
>>>
>>> Caused by: java.time.format.DateTimeParseException: Text '1' could not be
>>> parsed at index 0
>>>       at java.time.format.DateTimeFormatter.parseResolved0
>>> (DateTimeFormatter.java:2046)
>>>       at java.time.format.DateTimeFormatter.parse
>>> (DateTimeFormatter.java:1874)
>>>       at
>> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
>>> (AbstractJavadocMojo.java:3007)
>>>       at
>>>
>> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
>>> (AbstractJavadocMojo.java:5549)
>>>
>>> and this seems to be "by design" [2]:
>>>
>>> Shall I specify some additional custom property? (bottom?)
>>> or maybe outputTimestamp should be set to some other value?
>>>
>>> and documentation definitely need to be updated :(((
>>>
>>> [1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
>>> [2]
>>>
>> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
>>>
>>
>> This is a bug. Please report.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-javadoc and reproducible builds

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Michael,

Shall I file JIRA at https://issues.apache.org/jira/projects/MJAVADOC/ ?
Or some other project?

On Sat, 17 Jul 2021 at 14:46, Michael Osipov <mi...@apache.org> wrote:

> Am 2021-07-17 um 02:55 schrieb Maxim Solodovnik:
> > Hello All,
> >
> > I'm a bit confused with documentation
> >
> > This [1] guide instruct me to set
> >      <project.build.outputTimestamp>1</project.build.outputTimestamp>
> > and add
> >      <notimestamp>true</notimestamp>
> > to javadoc configuration in pluginManagement
> >
> > as a result I'm getting
> >
> > Caused by: java.time.format.DateTimeParseException: Text '1' could not be
> > parsed at index 0
> >      at java.time.format.DateTimeFormatter.parseResolved0
> > (DateTimeFormatter.java:2046)
> >      at java.time.format.DateTimeFormatter.parse
> > (DateTimeFormatter.java:1874)
> >      at
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> > (AbstractJavadocMojo.java:3007)
> >      at
> >
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> > (AbstractJavadocMojo.java:5549)
> >
> > and this seems to be "by design" [2]:
> >
> > Shall I specify some additional custom property? (bottom?)
> > or maybe outputTimestamp should be set to some other value?
> >
> > and documentation definitely need to be updated :(((
> >
> > [1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> > [2]
> >
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
> >
>
> This is a bug. Please report.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Best regards,
Maxim

Re: maven-javadoc and reproducible builds

Posted by Michael Osipov <mi...@apache.org>.
Am 2021-07-17 um 02:55 schrieb Maxim Solodovnik:
> Hello All,
> 
> I'm a bit confused with documentation
> 
> This [1] guide instruct me to set
>      <project.build.outputTimestamp>1</project.build.outputTimestamp>
> and add
>      <notimestamp>true</notimestamp>
> to javadoc configuration in pluginManagement
> 
> as a result I'm getting
> 
> Caused by: java.time.format.DateTimeParseException: Text '1' could not be
> parsed at index 0
>      at java.time.format.DateTimeFormatter.parseResolved0
> (DateTimeFormatter.java:2046)
>      at java.time.format.DateTimeFormatter.parse
> (DateTimeFormatter.java:1874)
>      at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> (AbstractJavadocMojo.java:3007)
>      at
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> (AbstractJavadocMojo.java:5549)
> 
> and this seems to be "by design" [2]:
> 
> Shall I specify some additional custom property? (bottom?)
> or maybe outputTimestamp should be set to some other value?
> 
> and documentation definitely need to be updated :(((
> 
> [1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> [2]
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
> 

This is a bug. Please report.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-javadoc and reproducible builds

Posted by Lasse Lindqvist <la...@gmail.com>.
I think that the example using constant "1" is trying to create a build
that does not change when run twice, since nothing in the build now uses
the current time. Well, a lot of things in many places could use the
current time and you can have a reproducible build if you consider current
time as build input/instruction and allow passing arbitrary time, so
someone could replicate the build by passing a time from past.
So here it gets rid of the variable time by using just "1", but the Javadoc
plugin does not handle this malformed time. Maybe it would work if it used
a real constant timestamp such as 2000-01-01T00:00:00Z  as the constant.
Now, maybe someone considers this as a bug in the Javadoc plugin. I would
personally not. I would change the example to be clearer. The FAQ also
discusses updating the project.build.outputTimestamp with
maven-release-plugin, which is somewhat problematic.

la 17. heinäk. 2021 klo 8.07 Maxim Solodovnik (solomax666@gmail.com)
kirjoitti:

> Thanks a million!
>
>
>  <project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
> works for me (after following property was removed)
>       <maven.build.timestamp.format>yyyy/MM/dd
> HH:mm</maven.build.timestamp.format>
>
> not sure how this will help in creating reproducible build
> but now the builds should work :)))
>
> hooray!
>
>
> On Sat, 17 Jul 2021 at 11:52, Lasse Lindqvist <lasse.k.lindqvist@gmail.com
> >
> wrote:
>
> > It is a weird example, but based on the code, the property should be in
> > timestamp format. For example:
> >
> >
> <project.build.outputTimestamp>2021-07-17T01:02:00Z</project.build.outputTimestamp>
> > Now, this is not a constant, so it could not be added to the pom.xml
> > directly like this. Your CI could pass this to the build from command
> line.
> > There is also a property called maven.build.timestamp, I wonder if that
> can
> > be used here since based on docs it is
> > *the UTC timestamp of build start, in yyyy-MM-dd'T'HH:mm:ss'Z' default
> > format *
> > So,
> >
> >
> <project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
> >
> > might work.
> >
> > la 17. heinäk. 2021 klo 3.55 Maxim Solodovnik (solomax666@gmail.com)
> > kirjoitti:
> >
> > > Hello All,
> > >
> > > I'm a bit confused with documentation
> > >
> > > This [1] guide instruct me to set
> > >     <project.build.outputTimestamp>1</project.build.outputTimestamp>
> > > and add
> > >     <notimestamp>true</notimestamp>
> > > to javadoc configuration in pluginManagement
> > >
> > > as a result I'm getting
> > >
> > > Caused by: java.time.format.DateTimeParseException: Text '1' could not
> be
> > > parsed at index 0
> > >     at java.time.format.DateTimeFormatter.parseResolved0
> > > (DateTimeFormatter.java:2046)
> > >     at java.time.format.DateTimeFormatter.parse
> > > (DateTimeFormatter.java:1874)
> > >     at
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> > > (AbstractJavadocMojo.java:3007)
> > >     at
> > >
> > >
> >
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> > > (AbstractJavadocMojo.java:5549)
> > >
> > > and this seems to be "by design" [2]:
> > >
> > > Shall I specify some additional custom property? (bottom?)
> > > or maybe outputTimestamp should be set to some other value?
> > >
> > > and documentation definitely need to be updated :(((
> > >
> > > [1]
> https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> > > [2]
> > >
> > >
> >
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
>
>
> --
> Best regards,
> Maxim
>

Re: maven-javadoc and reproducible builds

Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks a million!

 <project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
works for me (after following property was removed)
      <maven.build.timestamp.format>yyyy/MM/dd
HH:mm</maven.build.timestamp.format>

not sure how this will help in creating reproducible build
but now the builds should work :)))

hooray!


On Sat, 17 Jul 2021 at 11:52, Lasse Lindqvist <la...@gmail.com>
wrote:

> It is a weird example, but based on the code, the property should be in
> timestamp format. For example:
>
> <project.build.outputTimestamp>2021-07-17T01:02:00Z</project.build.outputTimestamp>
> Now, this is not a constant, so it could not be added to the pom.xml
> directly like this. Your CI could pass this to the build from command line.
> There is also a property called maven.build.timestamp, I wonder if that can
> be used here since based on docs it is
> *the UTC timestamp of build start, in yyyy-MM-dd'T'HH:mm:ss'Z' default
> format *
> So,
>
> <project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
>
> might work.
>
> la 17. heinäk. 2021 klo 3.55 Maxim Solodovnik (solomax666@gmail.com)
> kirjoitti:
>
> > Hello All,
> >
> > I'm a bit confused with documentation
> >
> > This [1] guide instruct me to set
> >     <project.build.outputTimestamp>1</project.build.outputTimestamp>
> > and add
> >     <notimestamp>true</notimestamp>
> > to javadoc configuration in pluginManagement
> >
> > as a result I'm getting
> >
> > Caused by: java.time.format.DateTimeParseException: Text '1' could not be
> > parsed at index 0
> >     at java.time.format.DateTimeFormatter.parseResolved0
> > (DateTimeFormatter.java:2046)
> >     at java.time.format.DateTimeFormatter.parse
> > (DateTimeFormatter.java:1874)
> >     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> > (AbstractJavadocMojo.java:3007)
> >     at
> >
> >
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> > (AbstractJavadocMojo.java:5549)
> >
> > and this seems to be "by design" [2]:
> >
> > Shall I specify some additional custom property? (bottom?)
> > or maybe outputTimestamp should be set to some other value?
> >
> > and documentation definitely need to be updated :(((
> >
> > [1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> > [2]
> >
> >
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
> >
> > --
> > Best regards,
> > Maxim
> >
>


-- 
Best regards,
Maxim

Re: maven-javadoc and reproducible builds

Posted by Lasse Lindqvist <la...@gmail.com>.
It is a weird example, but based on the code, the property should be in
timestamp format. For example:
<project.build.outputTimestamp>2021-07-17T01:02:00Z</project.build.outputTimestamp>
Now, this is not a constant, so it could not be added to the pom.xml
directly like this. Your CI could pass this to the build from command line.
There is also a property called maven.build.timestamp, I wonder if that can
be used here since based on docs it is
*the UTC timestamp of build start, in yyyy-MM-dd'T'HH:mm:ss'Z' default
format *
So,
<project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>

might work.

la 17. heinäk. 2021 klo 3.55 Maxim Solodovnik (solomax666@gmail.com)
kirjoitti:

> Hello All,
>
> I'm a bit confused with documentation
>
> This [1] guide instruct me to set
>     <project.build.outputTimestamp>1</project.build.outputTimestamp>
> and add
>     <notimestamp>true</notimestamp>
> to javadoc configuration in pluginManagement
>
> as a result I'm getting
>
> Caused by: java.time.format.DateTimeParseException: Text '1' could not be
> parsed at index 0
>     at java.time.format.DateTimeFormatter.parseResolved0
> (DateTimeFormatter.java:2046)
>     at java.time.format.DateTimeFormatter.parse
> (DateTimeFormatter.java:1874)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getBottomText
> (AbstractJavadocMojo.java:3007)
>     at
>
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
> (AbstractJavadocMojo.java:5549)
>
> and this seems to be "by design" [2]:
>
> Shall I specify some additional custom property? (bottom?)
> or maybe outputTimestamp should be set to some other value?
>
> and documentation definitely need to be updated :(((
>
> [1] https://maven.apache.org/guides/mini/guide-reproducible-builds.html
> [2]
>
> https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3004
>
> --
> Best regards,
> Maxim
>