Technically it can only work if either all code uses that - which will
never occur since even the JVM uses its own config and encoding for some
things - or maven gets a light native launcher (to not add latency) which
prepares the JVM according this setting.
Making -Dline.separator and using jvm.config sounds way more straight
forward for any java user/dev and maven itself to me than a random new
property which does not give the expected result anyway.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le sam. 11 févr. 2023 à 14:36, Gary Gregory <garydgreg...@gmail.com> a
écrit :

> It seems to me that we need a separate EOL setting that is Maven specific,
> just like git has a bunch of settings like autocrlf.
>
> Gary
>
> On Sat, Feb 11, 2023, 08:02 Elliotte Rusty Harold <elh...@ibiblio.org>
> wrote:
>
> > IMHO in 2023 the problem is that anything relies on a system dependent
> > line.separator instead of explicitly specifying which bytes are
> > output. I've fixed some instances of that antipattern over the years.
> > Please file bugs on any plugin you notice that still does that.
> >
> > We can't have good reproducible builds until we wean ourselves off
> > 1970s-era arcana like system dependent line separators.
> >
> >
> > On Fri, Feb 10, 2023 at 1:42 PM Piotr P. Karwasz
> > <piotr.karw...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > At Log4j we have solved all the reproducibility problems mentioned on
> > > the wiki page[1] and we are approaching the problem of reproducibility
> > > between different OSes.
> > >
> > > My goal is for the following procedure to work regardless of the
> > > operating system of the user:
> > >
> > > 1. a user checks out a tagged release from the Git repository,
> > > 2. the user runs the Maven Wrapper: 'mvn package'
> > > 3. the user checks the SHA256 of the resulting JAR file with the one
> > > from Maven Central.
> > >
> > > The only problem I have encountered so far is the difference between
> > > line endings on Windows and UNIX systems.
> > >
> > > The line endings of static resources can be easily fixed using a
> > > `.gitattributes` file, but the line endings of resources generated by
> > > plugins may vary. Many plugins respect `System.lineSeparator()`, but
> > > setting the `line.separator` Java system property on the command line
> > > is no trivial task and it can not certainly be done in
> > > `.mvn/jvm.config`.
> > >
> > > What do you think about introducing a POM-like system property (e.g.
> > > `project.build.lineSeparator`) that would allow setting
> > > `line.separator` using a simple `-Dproject.build.lineSeparator=LF` or
> > > `-Dproject.build.lineSeparator=CRLF`? Ideally this could be a real POM
> > > property, but I am afraid that by the time the POM is resolved,
> > > `System.lineSeparator()` is already initialized.
> > >
> > > Piotr
> > >
> > > [1]
> >
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > > For additional commands, e-mail: dev-h...@maven.apache.org
> > >
> >
> >
> > --
> > Elliotte Rusty Harold
> > elh...@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
>

Reply via email to