On Thu, 12 Aug 2021 at 11:54, Olivier Lamy <ol...@apache.org> wrote:

> No it's not that simple :) and probably doesn;t impact many plugins (btw
> those plugins are using a wrong pattern :) )
>
> In your mojo you have this field:
>     @Parameter(defaultValue = "${project}", readonly = true)
>     private MavenProject project;
>
> Within the mojo you do
>     List<String> classpathElements = project.getTestClasspathElements();
>
> But when you start a new thread the result is different.
>
>     Thread t = new Thread(() ->
>     {
>         List<String> classpathElements =
> project.getTestClasspathElements();
>     });
>
>     t.start();
>
> It is because of the new ThreadLocal usage in MavenProject class.
> Maybe original behaviour could be fixed using InheritableThreadLocal (but
> I haven't tested that yet)
>

using InheritableThreadLocal is fixing the problem.
Personally, I would not make that as a mandatory fix for this release.
but it's up to the release manager.

anyway pr here https://github.com/apache/maven/pull/521


>
> On Thu, 12 Aug 2021 at 05:32, Dan Tran <dant...@gmail.com> wrote:
>
>> sounds to me, it impacts any plugin creating a class loader? such jaxws?
>>
>> -D
>>
>> On Wed, Aug 11, 2021 at 4:20 AM Olivier Lamy <ol...@apache.org> wrote:
>>
>> > On Wed, 11 Aug 2021 at 21:16, Michael Osipov <micha...@apache.org>
>> wrote:
>> >
>> > > Merci Olivier for testing.
>> > > Would you say that the change in Maven just revealed this bug in that
>> > > particular plugin?
>> > >
>> >
>> > Yes we can say that :)
>> > I just hope no other plugins do something similar....
>> >
>> >
>> >
>> > > Am 2021-08-11 um 06:03 schrieb Olivier Lamy:
>> > > > did the bisect and found this
>> > > >
>> > > > *➜  **maven-core* *git:(**42c99b45e**)* git bisect good
>> > > >
>> > > > 76d5f0d942f52650d3bdf775b6af42d23d69066b is the first bad commit
>> > > >
>> > > > commit 76d5f0d942f52650d3bdf775b6af42d23d69066b
>> > > >
>> > > > Author: Falko Modler <fa...@users.noreply.github.com>
>> > > >
>> > > > Date:   Fri Jun 25 19:28:40 2021 +0200
>> > > >
>> > > >
>> > > >      [MNG-6843] Parallel build fails due to missing JAR artifacts in
>> > > > compilePath
>> > > >
>> > > >
>> > > >
>> > > >      Signed-off-by: rfscholte <rfscho...@apache.org>
>> > > >
>> > > >      (cherry picked from commit
>> > 73e00ed85df84ba0c557dd020740812b2453f2d3)
>> > > >
>> > > >
>> > > >
>> > > >      This closes #482
>> > > >
>> > > >
>> > > >   .../org/apache/maven/project/MavenProject.java     | 67
>> ++++++++++++
>> > > > ----------
>> > > >
>> > > >   1 file changed, 36 insertions(+), 31 deletions(-)
>> > > >
>> > > >
>> > > >
>> > > > There is a simple fix in the mentioned plugin (and btw the fix is
>> > needed
>> > > :)
>> > > > )
>> > > > So if a mojo creates a new Thread and tries to get some values from
>> > > > MavenProject the result might change (because of this new
>> threadLocal
>> > > > field).
>> > > >
>> > > > not changing my vote but it's still a change and possible failure
>> > > >
>> > > >
>> > > > On Wed, 11 Aug 2021 at 11:29, Olivier Lamy <ol...@apache.org>
>> wrote:
>> > > >
>> > > >> interesting this code change in the plugin fix the issue with the
>> > staged
>> > > >> 3.8.2
>> > > >>
>> > > >>
>> > >
>> >
>> https://github.com/jetty-project/h2spec-maven-plugin/commit/a752521d12c59347a0995d01160332af28e3f092
>> > > >>
>> > > >> looking at commits log not sure if we touched something related to
>> > > thread
>> > > >> context classloader?
>> > > >>
>> > > >> On Wed, 11 Aug 2021 at 09:11, Olivier Lamy <ol...@apache.org>
>> wrote:
>> > > >>
>> > > >>> found some breaking change.
>> > > >>> this plugin is not working anymore:
>> > > >>> https://github.com/jetty-project/h2spec-maven-plugin
>> > > >>> mvn verify
>> > > >>> got ClassNotFoundException
>> > > >>>
>> > > >>> On Wed, 11 Aug 2021 at 03:50, Falko Modler <f.mod...@gmx.net>
>> wrote:
>> > > >>>
>> > > >>>> I checked it briefly with Quarkus (almost 1k modules) and I
>> couldn't
>> > > >>>> really see a difference.
>> > > >>>>
>> > > >>>> Cheers,
>> > > >>>> Falko
>> > > >>>>
>> > > >>>>
>> > ---------------------------------------------------------------------
>> > > >>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> > > >>>> For additional commands, e-mail: dev-h...@maven.apache.org
>> > > >>>>
>> > > >>>>
>> > > >>>
>> > > >>> --
>> > > >>> Olivier Lamy
>> > > >>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>> > > >>>
>> > > >>
>> > > >>
>> > > >> --
>> > > >> Olivier Lamy
>> > > >> http://twitter.com/olamy | http://linkedin.com/in/olamy
>> > > >>
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> > > For additional commands, e-mail: dev-h...@maven.apache.org
>> > >
>> > >
>> >
>> > --
>> > Olivier Lamy
>> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>> >
>>
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>


-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy

Reply via email to