You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ma...@barclays.com.INVALID on 2023/12/19 21:56:38 UTC

maven debugging frustrations

When my Java code does something I didn't expect, I can run it under a debugger and step through it line by line until things make sense again.
When maven does something I didn't expect, my debugging strategy is usually more like "try to think of something in my bag of tricks".
Sometimes I suddenly have an epiphany and I realize "oh, it must have broken because of that thing I changed".
But in the absence of epiphanies, I don't have any good ways to ask maven to tell me what on earth is going on.

Example from today: some is failing on our build server with "Compilation failure".
Looking at the build log, there are no compiler errors in sight.
There are a few compiler warnings, and those seem to logged twice: once at warning level, and then again at error level.
It only fails on SOME (not all) of our build configs, even though our configs are pretty darn similar to each other.

So I'm left flailing around more or less at random (try compiling on a different server!  Try copying the command line flags from the one that work!  Etc.)
What I actually want is for maven to give me some CRUMB of visibility into what on earth is going wrong.

I don't even know what "Compilation failure" actually means.
Did some process exit with non-zero status?
Did the process fail to launch in the first place?
Maybe there is no extra process, and the compilation is taking place in the same JVM that's running maven?
If so, what went wrong?  Did an exception get thrown?  Something else?

You get the idea.


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

Re: maven debugging frustrations

Posted by Scott Kurz <sc...@gmail.com>.
You might as well use the '-e' flag too to show the stack trace.  Possibly
consider updating the compiler-plugin version too (it's up to 3.12.0) if
you're using an old one?

Knowing the exception line number and your version of the compiler plugin
you might browse the source at the corresponding tag for a clue:
https://github.com/apache/maven-compiler-plugin/tags.

Can't remember ever having to do more than use -X to see what the
underlying 'javac' invocation was doing but you made it sound like you
weren't getting anything useful as a compiler error/warning message, so
maybe that helps.

On Tue, Dec 19, 2023 at 6:20 PM <ma...@barclays.com.invalid>
wrote:

> Good guess.  Turns out it doesn't though.  I checked yesterday.
>
> My latest theory is that it's running out of memory during compilation.
> But that would presumably end up in the logs, so this theory has problems.
>
> -----Original Message-----
> From: Tomo Suzuki <su...@google.com.INVALID>
> Sent: Tuesday, December 19, 2023 6:15 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: maven debugging frustrations
>
>
> CAUTION: This email originated from outside our organisation -
> suztomo@google.com.INVALID Do not click on links, open attachments, or
> respond unless you recognize the sender and can validate the content is
> safe.
> My guess is that your Maven project uses failOnWarning.
>
> https://clicktime.symantec.com/15siaWLuEraDnGbepBrqS?h=vm2H6AWG-3rryNUA8VNdRBNEgZsI-pOiUUzFOS7k1CM=&u=https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html%23failOnWarning
>
> On Tue, Dec 19, 2023 at 5:38 PM Thomas Broyer <t....@gmail.com> wrote:
>
> > In `mvn -X` you should find the arguments to javac (beware that empty
> > arguments are not displayed there, rather than being shown as "" for
> > instance), which would allow you to run javac on your own, taking
> > Maven out of the equation.
> >
> > Le mar. 19 déc. 2023, 23:28, <ma...@barclays.com.invalid> a
> > écrit :
> >
> > > Indeed, if there were ACTUAL error messages from the java compiler,
> > > this would be far less mysterious :) The trouble is that there are
> > > NOT any error messages coming from the Java compiler.
> > > There are a few warnings (from javac), followed soon after by
> > "Compilation
> > > failure" (from maven, NOT from javac) I do not recommend feeling my
> > > maven-based pain :) But if you happen to know where to get some pain
> > > relief, I'd love to know
> > >
> > > -----Original Message-----
> > > From: Tomo Suzuki <su...@google.com.INVALID>
> > > Sent: Tuesday, December 19, 2023 5:18 PM
> > > To: Maven Users List <us...@maven.apache.org>
> > > Subject: Re: maven debugging frustrations
> > >
> > >
> > > CAUTION: This email originated from outside our organisation -
> > > suztomo@google.com.INVALID Do not click on links, open attachments,
> > > or respond unless you recognize the sender and can validate the
> > > content is safe.
> > > What’s the exact error messages?
> > >
> > > (Maybe I’m too old to feel your pain)  If you use Java, you need to
> > > know what compilation means (converting Java code to Java bytecode).
> > > Your
> > Maven
> > > invocation was telling it was failing due to some error messages.
> > >
> > > On Tue, Dec 19, 2023 at 16:57
> > > <ma...@barclays.com.invalid>
> > > wrote:
> > >
> > > > When my Java code does something I didn't expect, I can run it
> > > > under a debugger and step through it line by line until things
> > > > make sense
> > again.
> > > > When maven does something I didn't expect, my debugging strategy
> > > > is usually more like "try to think of something in my bag of tricks".
> > > > Sometimes I suddenly have an epiphany and I realize "oh, it must
> > > > have broken because of that thing I changed".
> > > > But in the absence of epiphanies, I don't have any good ways to
> > > > ask maven to tell me what on earth is going on.
> > > >
> > > > Example from today: some is failing on our build server with
> > > > "Compilation failure".
> > > > Looking at the build log, there are no compiler errors in sight.
> > > > There are a few compiler warnings, and those seem to logged twice:
> > > > once at warning level, and then again at error level.
> > > > It only fails on SOME (not all) of our build configs, even though
> > > > our configs are pretty darn similar to each other.
> > > >
> > > > So I'm left flailing around more or less at random (try compiling
> > > > on a different server!  Try copying the command line flags from
> > > > the one that work!  Etc.) What I actually want is for maven to
> > > > give me some CRUMB of visibility into what on earth is going wrong.
> > > >
> > > > I don't even know what "Compilation failure" actually means.
> > > > Did some process exit with non-zero status?
> > > > Did the process fail to launch in the first place?
> > > > Maybe there is no extra process, and the compilation is taking
> > > > place in the same JVM that's running maven?
> > > > If so, what went wrong?  Did an exception get thrown?  Something
> else?
> > > >
> > > > You get the idea.
> > > >
> > > >
> > > > This message is for information purposes only. It is not a
> > > > recommendation, advice, offer or solicitation to buy or sell a
> > > > product or service, nor an official confirmation of any
> > > > transaction. It is directed at persons who are professionals and
> > > > is intended for the
> > > > recipient(s) only. It is not directed at retail customers. This
> > > > message
> > > is subject to the terms at:
> > > >
> > >
> > https://clicktime.symantec.com/15sifLYAwPjLHCtCgybKg?h=ANvnaYG630AR0f2
> > GLplpUfGbAsle9xaoL2f-FF_ESsU=&u=https://clicktime.symantec.com/15sjF9u
> > Aun2y5qD3Af42Q?h=bKbi7fnxDJgBguJhQEcMWKUhbV_NYuart3hdMvz044w=&u=https:
> > //www.cib.barclays/disclosures/web-and-email-disclaimer.html
> > > .
> > > >
> > > > For important disclosures, please see:
> > > > https://clicktime.symantec.com/15siVg9cnEtdNKmjGdTgp?h=GH7DdAnjwpt
> > > > EFmc3uqTwo3OwLGnOewXUfpr2nzLk1F0=&u=https://clicktime.symantec.com
> > > > /15siaWLtUn3jsG4H9RCB4?h%3DM6FIGRVBH8G_LIh
> > > > m9t5V7SPthNcb5IVYLL7498zEnzg=&u=https://clicktime.symantec.com/15s
> > > > j5VWbzYfnFwZC5YFjA?h=vAbG2-i6goKT85C1cixGDxwvk0HavK9bjO__2caeaTk=&
> > > > u=https://www.cib.barclays/disclosures/s
> > > > ales-and-trading-disclaimer.html regarding marketing commentary
> > > > from Barclays Sales and/or Trading desks, who are active market
> > > > participants;
> > > > https://clicktime.symantec.com/15siL1m3s1XSYS7tBWfPa?h=BGCfeULGV3N
> > > > eT-OnN_-tqdZ8_ljC3VJwLc8PEaZiUIg=&u=https://clicktime.symantec.com
> > > > /15siL1m36vzxdRaWWjzjC?h%3DG7ajSU4AyuCbxlw
> > > > vIlksn83RCALP2_zHmu0XbnqwDpE=&u=https://clicktime.symantec.com/15s
> > > > ifLYBhUFpCDRaMkFz4?h=ECZ2dSs8MIYXafl2X6dMr8r1bbemLSU8dwE5iVs0UkE=&
> > > > u=https://www.cib.barclays/disclosures/b
> > > > arclays-global-markets-disclosures.html
> > > > regarding our standard terms for Barclays Corporate and Investment
> > > > Bank where we trade with you in principal-to-principal wholesale
> > > > markets transactions; and in respect to Barclays Research,
> > > > including disclosures relating to specific issuers, see:
> > >
> > https://clicktime.symantec.com/15siFBZkeKKNDUkayBbaa?h=G2aTqP2GUKb-ZJb
> > 3VDe2qGDqjn4glmlwiYEU-U9Qp08=&u=https://clicktime.symantec.com/15siFBZ
> > mQPqr8VHxdxGEx?h=A6Ivdpkv17FdsVWJ261K7pXrJt-Wx7P_Y5J128vXr9Q=&u=http:/
> > /publicresearch.barclays.com
> > > .
> > > > __________________________________________________________________
> > > > ____
> > > > ____________
> > > >
> > > > If you are incorporated or operating in Australia, read these
> > > > important
> > > > disclosures:
> > > > https://clicktime.symantec.com/15siQqxLKdD2xNwoj54YC?h=w9CQZ7kwwv3
> > > > ARmtPqByAR-hLRN5eZTTUQK9FibvBjWs=&u=https://clicktime.symantec.com
> > > > /15siQqxKZYgZ3NQS4JPsp?h%3D_wyBE5fSRVnrjCX
> > > > _RdiyqX2Tzqlr_fF2jEBUkk9zsjg=&u=https://clicktime.symantec.com/15s
> > > > ipzvkchd1275RSs4HJ?h=usVfNilMsjcU6fULR9mbiZ2KcwvYMwSe-IAuU_trXKE=&
> > > > u=https://www.cib.barclays/disclosures/i
> > > > mportant-disclosures-asia-pacific.html
> > > > .
> > > >
> > > > __________________________________________________________________
> > > > ____ ____________ For more details about how we use personal
> > > > information, see our privacy
> > > > notice:
> > >
> > https://clicktime.symantec.com/15siVg9c2AN9TKEMbro2S?h=YTZNN6svma8VJfL
> > aKz8L06dizNzYH3spp4UdRQF7gVo=&u=https://clicktime.symantec.com/15sizfK
> > KXvzBqzjGXyraY?h=tXFsvkfh6dxUixZQVl8Sxcfgd-VPGLADotIlZ3B2Y1Y=&u=https:
> > //www.cib.barclays/disclosures/personal-information-use.html
> > > .
> > > >
> > > >
> > > > __________________________________________________________________
> > > > ____
> > > > ____________
> > >
> > > This message is for information purposes only. It is not a
> > recommendation,
> > > advice, offer or solicitation to buy or sell a product or service,
> > > nor an official confirmation of any transaction. It is directed at
> > > persons who
> > are
> > > professionals and is intended for the recipient(s) only. It is not
> > directed
> > > at retail customers. This message is subject to the terms at:
> > >
> https://clicktime.symantec.com/15sjF9uAun2y5qD3Af42Q?h=bKbi7fnxDJgBguJhQEcMWKUhbV_NYuart3hdMvz044w=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html
> .
> > >
> > > For important disclosures, please see:
> > > https://clicktime.symantec.com/15sjAKhtTAMNftP7d6esn?h=SqTfRddNZB16i
> > > 5QEIrjIviqbeWQaBkkBJCq7YdSKh1w=&u=https://www.cib.barclays/disclosur
> > > es/sales-and-trading-disclaimer.html
> > > regarding marketing commentary from Barclays Sales and/or Trading
> > > desks, who are active market participants;
> > >
> > https://clicktime.symantec.com/15sikAjUA5wQcAFVuJf8g?h=l3IK7DecAoi-a-n
> > m9ZVaq3jjHRI8FnHPu2_QoD7xGaM=&u=https://www.cib.barclays/disclosures/b
> > arclays-global-markets-disclosures.html
> > > regarding our standard terms for Barclays Corporate and Investment
> > > Bank where we trade with you in principal-to-principal wholesale
> > > markets transactions; and in respect to Barclays Research, including
> > > disclosures relating to specific issuers, see:
> https://clicktime.symantec.com/15siFBZmQPqr8VHxdxGEx?h=A6Ivdpkv17FdsVWJ261K7pXrJt-Wx7P_Y5J128vXr9Q=&u=http://publicresearch.barclays.com
> .
> > >
> > ______________________________________________________________________
> > ____________
> > >
> > > If you are incorporated or operating in Australia, read these
> > > important
> > > disclosures:
> > >
> > https://clicktime.symantec.com/15siuq835KJbS3uLzRTRv?h=-YOJ1XCwnt7Diea
> > Tnf25UgqdkFwNKBw25Pu9jKH75c8=&u=https://www.cib.barclays/disclosures/i
> > mportant-disclosures-asia-pacific.html
> > > .
> > >
> > >
> > ______________________________________________________________________
> > ____________
> > > For more details about how we use personal information, see our
> > > privacy
> > > notice:
> >
> https://clicktime.symantec.com/15sizfKKXvzBqzjGXyraY?h=tXFsvkfh6dxUixZQVl8Sxcfgd-VPGLADotIlZ3B2Y1Y=&u=https://www.cib.barclays/disclosures/personal-information-use.html
> .
> > >
> > >
> > >
> > ______________________________________________________________________
> > ____________
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
>
>
> --
> Regards,
> Tomo
>
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed
> at retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks,
> who are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank
> where we trade with you in principal-to-principal wholesale markets
> transactions; and in respect to Barclays Research, including disclosures
> relating to specific issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
>
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html
> .
>
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy
> notice: https://www.cib.barclays/disclosures/personal-information-use.html.
>
>
> __________________________________________________________________________________
>

RE: maven debugging frustrations

Posted by ma...@barclays.com.INVALID.
Good guess.  Turns out it doesn't though.  I checked yesterday.

My latest theory is that it's running out of memory during compilation.
But that would presumably end up in the logs, so this theory has problems.

-----Original Message-----
From: Tomo Suzuki <su...@google.com.INVALID> 
Sent: Tuesday, December 19, 2023 6:15 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - suztomo@google.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
My guess is that your Maven project uses failOnWarning.
https://clicktime.symantec.com/15siaWLuEraDnGbepBrqS?h=vm2H6AWG-3rryNUA8VNdRBNEgZsI-pOiUUzFOS7k1CM=&u=https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html%23failOnWarning

On Tue, Dec 19, 2023 at 5:38 PM Thomas Broyer <t....@gmail.com> wrote:

> In `mvn -X` you should find the arguments to javac (beware that empty 
> arguments are not displayed there, rather than being shown as "" for 
> instance), which would allow you to run javac on your own, taking 
> Maven out of the equation.
>
> Le mar. 19 déc. 2023, 23:28, <ma...@barclays.com.invalid> a 
> écrit :
>
> > Indeed, if there were ACTUAL error messages from the java compiler, 
> > this would be far less mysterious :) The trouble is that there are 
> > NOT any error messages coming from the Java compiler.
> > There are a few warnings (from javac), followed soon after by
> "Compilation
> > failure" (from maven, NOT from javac) I do not recommend feeling my 
> > maven-based pain :) But if you happen to know where to get some pain 
> > relief, I'd love to know
> >
> > -----Original Message-----
> > From: Tomo Suzuki <su...@google.com.INVALID>
> > Sent: Tuesday, December 19, 2023 5:18 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Re: maven debugging frustrations
> >
> >
> > CAUTION: This email originated from outside our organisation - 
> > suztomo@google.com.INVALID Do not click on links, open attachments, 
> > or respond unless you recognize the sender and can validate the 
> > content is safe.
> > What’s the exact error messages?
> >
> > (Maybe I’m too old to feel your pain)  If you use Java, you need to 
> > know what compilation means (converting Java code to Java bytecode). 
> > Your
> Maven
> > invocation was telling it was failing due to some error messages.
> >
> > On Tue, Dec 19, 2023 at 16:57 
> > <ma...@barclays.com.invalid>
> > wrote:
> >
> > > When my Java code does something I didn't expect, I can run it 
> > > under a debugger and step through it line by line until things 
> > > make sense
> again.
> > > When maven does something I didn't expect, my debugging strategy 
> > > is usually more like "try to think of something in my bag of tricks".
> > > Sometimes I suddenly have an epiphany and I realize "oh, it must 
> > > have broken because of that thing I changed".
> > > But in the absence of epiphanies, I don't have any good ways to 
> > > ask maven to tell me what on earth is going on.
> > >
> > > Example from today: some is failing on our build server with 
> > > "Compilation failure".
> > > Looking at the build log, there are no compiler errors in sight.
> > > There are a few compiler warnings, and those seem to logged twice:
> > > once at warning level, and then again at error level.
> > > It only fails on SOME (not all) of our build configs, even though 
> > > our configs are pretty darn similar to each other.
> > >
> > > So I'm left flailing around more or less at random (try compiling 
> > > on a different server!  Try copying the command line flags from 
> > > the one that work!  Etc.) What I actually want is for maven to 
> > > give me some CRUMB of visibility into what on earth is going wrong.
> > >
> > > I don't even know what "Compilation failure" actually means.
> > > Did some process exit with non-zero status?
> > > Did the process fail to launch in the first place?
> > > Maybe there is no extra process, and the compilation is taking 
> > > place in the same JVM that's running maven?
> > > If so, what went wrong?  Did an exception get thrown?  Something else?
> > >
> > > You get the idea.
> > >
> > >
> > > This message is for information purposes only. It is not a 
> > > recommendation, advice, offer or solicitation to buy or sell a 
> > > product or service, nor an official confirmation of any 
> > > transaction. It is directed at persons who are professionals and 
> > > is intended for the
> > > recipient(s) only. It is not directed at retail customers. This 
> > > message
> > is subject to the terms at:
> > >
> >
> https://clicktime.symantec.com/15sifLYAwPjLHCtCgybKg?h=ANvnaYG630AR0f2
> GLplpUfGbAsle9xaoL2f-FF_ESsU=&u=https://clicktime.symantec.com/15sjF9u
> Aun2y5qD3Af42Q?h=bKbi7fnxDJgBguJhQEcMWKUhbV_NYuart3hdMvz044w=&u=https:
> //www.cib.barclays/disclosures/web-and-email-disclaimer.html
> > .
> > >
> > > For important disclosures, please see:
> > > https://clicktime.symantec.com/15siVg9cnEtdNKmjGdTgp?h=GH7DdAnjwpt
> > > EFmc3uqTwo3OwLGnOewXUfpr2nzLk1F0=&u=https://clicktime.symantec.com
> > > /15siaWLtUn3jsG4H9RCB4?h%3DM6FIGRVBH8G_LIh
> > > m9t5V7SPthNcb5IVYLL7498zEnzg=&u=https://clicktime.symantec.com/15s
> > > j5VWbzYfnFwZC5YFjA?h=vAbG2-i6goKT85C1cixGDxwvk0HavK9bjO__2caeaTk=&
> > > u=https://www.cib.barclays/disclosures/s
> > > ales-and-trading-disclaimer.html regarding marketing commentary 
> > > from Barclays Sales and/or Trading desks, who are active market 
> > > participants; 
> > > https://clicktime.symantec.com/15siL1m3s1XSYS7tBWfPa?h=BGCfeULGV3N
> > > eT-OnN_-tqdZ8_ljC3VJwLc8PEaZiUIg=&u=https://clicktime.symantec.com
> > > /15siL1m36vzxdRaWWjzjC?h%3DG7ajSU4AyuCbxlw
> > > vIlksn83RCALP2_zHmu0XbnqwDpE=&u=https://clicktime.symantec.com/15s
> > > ifLYBhUFpCDRaMkFz4?h=ECZ2dSs8MIYXafl2X6dMr8r1bbemLSU8dwE5iVs0UkE=&
> > > u=https://www.cib.barclays/disclosures/b
> > > arclays-global-markets-disclosures.html
> > > regarding our standard terms for Barclays Corporate and Investment 
> > > Bank where we trade with you in principal-to-principal wholesale 
> > > markets transactions; and in respect to Barclays Research, 
> > > including disclosures relating to specific issuers, see:
> >
> https://clicktime.symantec.com/15siFBZkeKKNDUkayBbaa?h=G2aTqP2GUKb-ZJb
> 3VDe2qGDqjn4glmlwiYEU-U9Qp08=&u=https://clicktime.symantec.com/15siFBZ
> mQPqr8VHxdxGEx?h=A6Ivdpkv17FdsVWJ261K7pXrJt-Wx7P_Y5J128vXr9Q=&u=http:/
> /publicresearch.barclays.com
> > .
> > > __________________________________________________________________
> > > ____
> > > ____________
> > >
> > > If you are incorporated or operating in Australia, read these 
> > > important
> > > disclosures:
> > > https://clicktime.symantec.com/15siQqxLKdD2xNwoj54YC?h=w9CQZ7kwwv3
> > > ARmtPqByAR-hLRN5eZTTUQK9FibvBjWs=&u=https://clicktime.symantec.com
> > > /15siQqxKZYgZ3NQS4JPsp?h%3D_wyBE5fSRVnrjCX
> > > _RdiyqX2Tzqlr_fF2jEBUkk9zsjg=&u=https://clicktime.symantec.com/15s
> > > ipzvkchd1275RSs4HJ?h=usVfNilMsjcU6fULR9mbiZ2KcwvYMwSe-IAuU_trXKE=&
> > > u=https://www.cib.barclays/disclosures/i
> > > mportant-disclosures-asia-pacific.html
> > > .
> > >
> > > __________________________________________________________________
> > > ____ ____________ For more details about how we use personal 
> > > information, see our privacy
> > > notice:
> >
> https://clicktime.symantec.com/15siVg9c2AN9TKEMbro2S?h=YTZNN6svma8VJfL
> aKz8L06dizNzYH3spp4UdRQF7gVo=&u=https://clicktime.symantec.com/15sizfK
> KXvzBqzjGXyraY?h=tXFsvkfh6dxUixZQVl8Sxcfgd-VPGLADotIlZ3B2Y1Y=&u=https:
> //www.cib.barclays/disclosures/personal-information-use.html
> > .
> > >
> > >
> > > __________________________________________________________________
> > > ____
> > > ____________
> >
> > This message is for information purposes only. It is not a
> recommendation,
> > advice, offer or solicitation to buy or sell a product or service, 
> > nor an official confirmation of any transaction. It is directed at 
> > persons who
> are
> > professionals and is intended for the recipient(s) only. It is not
> directed
> > at retail customers. This message is subject to the terms at:
> > https://clicktime.symantec.com/15sjF9uAun2y5qD3Af42Q?h=bKbi7fnxDJgBguJhQEcMWKUhbV_NYuart3hdMvz044w=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> >
> > For important disclosures, please see:
> > https://clicktime.symantec.com/15sjAKhtTAMNftP7d6esn?h=SqTfRddNZB16i
> > 5QEIrjIviqbeWQaBkkBJCq7YdSKh1w=&u=https://www.cib.barclays/disclosur
> > es/sales-and-trading-disclaimer.html
> > regarding marketing commentary from Barclays Sales and/or Trading 
> > desks, who are active market participants;
> >
> https://clicktime.symantec.com/15sikAjUA5wQcAFVuJf8g?h=l3IK7DecAoi-a-n
> m9ZVaq3jjHRI8FnHPu2_QoD7xGaM=&u=https://www.cib.barclays/disclosures/b
> arclays-global-markets-disclosures.html
> > regarding our standard terms for Barclays Corporate and Investment 
> > Bank where we trade with you in principal-to-principal wholesale 
> > markets transactions; and in respect to Barclays Research, including 
> > disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBZmQPqr8VHxdxGEx?h=A6Ivdpkv17FdsVWJ261K7pXrJt-Wx7P_Y5J128vXr9Q=&u=http://publicresearch.barclays.com.
> >
> ______________________________________________________________________
> ____________
> >
> > If you are incorporated or operating in Australia, read these 
> > important
> > disclosures:
> >
> https://clicktime.symantec.com/15siuq835KJbS3uLzRTRv?h=-YOJ1XCwnt7Diea
> Tnf25UgqdkFwNKBw25Pu9jKH75c8=&u=https://www.cib.barclays/disclosures/i
> mportant-disclosures-asia-pacific.html
> > .
> >
> >
> ______________________________________________________________________
> ____________
> > For more details about how we use personal information, see our 
> > privacy
> > notice:
> https://clicktime.symantec.com/15sizfKKXvzBqzjGXyraY?h=tXFsvkfh6dxUixZQVl8Sxcfgd-VPGLADotIlZ3B2Y1Y=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
> >
> >
> >
> ______________________________________________________________________
> ____________
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>


--
Regards,
Tomo

This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

Re: maven debugging frustrations

Posted by Tomo Suzuki <su...@google.com.INVALID>.
My guess is that your Maven project uses failOnWarning.
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#failOnWarning

On Tue, Dec 19, 2023 at 5:38 PM Thomas Broyer <t....@gmail.com> wrote:

> In `mvn -X` you should find the arguments to javac (beware that empty
> arguments are not displayed there, rather than being shown as "" for
> instance), which would allow you to run javac on your own, taking Maven out
> of the equation.
>
> Le mar. 19 déc. 2023, 23:28, <ma...@barclays.com.invalid> a
> écrit :
>
> > Indeed, if there were ACTUAL error messages from the java compiler, this
> > would be far less mysterious :)
> > The trouble is that there are NOT any error messages coming from the Java
> > compiler.
> > There are a few warnings (from javac), followed soon after by
> "Compilation
> > failure" (from maven, NOT from javac)
> > I do not recommend feeling my maven-based pain :)
> > But if you happen to know where to get some pain relief, I'd love to know
> >
> > -----Original Message-----
> > From: Tomo Suzuki <su...@google.com.INVALID>
> > Sent: Tuesday, December 19, 2023 5:18 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Re: maven debugging frustrations
> >
> >
> > CAUTION: This email originated from outside our organisation -
> > suztomo@google.com.INVALID Do not click on links, open attachments, or
> > respond unless you recognize the sender and can validate the content is
> > safe.
> > What’s the exact error messages?
> >
> > (Maybe I’m too old to feel your pain)  If you use Java, you need to know
> > what compilation means (converting Java code to Java bytecode). Your
> Maven
> > invocation was telling it was failing due to some error messages.
> >
> > On Tue, Dec 19, 2023 at 16:57 <ma...@barclays.com.invalid>
> > wrote:
> >
> > > When my Java code does something I didn't expect, I can run it under a
> > > debugger and step through it line by line until things make sense
> again.
> > > When maven does something I didn't expect, my debugging strategy is
> > > usually more like "try to think of something in my bag of tricks".
> > > Sometimes I suddenly have an epiphany and I realize "oh, it must have
> > > broken because of that thing I changed".
> > > But in the absence of epiphanies, I don't have any good ways to ask
> > > maven to tell me what on earth is going on.
> > >
> > > Example from today: some is failing on our build server with
> > > "Compilation failure".
> > > Looking at the build log, there are no compiler errors in sight.
> > > There are a few compiler warnings, and those seem to logged twice:
> > > once at warning level, and then again at error level.
> > > It only fails on SOME (not all) of our build configs, even though our
> > > configs are pretty darn similar to each other.
> > >
> > > So I'm left flailing around more or less at random (try compiling on a
> > > different server!  Try copying the command line flags from the one
> > > that work!  Etc.) What I actually want is for maven to give me some
> > > CRUMB of visibility into what on earth is going wrong.
> > >
> > > I don't even know what "Compilation failure" actually means.
> > > Did some process exit with non-zero status?
> > > Did the process fail to launch in the first place?
> > > Maybe there is no extra process, and the compilation is taking place
> > > in the same JVM that's running maven?
> > > If so, what went wrong?  Did an exception get thrown?  Something else?
> > >
> > > You get the idea.
> > >
> > >
> > > This message is for information purposes only. It is not a
> > > recommendation, advice, offer or solicitation to buy or sell a product
> > > or service, nor an official confirmation of any transaction. It is
> > > directed at persons who are professionals and is intended for the
> > > recipient(s) only. It is not directed at retail customers. This message
> > is subject to the terms at:
> > >
> >
> https://clicktime.symantec.com/15sifLYAwPjLHCtCgybKg?h=ANvnaYG630AR0f2GLplpUfGbAsle9xaoL2f-FF_ESsU=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html
> > .
> > >
> > > For important disclosures, please see:
> > > https://clicktime.symantec.com/15siaWLtUn3jsG4H9RCB4?h=M6FIGRVBH8G_LIh
> > > m9t5V7SPthNcb5IVYLL7498zEnzg=&u=https://www.cib.barclays/disclosures/s
> > > ales-and-trading-disclaimer.html regarding marketing commentary from
> > > Barclays Sales and/or Trading desks, who are active market
> > > participants;
> > > https://clicktime.symantec.com/15siL1m36vzxdRaWWjzjC?h=G7ajSU4AyuCbxlw
> > > vIlksn83RCALP2_zHmu0XbnqwDpE=&u=https://www.cib.barclays/disclosures/b
> > > arclays-global-markets-disclosures.html
> > > regarding our standard terms for Barclays Corporate and Investment
> > > Bank where we trade with you in principal-to-principal wholesale
> > > markets transactions; and in respect to Barclays Research, including
> > > disclosures relating to specific issuers, see:
> >
> https://clicktime.symantec.com/15siFBZkeKKNDUkayBbaa?h=G2aTqP2GUKb-ZJb3VDe2qGDqjn4glmlwiYEU-U9Qp08=&u=http://publicresearch.barclays.com
> > .
> > > ______________________________________________________________________
> > > ____________
> > >
> > > If you are incorporated or operating in Australia, read these
> > > important
> > > disclosures:
> > > https://clicktime.symantec.com/15siQqxKZYgZ3NQS4JPsp?h=_wyBE5fSRVnrjCX
> > > _RdiyqX2Tzqlr_fF2jEBUkk9zsjg=&u=https://www.cib.barclays/disclosures/i
> > > mportant-disclosures-asia-pacific.html
> > > .
> > >
> > > ______________________________________________________________________
> > > ____________ For more details about how we use personal information,
> > > see our privacy
> > > notice:
> >
> https://clicktime.symantec.com/15siVg9c2AN9TKEMbro2S?h=YTZNN6svma8VJfLaKz8L06dizNzYH3spp4UdRQF7gVo=&u=https://www.cib.barclays/disclosures/personal-information-use.html
> > .
> > >
> > >
> > > ______________________________________________________________________
> > > ____________
> >
> > This message is for information purposes only. It is not a
> recommendation,
> > advice, offer or solicitation to buy or sell a product or service, nor an
> > official confirmation of any transaction. It is directed at persons who
> are
> > professionals and is intended for the recipient(s) only. It is not
> directed
> > at retail customers. This message is subject to the terms at:
> > https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> >
> > For important disclosures, please see:
> > https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> > regarding marketing commentary from Barclays Sales and/or Trading desks,
> > who are active market participants;
> >
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> > regarding our standard terms for Barclays Corporate and Investment Bank
> > where we trade with you in principal-to-principal wholesale markets
> > transactions; and in respect to Barclays Research, including disclosures
> > relating to specific issuers, see: http://publicresearch.barclays.com.
> >
> __________________________________________________________________________________
> >
> > If you are incorporated or operating in Australia, read these important
> > disclosures:
> >
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html
> > .
> >
> >
> __________________________________________________________________________________
> > For more details about how we use personal information, see our privacy
> > notice:
> https://www.cib.barclays/disclosures/personal-information-use.html.
> >
> >
> >
> __________________________________________________________________________________
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>


-- 
Regards,
Tomo

Re: maven debugging frustrations

Posted by Thomas Broyer <t....@gmail.com>.
In `mvn -X` you should find the arguments to javac (beware that empty
arguments are not displayed there, rather than being shown as "" for
instance), which would allow you to run javac on your own, taking Maven out
of the equation.

Le mar. 19 déc. 2023, 23:28, <ma...@barclays.com.invalid> a
écrit :

> Indeed, if there were ACTUAL error messages from the java compiler, this
> would be far less mysterious :)
> The trouble is that there are NOT any error messages coming from the Java
> compiler.
> There are a few warnings (from javac), followed soon after by "Compilation
> failure" (from maven, NOT from javac)
> I do not recommend feeling my maven-based pain :)
> But if you happen to know where to get some pain relief, I'd love to know
>
> -----Original Message-----
> From: Tomo Suzuki <su...@google.com.INVALID>
> Sent: Tuesday, December 19, 2023 5:18 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: maven debugging frustrations
>
>
> CAUTION: This email originated from outside our organisation -
> suztomo@google.com.INVALID Do not click on links, open attachments, or
> respond unless you recognize the sender and can validate the content is
> safe.
> What’s the exact error messages?
>
> (Maybe I’m too old to feel your pain)  If you use Java, you need to know
> what compilation means (converting Java code to Java bytecode). Your Maven
> invocation was telling it was failing due to some error messages.
>
> On Tue, Dec 19, 2023 at 16:57 <ma...@barclays.com.invalid>
> wrote:
>
> > When my Java code does something I didn't expect, I can run it under a
> > debugger and step through it line by line until things make sense again.
> > When maven does something I didn't expect, my debugging strategy is
> > usually more like "try to think of something in my bag of tricks".
> > Sometimes I suddenly have an epiphany and I realize "oh, it must have
> > broken because of that thing I changed".
> > But in the absence of epiphanies, I don't have any good ways to ask
> > maven to tell me what on earth is going on.
> >
> > Example from today: some is failing on our build server with
> > "Compilation failure".
> > Looking at the build log, there are no compiler errors in sight.
> > There are a few compiler warnings, and those seem to logged twice:
> > once at warning level, and then again at error level.
> > It only fails on SOME (not all) of our build configs, even though our
> > configs are pretty darn similar to each other.
> >
> > So I'm left flailing around more or less at random (try compiling on a
> > different server!  Try copying the command line flags from the one
> > that work!  Etc.) What I actually want is for maven to give me some
> > CRUMB of visibility into what on earth is going wrong.
> >
> > I don't even know what "Compilation failure" actually means.
> > Did some process exit with non-zero status?
> > Did the process fail to launch in the first place?
> > Maybe there is no extra process, and the compilation is taking place
> > in the same JVM that's running maven?
> > If so, what went wrong?  Did an exception get thrown?  Something else?
> >
> > You get the idea.
> >
> >
> > This message is for information purposes only. It is not a
> > recommendation, advice, offer or solicitation to buy or sell a product
> > or service, nor an official confirmation of any transaction. It is
> > directed at persons who are professionals and is intended for the
> > recipient(s) only. It is not directed at retail customers. This message
> is subject to the terms at:
> >
> https://clicktime.symantec.com/15sifLYAwPjLHCtCgybKg?h=ANvnaYG630AR0f2GLplpUfGbAsle9xaoL2f-FF_ESsU=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html
> .
> >
> > For important disclosures, please see:
> > https://clicktime.symantec.com/15siaWLtUn3jsG4H9RCB4?h=M6FIGRVBH8G_LIh
> > m9t5V7SPthNcb5IVYLL7498zEnzg=&u=https://www.cib.barclays/disclosures/s
> > ales-and-trading-disclaimer.html regarding marketing commentary from
> > Barclays Sales and/or Trading desks, who are active market
> > participants;
> > https://clicktime.symantec.com/15siL1m36vzxdRaWWjzjC?h=G7ajSU4AyuCbxlw
> > vIlksn83RCALP2_zHmu0XbnqwDpE=&u=https://www.cib.barclays/disclosures/b
> > arclays-global-markets-disclosures.html
> > regarding our standard terms for Barclays Corporate and Investment
> > Bank where we trade with you in principal-to-principal wholesale
> > markets transactions; and in respect to Barclays Research, including
> > disclosures relating to specific issuers, see:
> https://clicktime.symantec.com/15siFBZkeKKNDUkayBbaa?h=G2aTqP2GUKb-ZJb3VDe2qGDqjn4glmlwiYEU-U9Qp08=&u=http://publicresearch.barclays.com
> .
> > ______________________________________________________________________
> > ____________
> >
> > If you are incorporated or operating in Australia, read these
> > important
> > disclosures:
> > https://clicktime.symantec.com/15siQqxKZYgZ3NQS4JPsp?h=_wyBE5fSRVnrjCX
> > _RdiyqX2Tzqlr_fF2jEBUkk9zsjg=&u=https://www.cib.barclays/disclosures/i
> > mportant-disclosures-asia-pacific.html
> > .
> >
> > ______________________________________________________________________
> > ____________ For more details about how we use personal information,
> > see our privacy
> > notice:
> https://clicktime.symantec.com/15siVg9c2AN9TKEMbro2S?h=YTZNN6svma8VJfLaKz8L06dizNzYH3spp4UdRQF7gVo=&u=https://www.cib.barclays/disclosures/personal-information-use.html
> .
> >
> >
> > ______________________________________________________________________
> > ____________
>
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed
> at retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks,
> who are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank
> where we trade with you in principal-to-principal wholesale markets
> transactions; and in respect to Barclays Research, including disclosures
> relating to specific issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
>
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html
> .
>
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy
> notice: https://www.cib.barclays/disclosures/personal-information-use.html.
>
>
> __________________________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by ma...@barclays.com.INVALID.
Re: catchall on the way: yay!
Re: plexus version: I was about to ask if the next version of the compiler plugin will include this, but I see it's already there.  Nice!

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Saturday, December 23, 2023 11:48 PM
To: users@maven.apache.org
Subject: Re: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Thanks for the feedback. Happy it works for you now.

Catch-all category: I am on it (probably after Xmas). I will also add a few more categories to be recognised correctly and salvage their headers in multiple languages, too. Or maybe, the catch-all will replace all the special stuff, if I can make it generic enough.

--
Alexander Kriegisch
https://clicktime.symantec.com/15siFBb9d4NJgGHWiNXKG?h=1vmIObVnLTcyoQ9TsPnuTXCFU7Mf1SG7sMP5BNOvmzk=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 24.12.2023 10:21 (GMT +07:00):

> Okay, I tried again with more realistic settings and indeed it now works!
> (That is, I gave it 700 megs of heap instead of one meg)
> Thank you!  This actually truly works!
> 
> (I still feel that there should be a "catchall" category of compiler output so
> that anything that maven can't make sense of doesn't silently swallowed.)
> 
> But it works!

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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by Alexander Kriegisch <al...@kriegisch.name>.
Thanks for the feedback. Happy it works for you now.

Catch-all category: I am on it (probably after Xmas). I will also add a
few more categories to be recognised correctly and salvage their headers
in multiple languages, too. Or maybe, the catch-all will replace all the
special stuff, if I can make it generic enough.

-- 
Alexander Kriegisch
https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 24.12.2023 10:21 (GMT +07:00):

> Okay, I tried again with more realistic settings and indeed it now works!
> (That is, I gave it 700 megs of heap instead of one meg)
> Thank you!  This actually truly works!
> 
> (I still feel that there should be a "catchall" category of compiler output so
> that anything that maven can't make sense of doesn't silently swallowed.)
> 
> But it works!

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


RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by ma...@barclays.com.INVALID.
Okay, I tried again with more realistic settings and indeed it now works!
(That is, I gave it 700 megs of heap instead of one meg)
Thank you!  This actually truly works!

(I still feel that there should be a "catchall" category of compiler output so that anything that maven can't make sense of doesn't silently swallowed.)

But it works!

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Saturday, December 23, 2023 7:53 PM
To: users@maven.apache.org
Subject: Re: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Just found this in my spam folder. Your invalid e-mail address and the strange link replacements in some of your messages maybe. This kind of obfuscation might derail the server-side filters. Anyway, I already said

  mvn dependency:tree

a minute sago in my other message.

  mvn help:effective-pom -Doutput=effective-pom.xml

is helpful, too.
--
Alexander Kriegisch
https://clicktime.symantec.com/15t6KP9J8Qx4aAou1S5kN?h=gjD-CfhzFG_NEND692vyjsGzpBpicHoC55k2ALzIIoc=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 24.12.2023 01:53 (GMT +07:00):

> Actually no, wait.  I changed the pom as you described but I think the 
> build is still using the old plexus version.
> Is there a way to be sure?
>
> -----Original Message-----
> From: mark.yagnatinsky@barclays.com.INVALID
> <ma...@barclays.com.INVALID>
> Sent: Saturday, December 23, 2023 1:51 PM
> To: users@maven.apache.org
> Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
>
>
> CAUTION: This email originated from outside our organisation - 
> mark.yagnatinsky@barclays.com.INVALID Do not click on links, open 
> attachments, or respond unless you recognize the sender and can 
> validate the content is safe.
> Also: just tested with your new and improved version.
> To speed up the build failures I gave it even less heap (just one meg).
> It doesn't seem to help; all I get is "compilation failure"
> And thanks for putting up with my attitude; I'll try to do better.
>
> -----Original Message-----
> From: Yagnatinsky, Mark : Markets Pre Trade
> Sent: Saturday, December 23, 2023 12:50 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
>
> Okay you win, stack trace below.  My bad, sorry, I should know better.
> Also, thanks for explaining the parsing picture: that's not how I 
> expected it to work at all!
> I never thought maven expected this much structure from the compiler messages.
>
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
>         at com.sun.tools.javac.util.List.of(List.java:135)
>         at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
>         at
>         com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3537)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
>         at
>         com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
>         at
>         com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
>         at
>         com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
>         at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
>         at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
>         at
>         com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
>         at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
>         at com.sun.tools.javac.main.Main.compile(Main.java:523)
>         at com.sun.tools.javac.main.Main.compile(Main.java:381)
>         at com.sun.tools.javac.main.Main.compile(Main.java:370)
>         at com.sun.tools.javac.main.Main.compile(Main.java:361)
>         at com.sun.tools.javac.Main.compile(Main.java:56)
>         at com.sun.tools.javac.Main.main(Main.java:42)
>
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name>
> Sent: Saturday, December 23, 2023 3:03 AM
> To: users@maven.apache.org
> Subject: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
>
>
> CAUTION: This email originated from outside our organisation - 
> alexander@kriegisch.name Do not click on links, open attachments, or 
> respond unless you recognize the sender and can validate the content is safe.
>> There's nothing that special about MY stack trace... just run javac 
>> on a largish module with a tiny heap.
>
> Well, that is an abstract description, and instead of just sending one 
> or two stack traces, now you are burdening me with trying to reproduce 
> your problem without a reproducer. Do you think, that makes sense or 
> is particularly nice? I just wanted *any* example stack trace for this error.
>
>> In the meantime, I have a question. Why is maven in the business of 
>> trying to "parse" the output of javac? Why can't it give me its 
>> output verbatim, as if javac were a mysterious black box binary blob 
>> with totally unknown behaviour?
>
> That is actually a good question. I was wondering about the same thing, too.
> Let me remind you, I am not a maintainer or even have commit rights on 
> Plexus Compiler. I am a simple user, just like you, and last week 
> contributes a little patch for the very first time. The patch improved 
> something, it was not a rewrite.
>
> Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java) 
> implement the same Compiler interface and even extend from the same 
> AbstractCompiler base class. No matter if they compile in process or 
> out of process, they are calle by Maven Compiler via interface method
>
> CompilerResult Compiler.performCompile(CompilerConfiguration)
>   throws CompilerException
>
> I.e., they have to return a CompilerResult,and that one e.g. has a
>
> List<CompilerMessage> getCompilerMessages()
>
> method. I.e., Maven Compiler does not expect a dump of output and 
> error streams and a single result OK or failed, but a list of error 
> messagesof different kinds, such as errors, warnings, infos etc. When 
> compiling out of process
> (fork=true) instead of Java tools interface, the compiler output must 
> be parsed, which is a rather crude and imperfect heuristic approach. 
> Actually, it is amazing that it works as good as it does at all. 
> Simply running the forked compiler VM with a non-English locale can 
> make the difference between an error correctly identified or not, 
> because since at least JDK 8, there are 3 locales, since JDK 21 4 locales in OpenJDK.
>
> I do not want to elaborate any further - you get the picture.
>
> That in some cases, especially when the build fails for any reason, 
> the error message is not parsed out correctly, is exactly what needs 
> improvement and what was partly addressed by my patch, at least if a 
> stack trace happens to be part of the compiler output.
>
> Cheers
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15t5pPybNirW6VrMk5gre?h=xI-pSSfG3WlqyWE
> nBOPE6MhlvRmGDYahcgh6eDqJZJc=&u=https://clicktime.symantec.com/15t5eja
> oBdG3n3Nk8C4vS?h%3DlY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4%3D%26u%
> 3Dhttps://clicktime.symantec.com/15siQqyagwqo7rpNW8hag?h%3DXfl1MqtFlU0
> HUFmEgS0_Xdgtd6szG1OqcZz6i8fSR2E%3D%26u%3Dhttps://scrum-master.de
>
>
> mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):
>
>> There's nothing that special about MY stack trace... just run javac 
>> on a largish module with a tiny heap.
>> (Our module was huge enough to fail with 800 megs, but there are 
>> plenty modules that will fail with 8 megs, let alone one meg.) 
>> Further, the exact stack trace is very sensitive to the exact amount 
>> of heap I give it; I tried varying it and it fails in totally different places.
>> In fact, depending on the exact heap size, sometimes the stack trace 
>> doesn't go all the way back to main() and other times it does.
>> I have no idea how to explain that last part... maybe depth is limited??
>> I will try this again with new and improved plexus version and report back.
>> In the meantime, I have a question.  Why is maven in the business of 
>> trying to "parse" the output of javac?
>> Why can't it give me its output verbatim, as if javac were a 
>> mysterious black box binary blob with totally unknown behaviour?
>>
>> -----Original Message-----
>> From: Alexander Kriegisch <al...@kriegisch.name>
>> Sent: Friday, December 22, 2023 10:23 PM
>> To: users@maven.apache.org
>> Subject: Re: maven debugging frustrations
>>
>>
>> CAUTION: This email originated from outside our organisation - 
>> alexander@kriegisch.name Do not click on links, open attachments, or 
>> respond unless you recognize the sender and can validate the content is safe.
>>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>>> invoke it the same way?
>>
>> I think, somebody already mentioned earlier that you can just 
>> activate debug output in Maven. Then search for the line following 
>> "Command line
>> options":
>>
>> $ mvn -X compile | grep --after-context 1 'Command line options'
>>
>> [DEBUG] Command line options:
>> [DEBUG] -d ...\target\classes -classpath ...
>> src\main\java\org\example\Main.java -s ... -processor ... -g -target 
>> 1.8 -source 1.8 -encoding UTF-8
>>
>> Copy everything from the last line agter "[DEBUG] " and paste it 
>> right behind "javac ". That should be your exact command.
>>
>>> Okay, I think I got it.  Here is the error I get when running with
>>> -J-Xmx800
>>>
>>> <snip warnings about using internal APIs> The system is out of 
>>> resources.
>>> Consult the following stack trace for details.
>>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>>> stack trace from the depths of javac>
>>
>> Sorry to bother you again, but two more requests:
>>
>>   1. Can you please paste more of the stack trace? That would make for a
>>      good (as in realistic) unit or integration test.
>>
>>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>>      should at least enable you to get the stack trace printed. The two
>>      header lines beginning with "The system is out of resources"
>>      probably will be cut off. Anyway, that would be better than
>>      nothing. Can you please retest? In Maven, that would go like this
>>      (fragmentary POM):
>>
>> <properties>
>>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
>> </properties>
>>
>> <plugin>
>>   <groupId>org.apache.maven.plugins</groupId>
>>   <artifactId>maven-compiler-plugin</artifactId>
>>   <version>3.12.0</version>
>>   <dependencies>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-api</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>     </dependency>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-manager</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>     </dependency>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-javac</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>       <scope>runtime</scope>
>>     </dependency>
>>   </dependencies>
>> </plugin>
>>
>> --
>> Alexander Kriegisch
>> https://clicktime.symantec.com/15siL1nJELAChuzSxaJS4?h=nzpjga3_SLSLrs
>> 5JaJ3OiaZifiLqcf_nkIhMPiTjhQ4=&u=https://clicktime.symantec.com/15t5e
>> jb2TVVKGcCWextZQ?h=J57_uTZyWD_oLSoBgYC2yKHlbliYqUHXPOEXinvO-7Q=&u=htt
>> ps://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h%253DisWwo2pYTjyI3
>> SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E%253D%2526u%253Dhttps://clicktime.syman
>> tec.com/15t5ejaoBdG3n3Nk8C4vS?h%253DlY-QL6rWusTeyzIz0RujRgAvrvPPWo66h
>> f-ZSgB36q4%253D%2526u%253Dhttps://scrum-master.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> This message is for information purposes only. It is not a 
>> recommendation, advice, offer or solicitation to buy or sell a 
>> product or service, nor an official confirmation of any transaction. 
>> It is directed at persons who are professionals and is intended for 
>> the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
>> https://clicktime.symantec.com/15t6EYx1foGUADyyTsgbk?h=_aDWVOUqwIhDvne_5R3y2IBThPnvQ0YkoeMmER8Bq-w=&u=https://clicktime.symantec.com/15t64tZDUhg1qmWMqz4fY?h%3DxQz5jFfHOpTwgvomCCOKiUOghFNoKoT-k2ij7fprQZo%3D%26u%3Dhttps://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h%3DHpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10%3D%26u%3Dhttps://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>>
>>
>> For important disclosures, please see:
>> https://clicktime.symantec.com/15t69ikjDBaskHA3vKHT8?h=fK10_zhIpGekBm
>> MMdJiEK5p2UeM207thmSkLrma2ChY=&u=https://clicktime.symantec.com/15t5z
>> 4Mw25zRRpgSJRfWv?h%3DCuC3-L57ZWBl-bFOridRR-v_htBUveAVT2oFXLDyBBo%3D%2
>> 6u%3Dhttps://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h%3D-BcjeOT
>> SLHBOJ_Nv0gsPFuc8b07t6SD26uViyjvO8Zw%3D%26u%3Dhttps://www.cib.barclay
>> s/disclosures/sales-and-trading-disclaimer.html
>> regarding marketing commentary from Barclays Sales and/or Trading 
>> desks, who are active market participants; 
>> https://clicktime.symantec.com/15t5uEAsqLY6WSgHHe61G?h=0CEYddEmKuoUgg
>> gAiLzW2nJnEDvg14CqooHKrDwE2uo=&u=https://clicktime.symantec.com/15t5j
>> Zn5eEweBzCffkU54?h%3D9tEpCyq0ayl9xwFLaJtiszVHnyT6Ln6Fr4kFI_vkmss%3D%2
>> 6u%3Dhttps://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h%3DqjEhvjx
>> Vlwv9PzaJC7BbC0Toe6zX1cZGlPVPfjyyUl0%3D%26u%3Dhttps://www.cib.barclay
>> s/disclosures/barclays-global-markets-disclosures.html
>> regarding our standard terms for Barclays Corporate and Investment 
>> Bank where we trade with you in principal-to-principal wholesale 
>> markets transactions; and in respect to Barclays Research, including 
>> disclosures relating to specific issuers, see:
>> https://clicktime.symantec.com/15t5jZnJv7AugZ2SCXHi2?h=PmkhtTdOUVe_LpXo950C-SMl0A_uKD5mD44j0x-uvm8=&u=https://clicktime.symantec.com/15t5ZuPWj1aTN6Ypadfmp?h%3DlQBXfcQrYNBladUaOqeg9VI44VBdfVZNfC0hpARg4v4%3D%26u%3Dhttps://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h%3D6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w%3D%26u%3Dhttp://publicresearch.barclays.com.
>> _____________________________________________________________________
>> _____________
>>
>> If you are incorporated or operating in Australia, read these 
>> important
>> disclosures:
>> https://clicktime.symantec.com/15t5z4NAHxDgvPWCqCV9t?h=4SmAyZuRIF0Cr3tbB5nPl34IF2mih-fOg2T3wi3jTnI=&u=https://clicktime.symantec.com/15t5pPyN6rdEbw2bDJsDg?h%3DuysNfMEe75RdcM2d4XzbbO3G4cbCuG9XmN9u4rVSels%3D%26u%3Dhttps://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h%3DXUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg%3D%26u%3Dhttps://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
>> _____________________________________________________________________
>> _____________ For more details about how we use personal information, 
>> see our privacy
>> notice:
>> https://clicktime.symantec.com/15t64tZSkZuHLLL8NktJW?h=Tw7GUsY-_KZUCPbp-ejzIPMznPafAWOSlBqeaN-XtNQ=&u=https://clicktime.symantec.com/15t5uEAeZUJq1srWksGNJ?h%3DxxFgXFXqBddyzfoD9p38VoTH0R51ogdjQuaVVkvmdgU%3D%26u%3Dhttps://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h%3Dr1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs%3D%26u%3Dhttps://www.cib.barclays/disclosures/personal-information-use.html.
>>
>> _____________________________________________________________________
>> _____________
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> This message is for information purposes only. It is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service, nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is intended for the 
> recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h=HpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10=&u=https://clicktime.symantec.com/15t6jY7iRVN2dtwWjE5VU?h=WAvQfOUqU1EwIO89wj5VylTinMTGXNmYYthG2dXBtdE=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
>
> For important disclosures, please see:
> https://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h=-BcjeOTSLHBOJ_N
> v0gsPFuc8b07t6SD26uViyjvO8Zw=&u=https://clicktime.symantec.com/15t6ehv
> RxsgSDx7bBfgLr?h=Vxyemi-HWxajRwzQlqcsVgK5FfisBKEMuCdnxVS9gRk=&u=https:
> //www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading 
> desks, who are active market participants; 
> https://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h=qjEhvjxVlwv9Pza
> JC7BbC0Toe6zX1cZGlPVPfjyyUl0=&u=https://clicktime.symantec.com/15t6QDL
> ab2dez7dpYzUtz?h=aw7rLvfVijOXjbaToYmjReRMpu62fwpA1TV9ka8iKkA=&u=https:
> //www.cib.barclays/disclosures/barclays-global-markets-disclosures.htm
> l regarding our standard terms for Barclays Corporate and Investment 
> Bank where we trade with you in principal-to-principal wholesale 
> markets transactions; and in respect to Barclays Research, including 
> disclosures relating to specific issuers, see:
> https://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h=6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w=&u=https://clicktime.symantec.com/15t5ZuPjzsoirfNb7QVQn?h=ZImFYMErNizefVPg7NhOJ1ywqdonMMSj_Ca3kwfNXvI=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________
>
> If you are incorporated or operating in Australia, read these 
> important
> disclosures:
> https://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h=XUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg=&u=https://clicktime.symantec.com/15t6V3Xs3eKFQ4Tk6Yt3c?h=x_qmzbVda5Ep5D5XHRPMBV6t8S_AgFj2tGgIEjJxUHk=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice:
> https://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h=r1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs=&u=https://clicktime.symantec.com/15t6Zsj9WFzqp1Hfe7HCE?h=ZP5vvmbb6F3SoNlf12YwuMdjI5iPVbqbRRqtajLZSy8=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
>
> ______________________________________________________________________
> ____________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> This message is for information purposes only. It is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service, nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is intended for the 
> recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15t6jY7iRVN2dtwWjE5VU?h=WAvQfOUqU1EwIO89wj5VylTinMTGXNmYYthG2dXBtdE=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
> For important disclosures, please see:
> https://clicktime.symantec.com/15t6ehvRxsgSDx7bBfgLr?h=Vxyemi-HWxajRwz
> QlqcsVgK5FfisBKEMuCdnxVS9gRk=&u=https://www.cib.barclays/disclosures/s
> ales-and-trading-disclaimer.html regarding marketing commentary from 
> Barclays Sales and/or Trading desks, who are active market 
> participants; 
> https://clicktime.symantec.com/15t6QDLab2dez7dpYzUtz?h=aw7rLvfVijOXjba
> ToYmjReRMpu62fwpA1TV9ka8iKkA=&u=https://www.cib.barclays/disclosures/b
> arclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment 
> Bank where we trade with you in principal-to-principal wholesale 
> markets transactions; and in respect to Barclays Research, including 
> disclosures relating to specific issuers, see: https://clicktime.symantec.com/15t5ZuPjzsoirfNb7QVQn?h=ZImFYMErNizefVPg7NhOJ1ywqdonMMSj_Ca3kwfNXvI=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________
>
> If you are incorporated or operating in Australia, read these 
> important
> disclosures:
> https://clicktime.symantec.com/15t6V3Xs3eKFQ4Tk6Yt3c?h=x_qmzbVda5Ep5D5XHRPMBV6t8S_AgFj2tGgIEjJxUHk=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice:
> https://clicktime.symantec.com/15t6Zsj9WFzqp1Hfe7HCE?h=ZP5vvmbb6F3SoNlf12YwuMdjI5iPVbqbRRqtajLZSy8=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
> ______________________________________________________________________
> ____________ 
> B?KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
> KCB??[??X??ܚX?KK[XZ[
?\?\??][??X??ܚX?PX]?[??\X?K?ܙ?B??܈Y][
> ۘ[??[X[??K[XZ[
?\?\??Z[X]?[??\X?K?ܙ?B

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

This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by Alexander Kriegisch <al...@kriegisch.name>.
Just found this in my spam folder. Your invalid e-mail address and the
strange link replacements in some of your messages maybe. This kind of
obfuscation might derail the server-side filters. Anyway, I already said

  mvn dependency:tree

a minute sago in my other message.

  mvn help:effective-pom -Doutput=effective-pom.xml

is helpful, too.
-- 
Alexander Kriegisch
https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 24.12.2023 01:53 (GMT +07:00):

> Actually no, wait.  I changed the pom as you described but I think the build is
> still using the old plexus version.
> Is there a way to be sure?
> 
> -----Original Message-----
> From: mark.yagnatinsky@barclays.com.INVALID
> <ma...@barclays.com.INVALID> 
> Sent: Saturday, December 23, 2023 1:51 PM
> To: users@maven.apache.org
> Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
> 
> 
> CAUTION: This email originated from outside our organisation -
> mark.yagnatinsky@barclays.com.INVALID Do not click on links, open attachments,
> or respond unless you recognize the sender and can validate the content is
> safe.
> Also: just tested with your new and improved version.
> To speed up the build failures I gave it even less heap (just one meg).
> It doesn't seem to help; all I get is "compilation failure"
> And thanks for putting up with my attitude; I'll try to do better.
> 
> -----Original Message-----
> From: Yagnatinsky, Mark : Markets Pre Trade 
> Sent: Saturday, December 23, 2023 12:50 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
> 
> Okay you win, stack trace below.  My bad, sorry, I should know better.
> Also, thanks for explaining the parsing picture: that's not how I expected it
> to work at all!
> I never thought maven expected this much structure from the compiler messages. 
> 
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
>         at com.sun.tools.javac.util.List.of(List.java:135)
>         at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
>         at
>         com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3537)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
>         at
>         com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
>         at
>         com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
>         at
>         com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
>         at
>         com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
>         at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
>         at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
>         at
>         com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
>         at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
>         at com.sun.tools.javac.main.Main.compile(Main.java:523)
>         at com.sun.tools.javac.main.Main.compile(Main.java:381)
>         at com.sun.tools.javac.main.Main.compile(Main.java:370)
>         at com.sun.tools.javac.main.Main.compile(Main.java:361)
>         at com.sun.tools.javac.Main.compile(Main.java:56)
>         at com.sun.tools.javac.Main.main(Main.java:42)
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Saturday, December 23, 2023 3:03 AM
> To: users@maven.apache.org
> Subject: Why does Plexus Compiler parse compiler output, when forked? (was:
> maven debugging frustrations)
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
>> There's nothing that special about MY stack trace... just run javac on 
>> a largish module with a tiny heap.
> 
> Well, that is an abstract description, and instead of just sending one or two
> stack traces, now you are burdening me with trying to reproduce your problem
> without a reproducer. Do you think, that makes sense or is particularly nice? I
> just wanted *any* example stack trace for this error.
> 
>> In the meantime, I have a question. Why is maven in the business of 
>> trying to "parse" the output of javac? Why can't it give me its output 
>> verbatim, as if javac were a mysterious black box binary blob with 
>> totally unknown behaviour?
> 
> That is actually a good question. I was wondering about the same thing, too.
> Let me remind you, I am not a maintainer or even have commit rights on Plexus
> Compiler. I am a simple user, just like you, and last week contributes a little
> patch for the very first time. The patch improved something, it was not a
> rewrite.
> 
> Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java) implement
> the same Compiler interface and even extend from the same AbstractCompiler base
> class. No matter if they compile in process or out of process, they are calle
> by Maven Compiler via interface method
> 
> CompilerResult Compiler.performCompile(CompilerConfiguration)
>   throws CompilerException
> 
> I.e., they have to return a CompilerResult,and that one e.g. has a
> 
> List<CompilerMessage> getCompilerMessages()
> 
> method. I.e., Maven Compiler does not expect a dump of output and error streams
> and a single result OK or failed, but a list of error messagesof different
> kinds, such as errors, warnings, infos etc. When compiling out of process
> (fork=true) instead of Java tools interface, the compiler output must be
> parsed, which is a rather crude and imperfect heuristic approach. Actually, it
> is amazing that it works as good as it does at all. Simply running the forked
> compiler VM with a non-English locale can make the difference between an error
> correctly identified or not, because since at least JDK 8, there are 3 locales,
> since JDK 21 4 locales in OpenJDK.
> 
> I do not want to elaborate any further - you get the picture.
> 
> That in some cases, especially when the build fails for any reason, the error
> message is not parsed out correctly, is exactly what needs improvement and what
> was partly addressed by my patch, at least if a stack trace happens to be part
> of the compiler output.
> 
> Cheers
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://clicktime.symantec.com/15siQqyagwqo7rpNW8hag?h=Xfl1MqtFlU0HUFmEgS0_Xdgtd6szG1OqcZz6i8fSR2E=&u=https://scrum-master.de
> 
> 
> mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):
> 
>> There's nothing that special about MY stack trace... just run javac on a
>> largish module with a tiny heap.
>> (Our module was huge enough to fail with 800 megs, but there are plenty
>> modules
>> that will fail with 8 megs, let alone one meg.)
>> Further, the exact stack trace is very sensitive to the exact amount of heap I
>> give it; I tried varying it and it fails in totally different places.
>> In fact, depending on the exact heap size, sometimes the stack trace doesn't
>> go
>> all the way back to main() and other times it does.
>> I have no idea how to explain that last part... maybe depth is limited??
>> I will try this again with new and improved plexus version and report back.
>> In the meantime, I have a question.  Why is maven in the business of trying to
>> "parse" the output of javac?
>> Why can't it give me its output verbatim, as if javac were a mysterious black
>> box binary blob with totally unknown behaviour?
>> 
>> -----Original Message-----
>> From: Alexander Kriegisch <al...@kriegisch.name> 
>> Sent: Friday, December 22, 2023 10:23 PM
>> To: users@maven.apache.org
>> Subject: Re: maven debugging frustrations
>> 
>> 
>> CAUTION: This email originated from outside our organisation -
>> alexander@kriegisch.name Do not click on links, open attachments, or respond
>> unless you recognize the sender and can validate the content is safe.
>>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>>> invoke it the same way?
>> 
>> I think, somebody already mentioned earlier that you can just activate debug
>> output in Maven. Then search for the line following "Command line
>> options":
>> 
>> $ mvn -X compile | grep --after-context 1 'Command line options'
>> 
>> [DEBUG] Command line options:
>> [DEBUG] -d ...\target\classes -classpath ...
>> src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8
>> -source 1.8 -encoding UTF-8
>> 
>> Copy everything from the last line agter "[DEBUG] " and paste it right behind
>> "javac ". That should be your exact command.
>> 
>>> Okay, I think I got it.  Here is the error I get when running with  
>>> -J-Xmx800
>>>
>>> <snip warnings about using internal APIs> The system is out of 
>>> resources.
>>> Consult the following stack trace for details.
>>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>>> stack trace from the depths of javac>
>> 
>> Sorry to bother you again, but two more requests:
>> 
>>   1. Can you please paste more of the stack trace? That would make for a
>>      good (as in realistic) unit or integration test.
>> 
>>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>>      should at least enable you to get the stack trace printed. The two
>>      header lines beginning with "The system is out of resources"
>>      probably will be cut off. Anyway, that would be better than
>>      nothing. Can you please retest? In Maven, that would go like this
>>      (fragmentary POM):
>> 
>> <properties>
>>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
>> </properties>
>> 
>> <plugin>
>>   <groupId>org.apache.maven.plugins</groupId>
>>   <artifactId>maven-compiler-plugin</artifactId>
>>   <version>3.12.0</version>
>>   <dependencies>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-api</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>     </dependency>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-manager</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>     </dependency>
>>     <dependency>
>>       <groupId>org.codehaus.plexus</groupId>
>>       <artifactId>plexus-compiler-javac</artifactId>
>>       <version>${plexusCompilerVersion}</version>
>>       <scope>runtime</scope>
>>     </dependency>
>>   </dependencies>
>> </plugin>
>> 
>> --
>> Alexander Kriegisch
>> https://clicktime.symantec.com/15siL1nJELAChuzSxaJS4?h=nzpjga3_SLSLrs5JaJ3OiaZifiLqcf_nkIhMPiTjhQ4=&u=https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h%3DisWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E%3D%26u%3Dhttps://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h%3DlY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4%3D%26u%3Dhttps://scrum-master.de
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> This message is for information purposes only. It is not a recommendation,
>> advice, offer or solicitation to buy or sell a product or service, nor an
>> official confirmation of any transaction. It is directed at persons who are
>> professionals and is intended for the recipient(s) only. It is not directed at
>> retail customers. This message is subject to the terms at:
>> https://clicktime.symantec.com/15t64tZDUhg1qmWMqz4fY?h=xQz5jFfHOpTwgvomCCOKiUOghFNoKoT-k2ij7fprQZo=&u=https://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h=HpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>> 
>> 
>> For important disclosures, please see:
>> https://clicktime.symantec.com/15t5z4Mw25zRRpgSJRfWv?h=CuC3-L57ZWBl-bFOridRR-v_htBUveAVT2oFXLDyBBo=&u=https://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h=-BcjeOTSLHBOJ_Nv0gsPFuc8b07t6SD26uViyjvO8Zw=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
>> regarding marketing commentary from Barclays Sales and/or Trading desks, who
>> are active market participants;
>> https://clicktime.symantec.com/15t5jZn5eEweBzCffkU54?h=9tEpCyq0ayl9xwFLaJtiszVHnyT6Ln6Fr4kFI_vkmss=&u=https://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h=qjEhvjxVlwv9PzaJC7BbC0Toe6zX1cZGlPVPfjyyUl0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
>> regarding our standard terms for Barclays Corporate and Investment Bank where
>> we trade with you in principal-to-principal wholesale markets transactions;
>> and
>> in respect to Barclays Research, including disclosures relating to specific
>> issuers, see:
>> https://clicktime.symantec.com/15t5ZuPWj1aTN6Ypadfmp?h=lQBXfcQrYNBladUaOqeg9VI44VBdfVZNfC0hpARg4v4=&u=https://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h=6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w=&u=http://publicresearch.barclays.com.
>> __________________________________________________________________________________
>> 
>> If you are incorporated or operating in Australia, read these important
>> disclosures:
>> https://clicktime.symantec.com/15t5pPyN6rdEbw2bDJsDg?h=uysNfMEe75RdcM2d4XzbbO3G4cbCuG9XmN9u4rVSels=&u=https://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h=XUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
>> __________________________________________________________________________________
>> For more details about how we use personal information, see our privacy
>> notice:
>> https://clicktime.symantec.com/15t5uEAeZUJq1srWksGNJ?h=xxFgXFXqBddyzfoD9p38VoTH0R51ogdjQuaVVkvmdgU=&u=https://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h=r1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
>> 
>> __________________________________________________________________________________
>> 
>> ---------------------------------------------------------------------
>> 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
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h=HpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h=-BcjeOTSLHBOJ_Nv0gsPFuc8b07t6SD26uViyjvO8Zw=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h=qjEhvjxVlwv9PzaJC7BbC0Toe6zX1cZGlPVPfjyyUl0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see:
> https://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h=6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w=&u=http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h=XUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h=r1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
> 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> B?KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB??[??X??ܚX?KK[XZ[?\?\??][??X??ܚX?PX]?[??\X?K?ܙ?B??܈Y][ۘ[??[X[??K[XZ[?\?\??Z[X]?[??\X?K?ܙ?B

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


RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by ma...@barclays.com.INVALID.
Actually no, wait.  I changed the pom as you described but I think the build is still using the old plexus version.
Is there a way to be sure?

-----Original Message-----
From: mark.yagnatinsky@barclays.com.INVALID <ma...@barclays.com.INVALID> 
Sent: Saturday, December 23, 2023 1:51 PM
To: users@maven.apache.org
Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - mark.yagnatinsky@barclays.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Also: just tested with your new and improved version.
To speed up the build failures I gave it even less heap (just one meg).
It doesn't seem to help; all I get is "compilation failure"
And thanks for putting up with my attitude; I'll try to do better.

-----Original Message-----
From: Yagnatinsky, Mark : Markets Pre Trade 
Sent: Saturday, December 23, 2023 12:50 PM
To: Maven Users List <us...@maven.apache.org>
Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Okay you win, stack trace below.  My bad, sorry, I should know better.
Also, thanks for explaining the parsing picture: that's not how I expected it to work at all!
I never thought maven expected this much structure from the compiler messages. 

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.sun.tools.javac.util.List.of(List.java:135)
        at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
        at com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3537)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
        at com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
        at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
        at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
        at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)
        at com.sun.tools.javac.main.Main.compile(Main.java:370)
        at com.sun.tools.javac.main.Main.compile(Main.java:361)
        at com.sun.tools.javac.Main.compile(Main.java:56)
        at com.sun.tools.javac.Main.main(Main.java:42)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Saturday, December 23, 2023 3:03 AM
To: users@maven.apache.org
Subject: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
> There's nothing that special about MY stack trace... just run javac on 
> a largish module with a tiny heap.

Well, that is an abstract description, and instead of just sending one or two stack traces, now you are burdening me with trying to reproduce your problem without a reproducer. Do you think, that makes sense or is particularly nice? I just wanted *any* example stack trace for this error.

> In the meantime, I have a question. Why is maven in the business of 
> trying to "parse" the output of javac? Why can't it give me its output 
> verbatim, as if javac were a mysterious black box binary blob with 
> totally unknown behaviour?

That is actually a good question. I was wondering about the same thing, too. Let me remind you, I am not a maintainer or even have commit rights on Plexus Compiler. I am a simple user, just like you, and last week contributes a little patch for the very first time. The patch improved something, it was not a rewrite.

Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java) implement the same Compiler interface and even extend from the same AbstractCompiler base class. No matter if they compile in process or out of process, they are calle by Maven Compiler via interface method

CompilerResult Compiler.performCompile(CompilerConfiguration)
  throws CompilerException

I.e., they have to return a CompilerResult,and that one e.g. has a

List<CompilerMessage> getCompilerMessages()

method. I.e., Maven Compiler does not expect a dump of output and error streams and a single result OK or failed, but a list of error messagesof different kinds, such as errors, warnings, infos etc. When compiling out of process (fork=true) instead of Java tools interface, the compiler output must be parsed, which is a rather crude and imperfect heuristic approach. Actually, it is amazing that it works as good as it does at all. Simply running the forked compiler VM with a non-English locale can make the difference between an error correctly identified or not, because since at least JDK 8, there are 3 locales, since JDK 21 4 locales in OpenJDK.

I do not want to elaborate any further - you get the picture.

That in some cases, especially when the build fails for any reason, the error message is not parsed out correctly, is exactly what needs improvement and what was partly addressed by my patch, at least if a stack trace happens to be part of the compiler output.

Cheers
--
Alexander Kriegisch
https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://clicktime.symantec.com/15siQqyagwqo7rpNW8hag?h=Xfl1MqtFlU0HUFmEgS0_Xdgtd6szG1OqcZz6i8fSR2E=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):

> There's nothing that special about MY stack trace... just run javac on a
> largish module with a tiny heap.
> (Our module was huge enough to fail with 800 megs, but there are plenty modules
> that will fail with 8 megs, let alone one meg.)
> Further, the exact stack trace is very sensitive to the exact amount of heap I
> give it; I tried varying it and it fails in totally different places.
> In fact, depending on the exact heap size, sometimes the stack trace doesn't go
> all the way back to main() and other times it does.
> I have no idea how to explain that last part... maybe depth is limited??
> I will try this again with new and improved plexus version and report back.
> In the meantime, I have a question.  Why is maven in the business of trying to
> "parse" the output of javac?
> Why can't it give me its output verbatim, as if javac were a mysterious black
> box binary blob with totally unknown behaviour?
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Friday, December 22, 2023 10:23 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>> invoke it the same way?
> 
> I think, somebody already mentioned earlier that you can just activate debug
> output in Maven. Then search for the line following "Command line
> options":
> 
> $ mvn -X compile | grep --after-context 1 'Command line options'
> 
> [DEBUG] Command line options:
> [DEBUG] -d ...\target\classes -classpath ...
> src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8
> -source 1.8 -encoding UTF-8
> 
> Copy everything from the last line agter "[DEBUG] " and paste it right behind
> "javac ". That should be your exact command.
> 
>> Okay, I think I got it.  Here is the error I get when running with  
>> -J-Xmx800
>>
>> <snip warnings about using internal APIs> The system is out of 
>> resources.
>> Consult the following stack trace for details.
>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>> stack trace from the depths of javac>
> 
> Sorry to bother you again, but two more requests:
> 
>   1. Can you please paste more of the stack trace? That would make for a
>      good (as in realistic) unit or integration test.
> 
>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>      should at least enable you to get the stack trace printed. The two
>      header lines beginning with "The system is out of resources"
>      probably will be cut off. Anyway, that would be better than
>      nothing. Can you please retest? In Maven, that would go like this
>      (fragmentary POM):
> 
> <properties>
>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
> </properties>
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>3.12.0</version>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-api</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-manager</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-javac</artifactId>
>       <version>${plexusCompilerVersion}</version>
>       <scope>runtime</scope>
>     </dependency>
>   </dependencies>
> </plugin>
> 
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siL1nJELAChuzSxaJS4?h=nzpjga3_SLSLrs5JaJ3OiaZifiLqcf_nkIhMPiTjhQ4=&u=https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h%3DisWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E%3D%26u%3Dhttps://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h%3DlY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4%3D%26u%3Dhttps://scrum-master.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15t64tZDUhg1qmWMqz4fY?h=xQz5jFfHOpTwgvomCCOKiUOghFNoKoT-k2ij7fprQZo=&u=https://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h=HpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15t5z4Mw25zRRpgSJRfWv?h=CuC3-L57ZWBl-bFOridRR-v_htBUveAVT2oFXLDyBBo=&u=https://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h=-BcjeOTSLHBOJ_Nv0gsPFuc8b07t6SD26uViyjvO8Zw=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://clicktime.symantec.com/15t5jZn5eEweBzCffkU54?h=9tEpCyq0ayl9xwFLaJtiszVHnyT6Ln6Fr4kFI_vkmss=&u=https://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h=qjEhvjxVlwv9PzaJC7BbC0Toe6zX1cZGlPVPfjyyUl0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: https://clicktime.symantec.com/15t5ZuPWj1aTN6Ypadfmp?h=lQBXfcQrYNBladUaOqeg9VI44VBdfVZNfC0hpARg4v4=&u=https://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h=6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w=&u=http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://clicktime.symantec.com/15t5pPyN6rdEbw2bDJsDg?h=uysNfMEe75RdcM2d4XzbbO3G4cbCuG9XmN9u4rVSels=&u=https://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h=XUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://clicktime.symantec.com/15t5uEAeZUJq1srWksGNJ?h=xxFgXFXqBddyzfoD9p38VoTH0R51ogdjQuaVVkvmdgU=&u=https://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h=r1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15sipzwzz2FmBawzDvhKn?h=HpsFM7c82XUjXE_RGYhCNWR1Uqj-TXWgdqMoOkXcW10=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://clicktime.symantec.com/15sikAkiXQaAme84gNJBA?h=-BcjeOTSLHBOJ_Nv0gsPFuc8b07t6SD26uViyjvO8Zw=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15siVgAs9ZXPXoeJ3h6jJ?h=qjEhvjxVlwv9PzaJC7BbC0Toe6zX1cZGlPVPfjyyUl0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBb1miUcHyAXR1uHS?h=6qkne1UkNxWPpvNGnSvxQG2xDqwDfghLsCyyO05u31w=&u=http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://clicktime.symantec.com/15siaWN9cBCywkUDbFVsv?h=XUTACoSNPdwkLE7BhDArD3o0KyCOvEypokyEWAwYpqg=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://clicktime.symantec.com/15sifLZS4ntaMhJ98ou2Y?h=r1QxyNG6BKPZq-VKxnm4SVYzr86NimGQy7HSha-p2Rs=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by ma...@barclays.com.INVALID.
Also: just tested with your new and improved version.
To speed up the build failures I gave it even less heap (just one meg).
It doesn't seem to help; all I get is "compilation failure"
And thanks for putting up with my attitude; I'll try to do better.

-----Original Message-----
From: Yagnatinsky, Mark : Markets Pre Trade 
Sent: Saturday, December 23, 2023 12:50 PM
To: Maven Users List <us...@maven.apache.org>
Subject: RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Okay you win, stack trace below.  My bad, sorry, I should know better.
Also, thanks for explaining the parsing picture: that's not how I expected it to work at all!
I never thought maven expected this much structure from the compiler messages. 

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.sun.tools.javac.util.List.of(List.java:135)
        at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
        at com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3537)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
        at com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
        at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
        at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
        at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)
        at com.sun.tools.javac.main.Main.compile(Main.java:370)
        at com.sun.tools.javac.main.Main.compile(Main.java:361)
        at com.sun.tools.javac.Main.compile(Main.java:56)
        at com.sun.tools.javac.Main.main(Main.java:42)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Saturday, December 23, 2023 3:03 AM
To: users@maven.apache.org
Subject: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
> There's nothing that special about MY stack trace... just run javac on 
> a largish module with a tiny heap.

Well, that is an abstract description, and instead of just sending one or two stack traces, now you are burdening me with trying to reproduce your problem without a reproducer. Do you think, that makes sense or is particularly nice? I just wanted *any* example stack trace for this error.

> In the meantime, I have a question. Why is maven in the business of 
> trying to "parse" the output of javac? Why can't it give me its output 
> verbatim, as if javac were a mysterious black box binary blob with 
> totally unknown behaviour?

That is actually a good question. I was wondering about the same thing, too. Let me remind you, I am not a maintainer or even have commit rights on Plexus Compiler. I am a simple user, just like you, and last week contributes a little patch for the very first time. The patch improved something, it was not a rewrite.

Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java) implement the same Compiler interface and even extend from the same AbstractCompiler base class. No matter if they compile in process or out of process, they are calle by Maven Compiler via interface method

CompilerResult Compiler.performCompile(CompilerConfiguration)
  throws CompilerException

I.e., they have to return a CompilerResult,and that one e.g. has a

List<CompilerMessage> getCompilerMessages()

method. I.e., Maven Compiler does not expect a dump of output and error streams and a single result OK or failed, but a list of error messagesof different kinds, such as errors, warnings, infos etc. When compiling out of process (fork=true) instead of Java tools interface, the compiler output must be parsed, which is a rather crude and imperfect heuristic approach. Actually, it is amazing that it works as good as it does at all. Simply running the forked compiler VM with a non-English locale can make the difference between an error correctly identified or not, because since at least JDK 8, there are 3 locales, since JDK 21 4 locales in OpenJDK.

I do not want to elaborate any further - you get the picture.

That in some cases, especially when the build fails for any reason, the error message is not parsed out correctly, is exactly what needs improvement and what was partly addressed by my patch, at least if a stack trace happens to be part of the compiler output.

Cheers
--
Alexander Kriegisch
https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):

> There's nothing that special about MY stack trace... just run javac on a
> largish module with a tiny heap.
> (Our module was huge enough to fail with 800 megs, but there are plenty modules
> that will fail with 8 megs, let alone one meg.)
> Further, the exact stack trace is very sensitive to the exact amount of heap I
> give it; I tried varying it and it fails in totally different places.
> In fact, depending on the exact heap size, sometimes the stack trace doesn't go
> all the way back to main() and other times it does.
> I have no idea how to explain that last part... maybe depth is limited??
> I will try this again with new and improved plexus version and report back.
> In the meantime, I have a question.  Why is maven in the business of trying to
> "parse" the output of javac?
> Why can't it give me its output verbatim, as if javac were a mysterious black
> box binary blob with totally unknown behaviour?
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Friday, December 22, 2023 10:23 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>> invoke it the same way?
> 
> I think, somebody already mentioned earlier that you can just activate debug
> output in Maven. Then search for the line following "Command line
> options":
> 
> $ mvn -X compile | grep --after-context 1 'Command line options'
> 
> [DEBUG] Command line options:
> [DEBUG] -d ...\target\classes -classpath ...
> src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8
> -source 1.8 -encoding UTF-8
> 
> Copy everything from the last line agter "[DEBUG] " and paste it right behind
> "javac ". That should be your exact command.
> 
>> Okay, I think I got it.  Here is the error I get when running with  
>> -J-Xmx800
>>
>> <snip warnings about using internal APIs> The system is out of 
>> resources.
>> Consult the following stack trace for details.
>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>> stack trace from the depths of javac>
> 
> Sorry to bother you again, but two more requests:
> 
>   1. Can you please paste more of the stack trace? That would make for a
>      good (as in realistic) unit or integration test.
> 
>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>      should at least enable you to get the stack trace printed. The two
>      header lines beginning with "The system is out of resources"
>      probably will be cut off. Anyway, that would be better than
>      nothing. Can you please retest? In Maven, that would go like this
>      (fragmentary POM):
> 
> <properties>
>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
> </properties>
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>3.12.0</version>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-api</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-manager</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-javac</artifactId>
>       <version>${plexusCompilerVersion}</version>
>       <scope>runtime</scope>
>     </dependency>
>   </dependencies>
> </plugin>
> 
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h=isWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E=&u=https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://scrum-master.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15t64tZDUhg1qmWMqz4fY?h=xQz5jFfHOpTwgvomCCOKiUOghFNoKoT-k2ij7fprQZo=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15t5z4Mw25zRRpgSJRfWv?h=CuC3-L57ZWBl-bFOridRR-v_htBUveAVT2oFXLDyBBo=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://clicktime.symantec.com/15t5jZn5eEweBzCffkU54?h=9tEpCyq0ayl9xwFLaJtiszVHnyT6Ln6Fr4kFI_vkmss=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: https://clicktime.symantec.com/15t5ZuPWj1aTN6Ypadfmp?h=lQBXfcQrYNBladUaOqeg9VI44VBdfVZNfC0hpARg4v4=&u=http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://clicktime.symantec.com/15t5pPyN6rdEbw2bDJsDg?h=uysNfMEe75RdcM2d4XzbbO3G4cbCuG9XmN9u4rVSels=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://clicktime.symantec.com/15t5uEAeZUJq1srWksGNJ?h=xxFgXFXqBddyzfoD9p38VoTH0R51ogdjQuaVVkvmdgU=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by Alexander Kriegisch <al...@kriegisch.name>.
Thanks for the stack trace. :-) I quickly tested it in a unit test with
Plexus Compiler 2.14.2, and like I guessed already, the stack trace is
detected, but not the two header lines above, because Plexus Javac does
not search for them (yet). I would expect you to see the stack trace,
but you said you did not. Are you really sure that you added the Plexus
dependencies to Maven Compiler Plugin, like Ishowed you in my Maven
example? Can you maybe check with 'mvn dependency:tree'?

-- 
Alexander Kriegisch
https://scrum-master.de

mark.yagnatinsky@barclays.com.INVALID schrieb am 24.12.2023 00:50 (GMT +07:00):

> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
>         at com.sun.tools.javac.util.List.of(List.java:135)
>         at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
>         at
>         com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)

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


RE: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by ma...@barclays.com.INVALID.
Okay you win, stack trace below.  My bad, sorry, I should know better.
Also, thanks for explaining the parsing picture: that's not how I expected it to work at all!
I never thought maven expected this much structure from the compiler messages. 

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.sun.tools.javac.util.List.of(List.java:135)
        at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:129)
        at com.sun.tools.javac.parser.JavacParser.variableDeclaratorsRest(JavacParser.java:3006)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(JavacParser.java:3537)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceBody(JavacParser.java:3436)
        at com.sun.tools.javac.parser.JavacParser.classDeclaration(JavacParser.java:3285)
        at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3226)
        at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3215)
        at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3155)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
        at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)
        at com.sun.tools.javac.main.Main.compile(Main.java:370)
        at com.sun.tools.javac.main.Main.compile(Main.java:361)
        at com.sun.tools.javac.Main.compile(Main.java:56)
        at com.sun.tools.javac.Main.main(Main.java:42)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Saturday, December 23, 2023 3:03 AM
To: users@maven.apache.org
Subject: Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
> There's nothing that special about MY stack trace... just run javac on 
> a largish module with a tiny heap.

Well, that is an abstract description, and instead of just sending one or two stack traces, now you are burdening me with trying to reproduce your problem without a reproducer. Do you think, that makes sense or is particularly nice? I just wanted *any* example stack trace for this error.

> In the meantime, I have a question. Why is maven in the business of 
> trying to "parse" the output of javac? Why can't it give me its output 
> verbatim, as if javac were a mysterious black box binary blob with 
> totally unknown behaviour?

That is actually a good question. I was wondering about the same thing, too. Let me remind you, I am not a maintainer or even have commit rights on Plexus Compiler. I am a simple user, just like you, and last week contributes a little patch for the very first time. The patch improved something, it was not a rewrite.

Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java) implement the same Compiler interface and even extend from the same AbstractCompiler base class. No matter if they compile in process or out of process, they are calle by Maven Compiler via interface method

CompilerResult Compiler.performCompile(CompilerConfiguration)
  throws CompilerException

I.e., they have to return a CompilerResult,and that one e.g. has a

List<CompilerMessage> getCompilerMessages()

method. I.e., Maven Compiler does not expect a dump of output and error streams and a single result OK or failed, but a list of error messagesof different kinds, such as errors, warnings, infos etc. When compiling out of process (fork=true) instead of Java tools interface, the compiler output must be parsed, which is a rather crude and imperfect heuristic approach. Actually, it is amazing that it works as good as it does at all. Simply running the forked compiler VM with a non-English locale can make the difference between an error correctly identified or not, because since at least JDK 8, there are 3 locales, since JDK 21 4 locales in OpenJDK.

I do not want to elaborate any further - you get the picture.

That in some cases, especially when the build fails for any reason, the error message is not parsed out correctly, is exactly what needs improvement and what was partly addressed by my patch, at least if a stack trace happens to be part of the compiler output.

Cheers
--
Alexander Kriegisch
https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):

> There's nothing that special about MY stack trace... just run javac on a
> largish module with a tiny heap.
> (Our module was huge enough to fail with 800 megs, but there are plenty modules
> that will fail with 8 megs, let alone one meg.)
> Further, the exact stack trace is very sensitive to the exact amount of heap I
> give it; I tried varying it and it fails in totally different places.
> In fact, depending on the exact heap size, sometimes the stack trace doesn't go
> all the way back to main() and other times it does.
> I have no idea how to explain that last part... maybe depth is limited??
> I will try this again with new and improved plexus version and report back.
> In the meantime, I have a question.  Why is maven in the business of trying to
> "parse" the output of javac?
> Why can't it give me its output verbatim, as if javac were a mysterious black
> box binary blob with totally unknown behaviour?
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Friday, December 22, 2023 10:23 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>> invoke it the same way?
> 
> I think, somebody already mentioned earlier that you can just activate debug
> output in Maven. Then search for the line following "Command line
> options":
> 
> $ mvn -X compile | grep --after-context 1 'Command line options'
> 
> [DEBUG] Command line options:
> [DEBUG] -d ...\target\classes -classpath ...
> src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8
> -source 1.8 -encoding UTF-8
> 
> Copy everything from the last line agter "[DEBUG] " and paste it right behind
> "javac ". That should be your exact command.
> 
>> Okay, I think I got it.  Here is the error I get when running with  
>> -J-Xmx800
>>
>> <snip warnings about using internal APIs> The system is out of 
>> resources.
>> Consult the following stack trace for details.
>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>> stack trace from the depths of javac>
> 
> Sorry to bother you again, but two more requests:
> 
>   1. Can you please paste more of the stack trace? That would make for a
>      good (as in realistic) unit or integration test.
> 
>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>      should at least enable you to get the stack trace printed. The two
>      header lines beginning with "The system is out of resources"
>      probably will be cut off. Anyway, that would be better than
>      nothing. Can you please retest? In Maven, that would go like this
>      (fragmentary POM):
> 
> <properties>
>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
> </properties>
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>3.12.0</version>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-api</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-manager</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-javac</artifactId>
>       <version>${plexusCompilerVersion}</version>
>       <scope>runtime</scope>
>     </dependency>
>   </dependencies>
> </plugin>
> 
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h=isWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E=&u=https://clicktime.symantec.com/15t5ejaoBdG3n3Nk8C4vS?h=lY-QL6rWusTeyzIz0RujRgAvrvPPWo66hf-ZSgB36q4=&u=https://scrum-master.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15t64tZDUhg1qmWMqz4fY?h=xQz5jFfHOpTwgvomCCOKiUOghFNoKoT-k2ij7fprQZo=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15t5z4Mw25zRRpgSJRfWv?h=CuC3-L57ZWBl-bFOridRR-v_htBUveAVT2oFXLDyBBo=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://clicktime.symantec.com/15t5jZn5eEweBzCffkU54?h=9tEpCyq0ayl9xwFLaJtiszVHnyT6Ln6Fr4kFI_vkmss=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: https://clicktime.symantec.com/15t5ZuPWj1aTN6Ypadfmp?h=lQBXfcQrYNBladUaOqeg9VI44VBdfVZNfC0hpARg4v4=&u=http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://clicktime.symantec.com/15t5pPyN6rdEbw2bDJsDg?h=uysNfMEe75RdcM2d4XzbbO3G4cbCuG9XmN9u4rVSels=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://clicktime.symantec.com/15t5uEAeZUJq1srWksGNJ?h=xxFgXFXqBddyzfoD9p38VoTH0R51ogdjQuaVVkvmdgU=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: Unexpected behavior of the javadoc plugin?

Posted by Tamás Cservenák <ta...@cservenak.net>.
Hej Ceki,

Nils is right, all the elements of BOM are ignored but the depMgt.
So what you "pollute" are those extra handfuls of bytes that consumers
download, only to toss them away.
So this is not a problem IMHO.

Thanks
T


On Tue, Jan 9, 2024 at 12:34 AM Nils Breunese <ni...@breun.nl> wrote:

> <build> or <plugin> elements are not imported when a project imports a BOM
> with <scope>import</scope>, only <dependencyManagement> is imported.
>
> Other elements only get inherited when a project uses another project as a
> parent.
>
> > Op 8 jan 2024, om 20:57 heeft Ceki Gulcu <ce...@qos.ch.INVALID> het
> volgende geschreven:
> >
> > Hi Tamás,
> >
> > Thank you for your comments.
> >
> > My question is more regarding the need to place a javadoc <plugin>
> > element in the BOM file, i.e top level pom.xml, instead of
> parent/pom.xml.
> >
> > Once the javadoc related <plugin> element is in the BOM file, it works
> fine.
> >
> > However, given the BOM file is intended to be imported, I would prefer
> > to keep it minimal and have it free of any <build> and <plugin> elements
> > in order to not pollute importing projects.
> >
> > Is my concern warranted?
> >
> > --
> > Ceki Gülcü
> >
> > Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
> >
> > On 12/28/2023 7:17 PM, Tamás Cservenák wrote:
> >> Hej Ceki,
> >>
> >> I also experience javadoc misbehaviour when JPMS/jigsaw is involved,
> and _I
> >> think_ it boils down when it tries to be "smart" when it comes to
> JPMS...
> >> See master of maven-resolver, as it was suffering with similar issues,
> and
> >> this change:
> >>
> https://github.com/apache/maven-resolver/commit/baac2975488adf630c02141b882d1459d8c66fae
> >> (that was a few releases ago, things may have changed around).
> >>
> >> Try out this flag if you are on fairly new version:
> >>
> https://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-mojo.html#legacymode
> >>
> >> HTH
> >> Tamas
> >>
> >> On Thu, Dec 28, 2023 at 7:04 PM Ceki Gulcu <ce...@qos.ch.invalid> wrote:
> >>
> >>>
> >>> Hello all,
> >>>
> >>> Given the javadoc generation is an important part of software projects,
> >>> maybe someone would care to comment whether the behavior described
> below
> >>> is expected or not?
> >>>
> >>> In the meantime, happy new year to all,
> >>>
> >>> --
> >>> Ceki Gülcü
> >>>
> >>> Sponsoring SLF4J/logback/reload4j at
> https://github.com/sponsors/qos-ch
> >>>
> >>> On 12/23/2023 9:34 PM, Ceki Gulcu wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> I would like to share what looks to me like an unexpected behavior of
> >>>> the javadoc plugin, more specifically when run as javadoc:aggregate.
> >>>>
> >>>>
> >>>> The SLF4J project uses the "Refining the BOM Pattern" variant as
> >>>> explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
> >>>> specifically, the top level pom.xml is the BOM and project modules
> >>>> import ../parent/pom.xml.
> >>>>
> >>>> Source code is available at [2].
> >>>>
> >>>> Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized
> >>> project.
> >>>>
> >>>> When trying to create aggregated javadocs with the javadoc:aggreate
> >>>> command, the javadoc generation would fail with javadoc complaining
> >>>> about unnamed modules and other miscellaneous problems. The solution
> was
> >>>> to skip certain modules for which there was no need to generate
> javadocs
> >>>> to begin with.
> >>>>
> >>>> Surprisingly, adding <skippedModules> in parent/pom.xml of the
> >>>> javdoc-plugin configuration would have no effect. However, specifying
> >>>> -Dmaven.javadoc.skippedModules would work as expected.
> >>>>
> >>>> The advice commonly found on various forum about the placement of the
> >>>> javadoc plugin configuration pertain to <reporting> and/or <build>
> >>>> section. In my case, this advice looks irrelevant (see below).
> >>>>
> >>>> After a lot of head scratching, placing the javadoc-plugin
> configuration
> >>>> in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
> >>>> configuration have the desired effect. This is quite surprising as the
> >>>> configuration of other plugins have an effect when placed in
> >>> parent/pom.xml.
> >>>>
> >>>> To reproduce this behavior, you can check out the code of the SLF4J
> >>>> project from [2] and run "mvn javadoc:aggregate". (To observe a
> failure
> >>>> the javadoc-plugin configuration needs to commented out in top-level
> >>>> pom.xml and uncommented in parent/pom.xml before running "mvn
> >>>> javadoc:aggregate".)
> >>>>
> >>>> I am wondering whether the behavior of javadoc:aggregate described
> above
> >>>> is expected or actually a problem?
> >>>>
> >>>> Best regards,
> >>>>
> >>>> [1]
> >>> https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
> >>>> [2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Unexpected behavior of the javadoc plugin?

Posted by Nils Breunese <ni...@breun.nl>.
<build> or <plugin> elements are not imported when a project imports a BOM with <scope>import</scope>, only <dependencyManagement> is imported.

Other elements only get inherited when a project uses another project as a parent.

> Op 8 jan 2024, om 20:57 heeft Ceki Gulcu <ce...@qos.ch.INVALID> het volgende geschreven:
> 
> Hi Tamás,
> 
> Thank you for your comments.
> 
> My question is more regarding the need to place a javadoc <plugin>
> element in the BOM file, i.e top level pom.xml, instead of parent/pom.xml.
> 
> Once the javadoc related <plugin> element is in the BOM file, it works fine.
> 
> However, given the BOM file is intended to be imported, I would prefer
> to keep it minimal and have it free of any <build> and <plugin> elements
> in order to not pollute importing projects.
> 
> Is my concern warranted?
> 
> -- 
> Ceki Gülcü
> 
> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
> 
> On 12/28/2023 7:17 PM, Tamás Cservenák wrote:
>> Hej Ceki,
>> 
>> I also experience javadoc misbehaviour when JPMS/jigsaw is involved, and _I
>> think_ it boils down when it tries to be "smart" when it comes to JPMS...
>> See master of maven-resolver, as it was suffering with similar issues, and
>> this change:
>> https://github.com/apache/maven-resolver/commit/baac2975488adf630c02141b882d1459d8c66fae
>> (that was a few releases ago, things may have changed around).
>> 
>> Try out this flag if you are on fairly new version:
>> https://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-mojo.html#legacymode
>> 
>> HTH
>> Tamas
>> 
>> On Thu, Dec 28, 2023 at 7:04 PM Ceki Gulcu <ce...@qos.ch.invalid> wrote:
>> 
>>> 
>>> Hello all,
>>> 
>>> Given the javadoc generation is an important part of software projects,
>>> maybe someone would care to comment whether the behavior described below
>>> is expected or not?
>>> 
>>> In the meantime, happy new year to all,
>>> 
>>> --
>>> Ceki Gülcü
>>> 
>>> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
>>> 
>>> On 12/23/2023 9:34 PM, Ceki Gulcu wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> I would like to share what looks to me like an unexpected behavior of
>>>> the javadoc plugin, more specifically when run as javadoc:aggregate.
>>>> 
>>>> 
>>>> The SLF4J project uses the "Refining the BOM Pattern" variant as
>>>> explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
>>>> specifically, the top level pom.xml is the BOM and project modules
>>>> import ../parent/pom.xml.
>>>> 
>>>> Source code is available at [2].
>>>> 
>>>> Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized
>>> project.
>>>> 
>>>> When trying to create aggregated javadocs with the javadoc:aggreate
>>>> command, the javadoc generation would fail with javadoc complaining
>>>> about unnamed modules and other miscellaneous problems. The solution was
>>>> to skip certain modules for which there was no need to generate javadocs
>>>> to begin with.
>>>> 
>>>> Surprisingly, adding <skippedModules> in parent/pom.xml of the
>>>> javdoc-plugin configuration would have no effect. However, specifying
>>>> -Dmaven.javadoc.skippedModules would work as expected.
>>>> 
>>>> The advice commonly found on various forum about the placement of the
>>>> javadoc plugin configuration pertain to <reporting> and/or <build>
>>>> section. In my case, this advice looks irrelevant (see below).
>>>> 
>>>> After a lot of head scratching, placing the javadoc-plugin configuration
>>>> in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
>>>> configuration have the desired effect. This is quite surprising as the
>>>> configuration of other plugins have an effect when placed in
>>> parent/pom.xml.
>>>> 
>>>> To reproduce this behavior, you can check out the code of the SLF4J
>>>> project from [2] and run "mvn javadoc:aggregate". (To observe a failure
>>>> the javadoc-plugin configuration needs to commented out in top-level
>>>> pom.xml and uncommented in parent/pom.xml before running "mvn
>>>> javadoc:aggregate".)
>>>> 
>>>> I am wondering whether the behavior of javadoc:aggregate described above
>>>> is expected or actually a problem?
>>>> 
>>>> Best regards,
>>>> 
>>>> [1]
>>> https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
>>>> [2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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
> 


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


Re: Unexpected behavior of the javadoc plugin?

Posted by Ceki Gulcu <ce...@qos.ch.INVALID>.
Hi Tamás,

Thank you for your comments.

My question is more regarding the need to place a javadoc <plugin>
element in the BOM file, i.e top level pom.xml, instead of parent/pom.xml.

Once the javadoc related <plugin> element is in the BOM file, it works fine.

However, given the BOM file is intended to be imported, I would prefer
to keep it minimal and have it free of any <build> and <plugin> elements
in order to not pollute importing projects.

Is my concern warranted?

-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

On 12/28/2023 7:17 PM, Tamás Cservenák wrote:
> Hej Ceki,
> 
> I also experience javadoc misbehaviour when JPMS/jigsaw is involved, and _I
> think_ it boils down when it tries to be "smart" when it comes to JPMS...
> See master of maven-resolver, as it was suffering with similar issues, and
> this change:
> https://github.com/apache/maven-resolver/commit/baac2975488adf630c02141b882d1459d8c66fae
> (that was a few releases ago, things may have changed around).
> 
> Try out this flag if you are on fairly new version:
> https://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-mojo.html#legacymode
> 
> HTH
> Tamas
> 
> On Thu, Dec 28, 2023 at 7:04 PM Ceki Gulcu <ce...@qos.ch.invalid> wrote:
> 
>>
>> Hello all,
>>
>> Given the javadoc generation is an important part of software projects,
>> maybe someone would care to comment whether the behavior described below
>> is expected or not?
>>
>> In the meantime, happy new year to all,
>>
>> --
>> Ceki Gülcü
>>
>> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
>>
>> On 12/23/2023 9:34 PM, Ceki Gulcu wrote:
>>>
>>> Hello,
>>>
>>> I would like to share what looks to me like an unexpected behavior of
>>> the javadoc plugin, more specifically when run as javadoc:aggregate.
>>>
>>>
>>> The SLF4J project uses the "Refining the BOM Pattern" variant as
>>> explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
>>> specifically, the top level pom.xml is the BOM and project modules
>>> import ../parent/pom.xml.
>>>
>>> Source code is available at [2].
>>>
>>> Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized
>> project.
>>>
>>> When trying to create aggregated javadocs with the javadoc:aggreate
>>> command, the javadoc generation would fail with javadoc complaining
>>> about unnamed modules and other miscellaneous problems. The solution was
>>> to skip certain modules for which there was no need to generate javadocs
>>> to begin with.
>>>
>>> Surprisingly, adding <skippedModules> in parent/pom.xml of the
>>> javdoc-plugin configuration would have no effect. However, specifying
>>> -Dmaven.javadoc.skippedModules would work as expected.
>>>
>>> The advice commonly found on various forum about the placement of the
>>> javadoc plugin configuration pertain to <reporting> and/or <build>
>>> section. In my case, this advice looks irrelevant (see below).
>>>
>>> After a lot of head scratching, placing the javadoc-plugin configuration
>>> in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
>>> configuration have the desired effect. This is quite surprising as the
>>> configuration of other plugins have an effect when placed in
>> parent/pom.xml.
>>>
>>> To reproduce this behavior, you can check out the code of the SLF4J
>>> project from [2] and run "mvn javadoc:aggregate". (To observe a failure
>>> the javadoc-plugin configuration needs to commented out in top-level
>>> pom.xml and uncommented in parent/pom.xml before running "mvn
>>> javadoc:aggregate".)
>>>
>>> I am wondering whether the behavior of javadoc:aggregate described above
>>> is expected or actually a problem?
>>>
>>> Best regards,
>>>
>>> [1]
>> https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
>>> [2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x
>>>
>>
>> ---------------------------------------------------------------------
>> 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: Unexpected behavior of the javadoc plugin?

Posted by Tamás Cservenák <ta...@cservenak.net>.
Hej Ceki,

I also experience javadoc misbehaviour when JPMS/jigsaw is involved, and _I
think_ it boils down when it tries to be "smart" when it comes to JPMS...
See master of maven-resolver, as it was suffering with similar issues, and
this change:
https://github.com/apache/maven-resolver/commit/baac2975488adf630c02141b882d1459d8c66fae
(that was a few releases ago, things may have changed around).

Try out this flag if you are on fairly new version:
https://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-mojo.html#legacymode

HTH
Tamas

On Thu, Dec 28, 2023 at 7:04 PM Ceki Gulcu <ce...@qos.ch.invalid> wrote:

>
> Hello all,
>
> Given the javadoc generation is an important part of software projects,
> maybe someone would care to comment whether the behavior described below
> is expected or not?
>
> In the meantime, happy new year to all,
>
> --
> Ceki Gülcü
>
> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
>
> On 12/23/2023 9:34 PM, Ceki Gulcu wrote:
> >
> > Hello,
> >
> > I would like to share what looks to me like an unexpected behavior of
> > the javadoc plugin, more specifically when run as javadoc:aggregate.
> >
> >
> > The SLF4J project uses the "Refining the BOM Pattern" variant as
> > explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
> > specifically, the top level pom.xml is the BOM and project modules
> > import ../parent/pom.xml.
> >
> > Source code is available at [2].
> >
> > Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized
> project.
> >
> > When trying to create aggregated javadocs with the javadoc:aggreate
> > command, the javadoc generation would fail with javadoc complaining
> > about unnamed modules and other miscellaneous problems. The solution was
> > to skip certain modules for which there was no need to generate javadocs
> > to begin with.
> >
> > Surprisingly, adding <skippedModules> in parent/pom.xml of the
> > javdoc-plugin configuration would have no effect. However, specifying
> > -Dmaven.javadoc.skippedModules would work as expected.
> >
> > The advice commonly found on various forum about the placement of the
> > javadoc plugin configuration pertain to <reporting> and/or <build>
> > section. In my case, this advice looks irrelevant (see below).
> >
> > After a lot of head scratching, placing the javadoc-plugin configuration
> > in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
> > configuration have the desired effect. This is quite surprising as the
> > configuration of other plugins have an effect when placed in
> parent/pom.xml.
> >
> > To reproduce this behavior, you can check out the code of the SLF4J
> > project from [2] and run "mvn javadoc:aggregate". (To observe a failure
> > the javadoc-plugin configuration needs to commented out in top-level
> > pom.xml and uncommented in parent/pom.xml before running "mvn
> > javadoc:aggregate".)
> >
> > I am wondering whether the behavior of javadoc:aggregate described above
> > is expected or actually a problem?
> >
> > Best regards,
> >
> > [1]
> https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
> > [2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Unexpected behavior of the javadoc plugin?

Posted by Ceki Gulcu <ce...@qos.ch.INVALID>.
Hello all,

Given the javadoc generation is an important part of software projects,
maybe someone would care to comment whether the behavior described below
is expected or not?

In the meantime, happy new year to all,

-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

On 12/23/2023 9:34 PM, Ceki Gulcu wrote:
> 
> Hello,
> 
> I would like to share what looks to me like an unexpected behavior of
> the javadoc plugin, more specifically when run as javadoc:aggregate.
> 
> 
> The SLF4J project uses the "Refining the BOM Pattern" variant as
> explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
> specifically, the top level pom.xml is the BOM and project modules
> import ../parent/pom.xml.
> 
> Source code is available at [2].
> 
> Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized project.
> 
> When trying to create aggregated javadocs with the javadoc:aggreate
> command, the javadoc generation would fail with javadoc complaining
> about unnamed modules and other miscellaneous problems. The solution was
> to skip certain modules for which there was no need to generate javadocs
> to begin with.
> 
> Surprisingly, adding <skippedModules> in parent/pom.xml of the
> javdoc-plugin configuration would have no effect. However, specifying
> -Dmaven.javadoc.skippedModules would work as expected.
> 
> The advice commonly found on various forum about the placement of the
> javadoc plugin configuration pertain to <reporting> and/or <build>
> section. In my case, this advice looks irrelevant (see below).
> 
> After a lot of head scratching, placing the javadoc-plugin configuration
> in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
> configuration have the desired effect. This is quite surprising as the
> configuration of other plugins have an effect when placed in parent/pom.xml.
> 
> To reproduce this behavior, you can check out the code of the SLF4J
> project from [2] and run "mvn javadoc:aggregate". (To observe a failure
> the javadoc-plugin configuration needs to commented out in top-level
> pom.xml and uncommented in parent/pom.xml before running "mvn
> javadoc:aggregate".)
> 
> I am wondering whether the behavior of javadoc:aggregate described above
> is expected or actually a problem?
> 
> Best regards,
> 
> [1] https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
> [2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x
> 

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


Unexpected behavior of the javadoc plugin?

Posted by Ceki Gulcu <ce...@qos.ch.INVALID>.
Hello,

I would like to share what looks to me like an unexpected behavior of
the javadoc plugin, more specifically when run as javadoc:aggregate.


The SLF4J project uses the "Refining the BOM Pattern" variant as
explained in Garret Wilson's "Improving the BOM Pattern" [1]. More
specifically, the top level pom.xml is the BOM and project modules
import ../parent/pom.xml.

Source code is available at [2].

Also, version 2.1.0-alpha0-SNAPSHOT is a fully jigsaw modularized project.

When trying to create aggregated javadocs with the javadoc:aggreate
command, the javadoc generation would fail with javadoc complaining
about unnamed modules and other miscellaneous problems. The solution was
to skip certain modules for which there was no need to generate javadocs
to begin with.

Surprisingly, adding <skippedModules> in parent/pom.xml of the
javdoc-plugin configuration would have no effect. However, specifying
-Dmaven.javadoc.skippedModules would work as expected.

The advice commonly found on various forum about the placement of the
javadoc plugin configuration pertain to <reporting> and/or <build>
section. In my case, this advice looks irrelevant (see below).

After a lot of head scratching, placing the javadoc-plugin configuration
in the BOM, i.e. the top-level pom.xml, made the javadoc-plugin
configuration have the desired effect. This is quite surprising as the
configuration of other plugins have an effect when placed in parent/pom.xml.

To reproduce this behavior, you can check out the code of the SLF4J
project from [2] and run "mvn javadoc:aggregate". (To observe a failure
the javadoc-plugin configuration needs to commented out in top-level
pom.xml and uncommented in parent/pom.xml before running "mvn
javadoc:aggregate".)

I am wondering whether the behavior of javadoc:aggregate described above
is expected or actually a problem?

Best regards,

[1] https://www.garretwilson.com/blog/2023/06/14/improve-maven-bom-pattern
[2] https://github.com/qos-ch/slf4j/tree/branch_2.1.x

-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

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


Why does Plexus Compiler parse compiler output, when forked? (was: maven debugging frustrations)

Posted by Alexander Kriegisch <al...@kriegisch.name>.
> There's nothing that special about MY stack trace... just run javac on a
> largish module with a tiny heap.

Well, that is an abstract description, and instead of just sending one
or two stack traces, now you are burdening me with trying to reproduce
your problem without a reproducer. Do you think, that makes sense or is
particularly nice? I just wanted *any* example stack trace for this
error.

> In the meantime, I have a question. Why is maven in the business of
> trying to "parse" the output of javac? Why can't it give me its output
> verbatim, as if javac were a mysterious black box binary blob with
> totally unknown behaviour?

That is actually a good question. I was wondering about the same thing,
too. Let me remind you, I am not a maintainer or even have commit rights
on Plexus Compiler. I am a simple user, just like you, and last week
contributes a little patch for the very first time. The patch improved
something, it was not a rewrite.

Basically, all Plexus compilers (Javac, C#, AspectJ, Eclipse Java)
implement the same Compiler interface and even extend from the same
AbstractCompiler base class. No matter if they compile in process or out
of process, they are calle by Maven Compiler via interface method

CompilerResult Compiler.performCompile(CompilerConfiguration)
  throws CompilerException

I.e., they have to return a CompilerResult,and that one e.g. has a

List<CompilerMessage> getCompilerMessages()

method. I.e., Maven Compiler does not expect a dump of output and error
streams and a single result OK or failed, but a list of error messagesof
different kinds, such as errors, warnings, infos etc. When compiling out
of process (fork=true) instead of Java tools interface, the compiler
output must be parsed, which is a rather crude and imperfect heuristic
approach. Actually, it is amazing that it works as good as it does at
all. Simply running the forked compiler VM with a non-English locale can
make the difference between an error correctly identified or not,
because since at least JDK 8, there are 3 locales, since JDK 21 4
locales in OpenJDK.

I do not want to elaborate any further - you get the picture.

That in some cases, especially when the build fails for any reason, the
error message is not parsed out correctly, is exactly what needs
improvement and what was partly addressed by my patch, at least if a
stack trace happens to be part of the compiler output.

Cheers
-- 
Alexander Kriegisch
https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 23.12.2023 10:40 (GMT +07:00):

> There's nothing that special about MY stack trace... just run javac on a
> largish module with a tiny heap.
> (Our module was huge enough to fail with 800 megs, but there are plenty modules
> that will fail with 8 megs, let alone one meg.)
> Further, the exact stack trace is very sensitive to the exact amount of heap I
> give it; I tried varying it and it fails in totally different places.
> In fact, depending on the exact heap size, sometimes the stack trace doesn't go
> all the way back to main() and other times it does.
> I have no idea how to explain that last part... maybe depth is limited??
> I will try this again with new and improved plexus version and report back.
> In the meantime, I have a question.  Why is maven in the business of trying to
> "parse" the output of javac?
> Why can't it give me its output verbatim, as if javac were a mysterious black
> box binary blob with totally unknown behaviour?
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Friday, December 22, 2023 10:23 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
>>> How can I can find out EXACTLY how maven invoked javac, so I can 
>>> invoke it the same way?
> 
> I think, somebody already mentioned earlier that you can just activate debug
> output in Maven. Then search for the line following "Command line
> options":
> 
> $ mvn -X compile | grep --after-context 1 'Command line options'
> 
> [DEBUG] Command line options:
> [DEBUG] -d ...\target\classes -classpath ...
> src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8
> -source 1.8 -encoding UTF-8
> 
> Copy everything from the last line agter "[DEBUG] " and paste it right behind
> "javac ". That should be your exact command.
> 
>> Okay, I think I got it.  Here is the error I get when running with  
>> -J-Xmx800
>>
>> <snip warnings about using internal APIs> The system is out of 
>> resources.
>> Consult the following stack trace for details.
>> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
>> stack trace from the depths of javac>
> 
> Sorry to bother you again, but two more requests:
> 
>   1. Can you please paste more of the stack trace? That would make for a
>      good (as in realistic) unit or integration test.
> 
>   2. I think, my PR in the recently released Plexus Compiler 2.14.2
>      should at least enable you to get the stack trace printed. The two
>      header lines beginning with "The system is out of resources"
>      probably will be cut off. Anyway, that would be better than
>      nothing. Can you please retest? In Maven, that would go like this
>      (fragmentary POM):
> 
> <properties>
>   <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
> </properties>
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>3.12.0</version>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-api</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-manager</artifactId>
>       <version>${plexusCompilerVersion}</version>
>     </dependency>
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-compiler-javac</artifactId>
>       <version>${plexusCompilerVersion}</version>
>       <scope>runtime</scope>
>     </dependency>
>   </dependencies>
> </plugin>
> 
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h=isWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E=&u=https://scrum-master.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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 debugging frustrations

Posted by ma...@barclays.com.INVALID.
There's nothing that special about MY stack trace... just run javac on a largish module with a tiny heap.
(Our module was huge enough to fail with 800 megs, but there are plenty modules that will fail with 8 megs, let alone one meg.)
Further, the exact stack trace is very sensitive to the exact amount of heap I give it; I tried varying it and it fails in totally different places.
In fact, depending on the exact heap size, sometimes the stack trace doesn't go all the way back to main() and other times it does.
I have no idea how to explain that last part... maybe depth is limited??
I will try this again with new and improved plexus version and report back.
In the meantime, I have a question.  Why is maven in the business of trying to "parse" the output of javac?
Why can't it give me its output verbatim, as if javac were a mysterious black box binary blob with totally unknown behaviour?

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Friday, December 22, 2023 10:23 PM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
>> How can I can find out EXACTLY how maven invoked javac, so I can 
>> invoke it the same way?

I think, somebody already mentioned earlier that you can just activate debug output in Maven. Then search for the line following "Command line
options":

$ mvn -X compile | grep --after-context 1 'Command line options'

[DEBUG] Command line options:
[DEBUG] -d ...\target\classes -classpath ... src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8 -source 1.8 -encoding UTF-8

Copy everything from the last line agter "[DEBUG] " and paste it right behind "javac ". That should be your exact command.

> Okay, I think I got it.  Here is the error I get when running with  
> -J-Xmx800
>
> <snip warnings about using internal APIs> The system is out of 
> resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded <snip long 
> stack trace from the depths of javac>

Sorry to bother you again, but two more requests:

  1. Can you please paste more of the stack trace? That would make for a
     good (as in realistic) unit or integration test.

  2. I think, my PR in the recently released Plexus Compiler 2.14.2
     should at least enable you to get the stack trace printed. The two
     header lines beginning with "The system is out of resources"
     probably will be cut off. Anyway, that would be better than
     nothing. Can you please retest? In Maven, that would go like this
     (fragmentary POM):

<properties>
  <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
</properties>

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.12.0</version>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-api</artifactId>
      <version>${plexusCompilerVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-manager</artifactId>
      <version>${plexusCompilerVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-javac</artifactId>
      <version>${plexusCompilerVersion}</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</plugin>

--
Alexander Kriegisch
https://clicktime.symantec.com/15siFBaoYbM4wmfMjZKMr?h=isWwo2pYTjyI3SuGICAE9ZFT6R_DSWTZSKkBbg1NX0E=&u=https://scrum-master.de

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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: maven debugging frustrations

Posted by Alexander Kriegisch <al...@kriegisch.name>.
>> How can I can find out EXACTLY how maven invoked javac, so I can
>> invoke it the same way?

I think, somebody already mentioned earlier that you can just activate
debug output in Maven. Then search for the line following "Command line
options":

$ mvn -X compile | grep --after-context 1 'Command line options'

[DEBUG] Command line options:
[DEBUG] -d ...\target\classes -classpath ... src\main\java\org\example\Main.java -s ... -processor ... -g -target 1.8 -source 1.8 -encoding UTF-8

Copy everything from the last line agter "[DEBUG] " and paste it right
behind "javac ". That should be your exact command.

> Okay, I think I got it.  Here is the error I get when running with  -J-Xmx800
>
> <snip warnings about using internal APIs>
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
> <snip long stack trace from the depths of javac>

Sorry to bother you again, but two more requests:

  1. Can you please paste more of the stack trace? That would make for a
     good (as in realistic) unit or integration test.

  2. I think, my PR in the recently released Plexus Compiler 2.14.2
     should at least enable you to get the stack trace printed. The two
     header lines beginning with "The system is out of resources"
     probably will be cut off. Anyway, that would be better than
     nothing. Can you please retest? In Maven, that would go like this
     (fragmentary POM):

<properties>
  <plexusCompilerVersion>2.14.2</plexusCompilerVersion>
</properties>

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.12.0</version>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-api</artifactId>
      <version>${plexusCompilerVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-manager</artifactId>
      <version>${plexusCompilerVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-javac</artifactId>
      <version>${plexusCompilerVersion}</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</plugin>

-- 
Alexander Kriegisch
https://scrum-master.de

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


RE: maven debugging frustrations

Posted by ma...@barclays.com.INVALID.
Okay, I think I got it.  Here is the error I get when running with  -J-Xmx800
<snip warnings about using internal APIs>
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: GC overhead limit exceeded
<snip long stack trace from the depths of javac>

-----Original Message-----
From: mark.yagnatinsky@barclays.com.INVALID <ma...@barclays.com.INVALID> 
Sent: Friday, December 22, 2023 9:45 AM
To: users@maven.apache.org
Subject: RE: maven debugging frustrations


CAUTION: This email originated from outside our organisation - mark.yagnatinsky@barclays.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
How can I can find out EXACTLY how maven invoked javac, so I can invoke it the same way?
(While I await your response, I'll attempt to invoke it roughly the same way and see if that works.)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Thursday, December 21, 2023 8:45 PM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Mark, you asked for help here, now I am asking for your help to make Maven Compiler and Maven Plexus Java better. Can you please switch back to the too-low memory settings you used before and reproduce the javac error output when compiled outside Maven? Was it something as simple as:

$ javac -J-Xmx32k org/example/MySecondAnnotation.java
Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size

This would be silently swallowed even after my fix, because my fix was about stack trace parsing. It is, however, much more difficult to separate other JVM or javac error output from output possibly produced by e.g. annotation processors. It does not get easier, given the fact, that JVM output is localised to a handful of languages, not just English.

Or did you get some kind of out of memory error with a stack trace? The error parser for forked javac undoubtedly needs more hardening and improvements to at least parse (and display!) the most common error messages correctly. I scratched my own itch lately by contributing an improvement for the first time. Before I forget about the source code context again and move on to other projects, maybe I can contribute a little bit more. But then, I need input.

Thanks in advance and kind regards
--
Alexander Kriegisch
https://clicktime.symantec.com/15siQqy2D74kaQgWiyWS2?h=K9eKgEK3KMNDQERT1qp6hASj2Lxz71_qkmqF5v0_ueU=&u=https://clicktime.symantec.com/15t64tYyoA1WdgmTZsmn2?h=I98HUPo0DHKTqOkdZ1TN4skRFZCJraqV71xYi96Hcs0=&u=https://scrum-master.de

mark.yagnatinsky@barclays.com.INVALID schrieb am 21.12.2023 23:43 (GMT +07:00):

> Forked: yes
> Other questions: didn't check, because using a bigger heap ("maxmem") fixed it.
> But thanks for this, that looks like it would have helped us!
> (in a hypothetical world where that PR was merged ten years earlier) 
> (We're mostly using version 3.8 of maven-compiler-plugin...perhaps 
> it's time to
> upgrade.)
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name>
> Sent: Wednesday, December 20, 2023 12:41 AM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation - 
> alexander@kriegisch.name Do not click on links, open attachments, or 
> respond unless you recognize the sender and can validate the content is safe.
> Hello Mark.
> 
> Feel free to let me know if your situation is as follows:
>   -- forked build (i.e. not in process)
>   -- when disabling the fork and enabling "-e" or running the build with
>      javac directly outside of Maven, suddenly error messages appear at
>      the end of the build
>   -- optionally (not necessarily) using a JDK locale other than English
>      (e.g. javac in JDK 21 comes with localised messages in Chinese,
>      Japanese, German)
>   -- optionally (not necessarily) using an annotation processor
> 
> I recently had the symptom of build errors with forked compiler 
> swallowing error messages and scratched my own itch by adding a PR to 
> Plexus Javac which for me solves the problem. If your problem happens 
> to be the same category, you would be the perfect sentient test 
> particle for https://clicktime.symantec.com/15t5ejaZW5bYZxdqr5n2v?h=L374vY2E9JSjErAq9vkYZyMzPS76MKSF_SWNxb51rVE=&u=https://clicktime.symantec.com/15siFBZrUArbTHh6FWx5d?h%3D_vziVdl8fIA-_du7fPQDmEDaVPK6D7XlieIqn88Lnv0%3D%26u%3Dhttps://clicktime.symantec.com/15siL1mjkVPAATrbBR7HQ?h%3DsoRGieRSYIcaVDaMRpuEKiTr-X0PEnOQaKTTUdxCkog%3D%26u%3Dhttps://github.com/codehaus-plexus/plexus-compiler/pull/337.
> I can advise you how to get that running in your project.
> 
> Regards
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15t5jZmqxhH8yuTmPeBBY?h=wp1fqXetHhmLNKfUOtcHtbgzJiXdEB-XVpPIvdPgMYY=&u=https://clicktime.symantec.com/15siL1m8vnYBsEX1o5MEF?h%3DEIrFDp-q7MAJaGl
> zS3rT2Qpp_OrLzsXNXIASmesIlO4=&u=https://clicktime.symantec.com/15t5pPy8RJxjPrHgwCaLA?h=_lizuUKfsYIKAcM-Pa5yTH6dfcc0ASbjc7Bu0Yq5xFI=&u=https://clicktime.symantec.com/15siQqy
> 2D74kaQgWiyWS2?h=K9eKgEK3KMNDQERT1qp6hASj2Lxz71_qkmqF5v0_ueU=&u=https:
> //scrum-master.de
> 
> 
> mark.yagnatinsky@barclays.com.INVALID schrieb am 20.12.2023 05:27 (GMT +07:00):
> 
>> Indeed, if there were ACTUAL error messages from the java compiler, 
>> this would be far less mysterious :) The trouble is that there are 
>> NOT any error messages coming from the Java compiler. There are a few 
>> warnings (from javac), followed soon after by "Compilation failure"
>> (from maven, NOT from javac)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service, nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is intended for the 
> recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15sipzwSWBUie8p8SmWB8?h=m9dLh07WmQWDXYFhNfP3-MeGqwAfIhIFQONPqavCBec=&u=https://clicktime.symantec.com/15t6ehuy1TnfXJYvNnZpN?h=QzW1apxwezrSGejb1l1PGq2fJ2VEqwnONpg-dZ37YVc=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15t5z4MhLYKvDjwY2KNdQ?h=yqMI_xjzeoTF230ONAhuWrftiBjys4386zqGrTjw1PA=&u=https://clicktime.symantec.com/15sikAkA3Zo8EBzCuD72W?h%3D9fijqSv-cP3_fLA
> 82P9yVnpQaI-jKXIW3Iw9ROJlRkk=&u=https://clicktime.symantec.com/15t6V3XQ6ERUhQu5HfmX8?h=rAaU8vCFkrVHfEqzb_wmaJLeQjEQoWzgQ-3U4Swv0ZQ=&u=https://www.cib.barclays/disclosures/s
> ales-and-trading-disclaimer.html regarding marketing commentary from 
> Barclays Sales and/or Trading desks, who are active market 
> participants; 
> https://clicktime.symantec.com/15t5uEAQsveKoo7cUkyUn?h=yADx6WHIr_-zqEeX6f1LbAsyBuLaR-Ra5bFYCDKetpk=&u=https://clicktime.symantec.com/15siVgAJfikLzMWSGXuae?h%3DBVIRBfgjMqAle6X
> 4PoJKt1ITWBJCizki-XZO_1mQ2p4=&u=https://clicktime.symantec.com/15t69ikGFmh73dbP7SAve?h=tyAGurgq1be6qEqRXBMd9d9Y_0_uzDmNfcan5mHrMW8=&u=https://www.cib.barclays/disclosures/b
> arclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment 
> Bank where we trade with you in principal-to-principal wholesale 
> markets transactions; and in respect to Barclays Research, including 
> disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBaTHshZkX2fdri8n?h=r3kePnO0t7DFPXH05AU8SECF75SujMUzaS9_NwhNDrI=&u=https://clicktime.symantec.com/15t5ZuPH3TuxA1ovJXNtJ?h=1odndS_eh597rXzn00qaTvcBJKgr5egFitu-w1Q-Sd4=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________
> 
> If you are incorporated or operating in Australia, read these 
> important
> disclosures:
> https://clicktime.symantec.com/15siaWMb8LRwQJLMp6JjG?h=SYXtLFMlFZd9kA48wZugsd0Vajkhgo_5gxltfdkDC0c=&u=https://clicktime.symantec.com/15t6KP8qB14HsXFECYyDt?h=h1a_P3i8FG2868jYls8uEwnQiAcku_VeerPYe_dIydw=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice:
> https://clicktime.symantec.com/15sifLYsax7XpFAHMehst?h=s142BIKT_WRDjnuMhLSwVbzKbLJQLWoRw8qCThtaDf0=&u=https://clicktime.symantec.com/15t6QDL7dcjtHU59k7NNW?h=0Frf5nePg4q4ZQE-5xAJ8OXPcfiBTiTVWI8VaZx4F5g=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
> ______________________________________________________________________
> ____________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15t6ehuy1TnfXJYvNnZpN?h=QzW1apxwezrSGejb1l1PGq2fJ2VEqwnONpg-dZ37YVc=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://clicktime.symantec.com/15t6ZsigYr757MizqEAfk?h=SwkoyvDXuTIOe8fqGe8GvC2VJj_MuT4hd6193Fkorf4=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15t6EYwYiPNhTaRJeza5G?h=iKqKjCj9mx2d5L840ghrI9ELFz5KHeK4lKcjepanrDU=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15t5ZuPH3TuxA1ovJXNtJ?h=1odndS_eh597rXzn00qaTvcBJKgr5egFitu-w1Q-Sd4=&u=http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://clicktime.symantec.com/15t6KP8qB14HsXFECYyDt?h=h1a_P3i8FG2868jYls8uEwnQiAcku_VeerPYe_dIydw=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://clicktime.symantec.com/15t6QDL7dcjtHU59k7NNW?h=0Frf5nePg4q4ZQE-5xAJ8OXPcfiBTiTVWI8VaZx4F5g=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

RE: maven debugging frustrations

Posted by ma...@barclays.com.INVALID.
How can I can find out EXACTLY how maven invoked javac, so I can invoke it the same way?
(While I await your response, I'll attempt to invoke it roughly the same way and see if that works.)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Thursday, December 21, 2023 8:45 PM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Mark, you asked for help here, now I am asking for your help to make Maven Compiler and Maven Plexus Java better. Can you please switch back to the too-low memory settings you used before and reproduce the javac error output when compiled outside Maven? Was it something as simple as:

$ javac -J-Xmx32k org/example/MySecondAnnotation.java
Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size

This would be silently swallowed even after my fix, because my fix was about stack trace parsing. It is, however, much more difficult to separate other JVM or javac error output from output possibly produced by e.g. annotation processors. It does not get easier, given the fact, that JVM output is localised to a handful of languages, not just English.

Or did you get some kind of out of memory error with a stack trace? The error parser for forked javac undoubtedly needs more hardening and improvements to at least parse (and display!) the most common error messages correctly. I scratched my own itch lately by contributing an improvement for the first time. Before I forget about the source code context again and move on to other projects, maybe I can contribute a little bit more. But then, I need input.

Thanks in advance and kind regards
--
Alexander Kriegisch
https://clicktime.symantec.com/15siQqy2D74kaQgWiyWS2?h=K9eKgEK3KMNDQERT1qp6hASj2Lxz71_qkmqF5v0_ueU=&u=https://scrum-master.de

mark.yagnatinsky@barclays.com.INVALID schrieb am 21.12.2023 23:43 (GMT +07:00):

> Forked: yes
> Other questions: didn't check, because using a bigger heap ("maxmem") fixed it.
> But thanks for this, that looks like it would have helped us!
> (in a hypothetical world where that PR was merged ten years earlier) 
> (We're mostly using version 3.8 of maven-compiler-plugin...perhaps 
> it's time to
> upgrade.)
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name>
> Sent: Wednesday, December 20, 2023 12:41 AM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation - 
> alexander@kriegisch.name Do not click on links, open attachments, or 
> respond unless you recognize the sender and can validate the content is safe.
> Hello Mark.
> 
> Feel free to let me know if your situation is as follows:
>   -- forked build (i.e. not in process)
>   -- when disabling the fork and enabling "-e" or running the build with
>      javac directly outside of Maven, suddenly error messages appear at
>      the end of the build
>   -- optionally (not necessarily) using a JDK locale other than English
>      (e.g. javac in JDK 21 comes with localised messages in Chinese,
>      Japanese, German)
>   -- optionally (not necessarily) using an annotation processor
> 
> I recently had the symptom of build errors with forked compiler 
> swallowing error messages and scratched my own itch by adding a PR to 
> Plexus Javac which for me solves the problem. If your problem happens 
> to be the same category, you would be the perfect sentient test 
> particle for https://clicktime.symantec.com/15siFBZrUArbTHh6FWx5d?h=_vziVdl8fIA-_du7fPQDmEDaVPK6D7XlieIqn88Lnv0=&u=https://clicktime.symantec.com/15siL1mjkVPAATrbBR7HQ?h=soRGieRSYIcaVDaMRpuEKiTr-X0PEnOQaKTTUdxCkog=&u=https://github.com/codehaus-plexus/plexus-compiler/pull/337.
> I can advise you how to get that running in your project.
> 
> Regards
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siL1m8vnYBsEX1o5MEF?h=EIrFDp-q7MAJaGl
> zS3rT2Qpp_OrLzsXNXIASmesIlO4=&u=https://clicktime.symantec.com/15siQqy
> 2D74kaQgWiyWS2?h=K9eKgEK3KMNDQERT1qp6hASj2Lxz71_qkmqF5v0_ueU=&u=https:
> //scrum-master.de
> 
> 
> mark.yagnatinsky@barclays.com.INVALID schrieb am 20.12.2023 05:27 (GMT +07:00):
> 
>> Indeed, if there were ACTUAL error messages from the java compiler, 
>> this would be far less mysterious :) The trouble is that there are 
>> NOT any error messages coming from the Java compiler. There are a few 
>> warnings (from javac), followed soon after by "Compilation failure"
>> (from maven, NOT from javac)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service, nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is intended for the 
> recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15sipzwSWBUie8p8SmWB8?h=m9dLh07WmQWDXYFhNfP3-MeGqwAfIhIFQONPqavCBec=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://clicktime.symantec.com/15sikAkA3Zo8EBzCuD72W?h=9fijqSv-cP3_fLA
> 82P9yVnpQaI-jKXIW3Iw9ROJlRkk=&u=https://www.cib.barclays/disclosures/s
> ales-and-trading-disclaimer.html regarding marketing commentary from 
> Barclays Sales and/or Trading desks, who are active market 
> participants; 
> https://clicktime.symantec.com/15siVgAJfikLzMWSGXuae?h=BVIRBfgjMqAle6X
> 4PoJKt1ITWBJCizki-XZO_1mQ2p4=&u=https://www.cib.barclays/disclosures/b
> arclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment 
> Bank where we trade with you in principal-to-principal wholesale 
> markets transactions; and in respect to Barclays Research, including 
> disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBaTHshZkX2fdri8n?h=r3kePnO0t7DFPXH05AU8SECF75SujMUzaS9_NwhNDrI=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________
> 
> If you are incorporated or operating in Australia, read these 
> important
> disclosures:
> https://clicktime.symantec.com/15siaWMb8LRwQJLMp6JjG?h=SYXtLFMlFZd9kA48wZugsd0Vajkhgo_5gxltfdkDC0c=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice:
> https://clicktime.symantec.com/15sifLYsax7XpFAHMehst?h=s142BIKT_WRDjnuMhLSwVbzKbLJQLWoRw8qCThtaDf0=&u=https://www.cib.barclays/disclosures/personal-information-use.html. 
> ______________________________________________________________________
> ____________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

Re: maven debugging frustrations

Posted by Alexander Kriegisch <al...@kriegisch.name>.
Mark, you asked for help here, now I am asking for your help to make
Maven Compiler and Maven Plexus Java better. Can you please switch back
to the too-low memory settings you used before and reproduce the javac
error output when compiled outside Maven? Was it something as simple as:

$ javac -J-Xmx32k org/example/MySecondAnnotation.java 
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

This would be silently swallowed even after my fix, because my fix was
about stack trace parsing. It is, however, much more difficult to
separate other JVM or javac error output from output possibly produced
by e.g. annotation processors. It does not get easier, given the fact,
that JVM output is localised to a handful of languages, not just
English.

Or did you get some kind of out of memory error with a stack trace? The
error parser for forked javac undoubtedly needs more hardening and
improvements to at least parse (and display!) the most common error
messages correctly. I scratched my own itch lately by contributing an
improvement for the first time. Before I forget about the source code
context again and move on to other projects, maybe I can contribute a
little bit more. But then, I need input.

Thanks in advance and kind regards
-- 
Alexander Kriegisch
https://scrum-master.de

mark.yagnatinsky@barclays.com.INVALID schrieb am 21.12.2023 23:43 (GMT +07:00):

> Forked: yes
> Other questions: didn't check, because using a bigger heap ("maxmem") fixed it.
> But thanks for this, that looks like it would have helped us!
> (in a hypothetical world where that PR was merged ten years earlier)
> (We're mostly using version 3.8 of maven-compiler-plugin...perhaps it's time to
> upgrade.)
> 
> -----Original Message-----
> From: Alexander Kriegisch <al...@kriegisch.name> 
> Sent: Wednesday, December 20, 2023 12:41 AM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation -
> alexander@kriegisch.name Do not click on links, open attachments, or respond
> unless you recognize the sender and can validate the content is safe.
> Hello Mark.
> 
> Feel free to let me know if your situation is as follows:
>   -- forked build (i.e. not in process)
>   -- when disabling the fork and enabling "-e" or running the build with
>      javac directly outside of Maven, suddenly error messages appear at
>      the end of the build
>   -- optionally (not necessarily) using a JDK locale other than English
>      (e.g. javac in JDK 21 comes with localised messages in Chinese,
>      Japanese, German)
>   -- optionally (not necessarily) using an annotation processor
> 
> I recently had the symptom of build errors with forked compiler swallowing
> error messages and scratched my own itch by adding a PR to Plexus Javac which
> for me solves the problem. If your problem happens to be the same category, you
> would be the perfect sentient test particle for
> https://clicktime.symantec.com/15siFBZrUArbTHh6FWx5d?h=_vziVdl8fIA-_du7fPQDmEDaVPK6D7XlieIqn88Lnv0=&u=https://github.com/codehaus-plexus/plexus-compiler/pull/337.
> I can advise you how to get that running in your project.
> 
> Regards
> --
> Alexander Kriegisch
> https://clicktime.symantec.com/15siL1m8vnYBsEX1o5MEF?h=EIrFDp-q7MAJaGlzS3rT2Qpp_OrLzsXNXIASmesIlO4=&u=https://scrum-master.de
> 
> 
> mark.yagnatinsky@barclays.com.INVALID schrieb am 20.12.2023 05:27 (GMT +07:00):
> 
>> Indeed, if there were ACTUAL error messages from the java compiler,
>> this would be far less mysterious :) The trouble is that there are NOT
>> any error messages coming from the Java compiler. There are a few
>> warnings (from javac), followed soon after by "Compilation failure"
>> (from maven, NOT from javac)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed at
> retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 
> 
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks, who
> are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank where
> we trade with you in principal-to-principal wholesale markets transactions; and
> in respect to Barclays Research, including disclosures relating to specific
> issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
> 
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice:
> https://www.cib.barclays/disclosures/personal-information-use.html. 
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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 debugging frustrations

Posted by ma...@barclays.com.INVALID.
Forked: yes
Other questions: didn't check, because using a bigger heap ("maxmem") fixed it.
But thanks for this, that looks like it would have helped us!
(in a hypothetical world where that PR was merged ten years earlier)
(We're mostly using version 3.8 of maven-compiler-plugin...perhaps it's time to upgrade.)

-----Original Message-----
From: Alexander Kriegisch <al...@kriegisch.name> 
Sent: Wednesday, December 20, 2023 12:41 AM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - alexander@kriegisch.name Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Hello Mark.

Feel free to let me know if your situation is as follows:
  -- forked build (i.e. not in process)
  -- when disabling the fork and enabling "-e" or running the build with
     javac directly outside of Maven, suddenly error messages appear at
     the end of the build
  -- optionally (not necessarily) using a JDK locale other than English
     (e.g. javac in JDK 21 comes with localised messages in Chinese,
     Japanese, German)
  -- optionally (not necessarily) using an annotation processor

I recently had the symptom of build errors with forked compiler swallowing error messages and scratched my own itch by adding a PR to Plexus Javac which for me solves the problem. If your problem happens to be the same category, you would be the perfect sentient test particle for https://clicktime.symantec.com/15siFBZrUArbTHh6FWx5d?h=_vziVdl8fIA-_du7fPQDmEDaVPK6D7XlieIqn88Lnv0=&u=https://github.com/codehaus-plexus/plexus-compiler/pull/337. I can advise you how to get that running in your project.

Regards
--
Alexander Kriegisch
https://clicktime.symantec.com/15siL1m8vnYBsEX1o5MEF?h=EIrFDp-q7MAJaGlzS3rT2Qpp_OrLzsXNXIASmesIlO4=&u=https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 20.12.2023 05:27 (GMT +07:00):

> Indeed, if there were ACTUAL error messages from the java compiler,
> this would be far less mysterious :) The trouble is that there are NOT
> any error messages coming from the Java compiler. There are a few
> warnings (from javac), followed soon after by "Compilation failure"
> (from maven, NOT from javac)

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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: maven debugging frustrations

Posted by Alexander Kriegisch <al...@kriegisch.name>.
Hello Mark.

Feel free to let me know if your situation is as follows:
  -- forked build (i.e. not in process)
  -- when disabling the fork and enabling "-e" or running the build with
     javac directly outside of Maven, suddenly error messages appear at
     the end of the build
  -- optionally (not necessarily) using a JDK locale other than English
     (e.g. javac in JDK 21 comes with localised messages in Chinese,
     Japanese, German)
  -- optionally (not necessarily) using an annotation processor

I recently had the symptom of build errors with forked compiler
swallowing error messages and scratched my own itch by adding a PR to
Plexus Javac which for me solves the problem. If your problem happens to
be the same category, you would be the perfect sentient test particle
for https://github.com/codehaus-plexus/plexus-compiler/pull/337. I can
advise you how to get that running in your project.

Regards
-- 
Alexander Kriegisch
https://scrum-master.de


mark.yagnatinsky@barclays.com.INVALID schrieb am 20.12.2023 05:27 (GMT +07:00):

> Indeed, if there were ACTUAL error messages from the java compiler,
> this would be far less mysterious :) The trouble is that there are NOT
> any error messages coming from the Java compiler. There are a few
> warnings (from javac), followed soon after by "Compilation failure"
> (from maven, NOT from javac)

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


RE: maven debugging frustrations

Posted by ma...@barclays.com.INVALID.
Indeed, if there were ACTUAL error messages from the java compiler, this would be far less mysterious :)
The trouble is that there are NOT any error messages coming from the Java compiler.
There are a few warnings (from javac), followed soon after by "Compilation failure" (from maven, NOT from javac)
I do not recommend feeling my maven-based pain :)
But if you happen to know where to get some pain relief, I'd love to know

-----Original Message-----
From: Tomo Suzuki <su...@google.com.INVALID> 
Sent: Tuesday, December 19, 2023 5:18 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - suztomo@google.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
What’s the exact error messages?

(Maybe I’m too old to feel your pain)  If you use Java, you need to know what compilation means (converting Java code to Java bytecode). Your Maven invocation was telling it was failing due to some error messages.

On Tue, Dec 19, 2023 at 16:57 <ma...@barclays.com.invalid> wrote:

> When my Java code does something I didn't expect, I can run it under a 
> debugger and step through it line by line until things make sense again.
> When maven does something I didn't expect, my debugging strategy is 
> usually more like "try to think of something in my bag of tricks".
> Sometimes I suddenly have an epiphany and I realize "oh, it must have 
> broken because of that thing I changed".
> But in the absence of epiphanies, I don't have any good ways to ask 
> maven to tell me what on earth is going on.
>
> Example from today: some is failing on our build server with 
> "Compilation failure".
> Looking at the build log, there are no compiler errors in sight.
> There are a few compiler warnings, and those seem to logged twice: 
> once at warning level, and then again at error level.
> It only fails on SOME (not all) of our build configs, even though our 
> configs are pretty darn similar to each other.
>
> So I'm left flailing around more or less at random (try compiling on a 
> different server!  Try copying the command line flags from the one 
> that work!  Etc.) What I actually want is for maven to give me some 
> CRUMB of visibility into what on earth is going wrong.
>
> I don't even know what "Compilation failure" actually means.
> Did some process exit with non-zero status?
> Did the process fail to launch in the first place?
> Maybe there is no extra process, and the compilation is taking place 
> in the same JVM that's running maven?
> If so, what went wrong?  Did an exception get thrown?  Something else?
>
> You get the idea.
>
>
> This message is for information purposes only. It is not a 
> recommendation, advice, offer or solicitation to buy or sell a product 
> or service, nor an official confirmation of any transaction. It is 
> directed at persons who are professionals and is intended for the 
> recipient(s) only. It is not directed at retail customers. This message is subject to the terms at:
> https://clicktime.symantec.com/15sifLYAwPjLHCtCgybKg?h=ANvnaYG630AR0f2GLplpUfGbAsle9xaoL2f-FF_ESsU=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
> For important disclosures, please see:
> https://clicktime.symantec.com/15siaWLtUn3jsG4H9RCB4?h=M6FIGRVBH8G_LIh
> m9t5V7SPthNcb5IVYLL7498zEnzg=&u=https://www.cib.barclays/disclosures/s
> ales-and-trading-disclaimer.html regarding marketing commentary from 
> Barclays Sales and/or Trading desks, who are active market 
> participants; 
> https://clicktime.symantec.com/15siL1m36vzxdRaWWjzjC?h=G7ajSU4AyuCbxlw
> vIlksn83RCALP2_zHmu0XbnqwDpE=&u=https://www.cib.barclays/disclosures/b
> arclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment 
> Bank where we trade with you in principal-to-principal wholesale 
> markets transactions; and in respect to Barclays Research, including 
> disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBZkeKKNDUkayBbaa?h=G2aTqP2GUKb-ZJb3VDe2qGDqjn4glmlwiYEU-U9Qp08=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________
>
> If you are incorporated or operating in Australia, read these 
> important
> disclosures:
> https://clicktime.symantec.com/15siQqxKZYgZ3NQS4JPsp?h=_wyBE5fSRVnrjCX
> _RdiyqX2Tzqlr_fF2jEBUkk9zsjg=&u=https://www.cib.barclays/disclosures/i
> mportant-disclosures-asia-pacific.html
> .
>
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy
> notice: https://clicktime.symantec.com/15siVg9c2AN9TKEMbro2S?h=YTZNN6svma8VJfLaKz8L06dizNzYH3spp4UdRQF7gVo=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
>
>
> ______________________________________________________________________
> ____________

This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

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

Re: maven debugging frustrations

Posted by Tomo Suzuki <su...@google.com.INVALID>.
What’s the exact error messages?

(Maybe I’m too old to feel your pain)  If you use Java, you need to know
what compilation means (converting Java code to Java bytecode). Your Maven
invocation was telling it was failing due to some error messages.

On Tue, Dec 19, 2023 at 16:57 <ma...@barclays.com.invalid> wrote:

> When my Java code does something I didn't expect, I can run it under a
> debugger and step through it line by line until things make sense again.
> When maven does something I didn't expect, my debugging strategy is
> usually more like "try to think of something in my bag of tricks".
> Sometimes I suddenly have an epiphany and I realize "oh, it must have
> broken because of that thing I changed".
> But in the absence of epiphanies, I don't have any good ways to ask maven
> to tell me what on earth is going on.
>
> Example from today: some is failing on our build server with "Compilation
> failure".
> Looking at the build log, there are no compiler errors in sight.
> There are a few compiler warnings, and those seem to logged twice: once at
> warning level, and then again at error level.
> It only fails on SOME (not all) of our build configs, even though our
> configs are pretty darn similar to each other.
>
> So I'm left flailing around more or less at random (try compiling on a
> different server!  Try copying the command line flags from the one that
> work!  Etc.)
> What I actually want is for maven to give me some CRUMB of visibility into
> what on earth is going wrong.
>
> I don't even know what "Compilation failure" actually means.
> Did some process exit with non-zero status?
> Did the process fail to launch in the first place?
> Maybe there is no extra process, and the compilation is taking place in
> the same JVM that's running maven?
> If so, what went wrong?  Did an exception get thrown?  Something else?
>
> You get the idea.
>
>
> This message is for information purposes only. It is not a recommendation,
> advice, offer or solicitation to buy or sell a product or service, nor an
> official confirmation of any transaction. It is directed at persons who are
> professionals and is intended for the recipient(s) only. It is not directed
> at retail customers. This message is subject to the terms at:
> https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>
> For important disclosures, please see:
> https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html
> regarding marketing commentary from Barclays Sales and/or Trading desks,
> who are active market participants;
> https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html
> regarding our standard terms for Barclays Corporate and Investment Bank
> where we trade with you in principal-to-principal wholesale markets
> transactions; and in respect to Barclays Research, including disclosures
> relating to specific issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
>
> If you are incorporated or operating in Australia, read these important
> disclosures:
> https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html
> .
>
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy
> notice: https://www.cib.barclays/disclosures/personal-information-use.html.
>
>
> __________________________________________________________________________________
>

RE: maven debugging frustrations

Posted by ma...@barclays.com.INVALID.
That last part sounds promising actually!  Sadly I'm not familiar with the maven source code but still the ability to set breakpoints sounds very tempting!

-----Original Message-----
From: Mark Eggers <it...@yahoo.com.INVALID> 
Sent: Tuesday, December 19, 2023 5:33 PM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - its_toasted@yahoo.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
I think the first two will help you compare what's working to what's not working.

The -X does generate a LOT of output. Use -l [filename] to catch it.

When you start reading it, you'll be able to ignore a lot of the chatter.

You can also set slf4j logging options on the command line to help things out. Check the following article:

https://clicktime.symantec.com/15siL1m3HxmqDsdB2xGsn?h=pTSjEkzIyhSak6-_loRKkflLxKxaJtib1-d32Un99qI=&u=https://www.baeldung.com/maven-logging

You might also play around with mvnDebug and attach an IDE to it. I've not tried this. The default port is 8000. It appears that you would then be able to set break points, etc.

. . . just my two cents
/mde/
On 12/19/2023 2:16 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
> Thanks, I've heard of all three; the first two don't seem like they'd help here.
> The third tends to spew junk and not useful stuff
> 
> -----Original Message-----
> From: Mark Eggers <it...@yahoo.com.INVALID>
> Sent: Tuesday, December 19, 2023 5:11 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation - its_toasted@yahoo.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
> Some commands that might help you get started:
> 
> What are you using to build the artifact
> ----------------------------------------------------
> mvn help:effective-pom
> mvn help:effective-pom -Dverbose
> 
> What artifacts are being brought in
> ----------------------------------------------
> mvn dependency:tree
> mvn dependency:tree -Dverbose
> 
> Debug output
> ------------------
> mvn -X package
> 
> I'm sure that there are more, but this might get you started.
> 
> . . . just my two cents
> /mde/
> 
> On 12/19/2023 1:56 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
>> When my Java code does something I didn't expect, I can run it under a debugger and step through it line by line until things make sense again.
>> When maven does something I didn't expect, my debugging strategy is usually more like "try to think of something in my bag of tricks".
>> Sometimes I suddenly have an epiphany and I realize "oh, it must have broken because of that thing I changed".
>> But in the absence of epiphanies, I don't have any good ways to ask maven to tell me what on earth is going on.
>>
>> Example from today: some is failing on our build server with "Compilation failure".
>> Looking at the build log, there are no compiler errors in sight.
>> There are a few compiler warnings, and those seem to logged twice: once at warning level, and then again at error level.
>> It only fails on SOME (not all) of our build configs, even though our configs are pretty darn similar to each other.
>>
>> So I'm left flailing around more or less at random (try compiling on 
>> a different server!  Try copying the command line flags from the one that work!  Etc.) What I actually want is for maven to give me some CRUMB of visibility into what on earth is going wrong.
>>
>> I don't even know what "Compilation failure" actually means.
>> Did some process exit with non-zero status?
>> Did the process fail to launch in the first place?
>> Maybe there is no extra process, and the compilation is taking place in the same JVM that's running maven?
>> If so, what went wrong?  Did an exception get thrown?  Something else?
>>
>> You get the idea.
>>
>>
>> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15t5z4LpKs5nXMa3HxmPT?h=ISgjwiKtVs_26S9D5WklDpkGWg5FN4KBfDXNiomU8xw=&u=https://clicktime.symantec.com/15sikAjTb3BoHbknkkGct?h=bfq-oC7O9ItW_Mf33WgCmqzZ-u30xQK5ACgIfxqYrkk=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>>
>> For important disclosures, please see: https://clicktime.symantec.com/15t5uE9XsFQC7Qk7kQNEq?h=GqPl7-MY2KIl75o5H8ob4oRWV5EdZOb-0TiUB8Oz1g8=&u=https://clicktime.symantec.com/15sifLYB8RWCsevsDBsUG?h=R5Z3ECCKXHBYaUVgMQkI0XUqyk0Oy3pqj5U8sC9k98A=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15t5ejZgVQMQsaGM7jAny?h=TSMoSLWLMSCFVE_msBvk3E-bNX152eJ1jQtsfE-VVu0=&u=https://clicktime.symantec.com/15siQqxKkaTRdpT6aWg2Q?h=uZcdOMvc9Sik-ZkAQBjE9wo3QHC8stxJiLo7C1ES_Mk=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15t5ZuNQ2nfpTdSRaAmeM?h=skuGBe0-9p6Q6bKdLkfmjGMNe-r_OrCz4yP_Du-cGJI=&u=https://clicktime.symantec.com/15siFBZkqM6EovoFVPsjA?h=nLw5F9u1RGIYob6LeLBN_C1IUYbiHeHSQL9c_qbCsL4=&u=http://publicresearch.barclays.com.
>> _____________________________________________________________________
>> _ ____________ If you are incorporated or operating in Australia, 
>> read these important disclosures: 
>> https://clicktime.symantec.com/15t5jZkxx231HX6GfHZwb?h=59l9AYOa74derd2shOK9ydN_NsfU5EV4DDyy0lC20Qk=&u=https://clicktime.symantec.com/15siVg9cDC923mH2855B2?h=suY2Y-Z_jEuYOK2C7X5MMhYv_dbM59aWobLr3z8upEQ=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
>> _____________________________________________________________________
>> _ ____________ For more details about how we use personal 
>> information, see our privacy notice: 
>> https://clicktime.symantec.com/15t5pPxFQdibhTvCCqy6D?h=M5qHmn-V09pHP54DC8CQtxPowDPpTqQn567A_MYEi38=&u=https://clicktime.symantec.com/15siaWLtfopcTi6wfdUKe?h=fboZxGBWWmcciiQY9DnZA_C53GnC6AKyWbFp8_qWFn8=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
>> _____________________________________________________________________
>> _
>> ____________
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15sikAjTb3BoHbknkkGct?h=bfq-oC7O9ItW_Mf33WgCmqzZ-u30xQK5ACgIfxqYrkk=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> 
> For important disclosures, please see: https://clicktime.symantec.com/15sifLYB8RWCsevsDBsUG?h=R5Z3ECCKXHBYaUVgMQkI0XUqyk0Oy3pqj5U8sC9k98A=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15siQqxKkaTRdpT6aWg2Q?h=uZcdOMvc9Sik-ZkAQBjE9wo3QHC8stxJiLo7C1ES_Mk=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15siFBZkqM6EovoFVPsjA?h=nLw5F9u1RGIYob6LeLBN_C1IUYbiHeHSQL9c_qbCsL4=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________ If you are incorporated or operating in Australia, read 
> these important disclosures: https://clicktime.symantec.com/15siVg9cDC923mH2855B2?h=suY2Y-Z_jEuYOK2C7X5MMhYv_dbM59aWobLr3z8upEQ=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice: https://clicktime.symantec.com/15siaWLtfopcTi6wfdUKe?h=fboZxGBWWmcciiQY9DnZA_C53GnC6AKyWbFp8_qWFn8=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
> ______________________________________________________________________
> ____________
> 
> ---------------------------------------------------------------------
> 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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

Re: maven debugging frustrations

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
I think the first two will help you compare what's working to what's not 
working.

The -X does generate a LOT of output. Use -l [filename] to catch it.

When you start reading it, you'll be able to ignore a lot of the chatter.

You can also set slf4j logging options on the command line to help 
things out. Check the following article:

https://www.baeldung.com/maven-logging

You might also play around with mvnDebug and attach an IDE to it. I've 
not tried this. The default port is 8000. It appears that you would then 
be able to set break points, etc.

. . . just my two cents
/mde/
On 12/19/2023 2:16 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
> Thanks, I've heard of all three; the first two don't seem like they'd help here.
> The third tends to spew junk and not useful stuff
> 
> -----Original Message-----
> From: Mark Eggers <it...@yahoo.com.INVALID>
> Sent: Tuesday, December 19, 2023 5:11 PM
> To: users@maven.apache.org
> Subject: Re: maven debugging frustrations
> 
> 
> CAUTION: This email originated from outside our organisation - its_toasted@yahoo.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
> Some commands that might help you get started:
> 
> What are you using to build the artifact
> ----------------------------------------------------
> mvn help:effective-pom
> mvn help:effective-pom -Dverbose
> 
> What artifacts are being brought in
> ----------------------------------------------
> mvn dependency:tree
> mvn dependency:tree -Dverbose
> 
> Debug output
> ------------------
> mvn -X package
> 
> I'm sure that there are more, but this might get you started.
> 
> . . . just my two cents
> /mde/
> 
> On 12/19/2023 1:56 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
>> When my Java code does something I didn't expect, I can run it under a debugger and step through it line by line until things make sense again.
>> When maven does something I didn't expect, my debugging strategy is usually more like "try to think of something in my bag of tricks".
>> Sometimes I suddenly have an epiphany and I realize "oh, it must have broken because of that thing I changed".
>> But in the absence of epiphanies, I don't have any good ways to ask maven to tell me what on earth is going on.
>>
>> Example from today: some is failing on our build server with "Compilation failure".
>> Looking at the build log, there are no compiler errors in sight.
>> There are a few compiler warnings, and those seem to logged twice: once at warning level, and then again at error level.
>> It only fails on SOME (not all) of our build configs, even though our configs are pretty darn similar to each other.
>>
>> So I'm left flailing around more or less at random (try compiling on a
>> different server!  Try copying the command line flags from the one that work!  Etc.) What I actually want is for maven to give me some CRUMB of visibility into what on earth is going wrong.
>>
>> I don't even know what "Compilation failure" actually means.
>> Did some process exit with non-zero status?
>> Did the process fail to launch in the first place?
>> Maybe there is no extra process, and the compilation is taking place in the same JVM that's running maven?
>> If so, what went wrong?  Did an exception get thrown?  Something else?
>>
>> You get the idea.
>>
>>
>> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15t5z4LpKs5nXMa3HxmPT?h=ISgjwiKtVs_26S9D5WklDpkGWg5FN4KBfDXNiomU8xw=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
>>
>> For important disclosures, please see: https://clicktime.symantec.com/15t5uE9XsFQC7Qk7kQNEq?h=GqPl7-MY2KIl75o5H8ob4oRWV5EdZOb-0TiUB8Oz1g8=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15t5ejZgVQMQsaGM7jAny?h=TSMoSLWLMSCFVE_msBvk3E-bNX152eJ1jQtsfE-VVu0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15t5ZuNQ2nfpTdSRaAmeM?h=skuGBe0-9p6Q6bKdLkfmjGMNe-r_OrCz4yP_Du-cGJI=&u=http://publicresearch.barclays.com.
>> ______________________________________________________________________
>> ____________ If you are incorporated or operating in Australia, read
>> these important disclosures: https://clicktime.symantec.com/15t5jZkxx231HX6GfHZwb?h=59l9AYOa74derd2shOK9ydN_NsfU5EV4DDyy0lC20Qk=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
>> ______________________________________________________________________
>> ____________ For more details about how we use personal information,
>> see our privacy notice: https://clicktime.symantec.com/15t5pPxFQdibhTvCCqy6D?h=M5qHmn-V09pHP54DC8CQtxPowDPpTqQn567A_MYEi38=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
>> ______________________________________________________________________
>> ____________
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> 
> For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
> If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html.
> __________________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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 debugging frustrations

Posted by ma...@barclays.com.INVALID.
Thanks, I've heard of all three; the first two don't seem like they'd help here.
The third tends to spew junk and not useful stuff

-----Original Message-----
From: Mark Eggers <it...@yahoo.com.INVALID> 
Sent: Tuesday, December 19, 2023 5:11 PM
To: users@maven.apache.org
Subject: Re: maven debugging frustrations


CAUTION: This email originated from outside our organisation - its_toasted@yahoo.com.INVALID Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
Some commands that might help you get started:

What are you using to build the artifact
----------------------------------------------------
mvn help:effective-pom
mvn help:effective-pom -Dverbose

What artifacts are being brought in
----------------------------------------------
mvn dependency:tree
mvn dependency:tree -Dverbose

Debug output
------------------
mvn -X package

I'm sure that there are more, but this might get you started.

. . . just my two cents
/mde/

On 12/19/2023 1:56 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
> When my Java code does something I didn't expect, I can run it under a debugger and step through it line by line until things make sense again.
> When maven does something I didn't expect, my debugging strategy is usually more like "try to think of something in my bag of tricks".
> Sometimes I suddenly have an epiphany and I realize "oh, it must have broken because of that thing I changed".
> But in the absence of epiphanies, I don't have any good ways to ask maven to tell me what on earth is going on.
> 
> Example from today: some is failing on our build server with "Compilation failure".
> Looking at the build log, there are no compiler errors in sight.
> There are a few compiler warnings, and those seem to logged twice: once at warning level, and then again at error level.
> It only fails on SOME (not all) of our build configs, even though our configs are pretty darn similar to each other.
> 
> So I'm left flailing around more or less at random (try compiling on a 
> different server!  Try copying the command line flags from the one that work!  Etc.) What I actually want is for maven to give me some CRUMB of visibility into what on earth is going wrong.
> 
> I don't even know what "Compilation failure" actually means.
> Did some process exit with non-zero status?
> Did the process fail to launch in the first place?
> Maybe there is no extra process, and the compilation is taking place in the same JVM that's running maven?
> If so, what went wrong?  Did an exception get thrown?  Something else?
> 
> You get the idea.
> 
> 
> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://clicktime.symantec.com/15t5z4LpKs5nXMa3HxmPT?h=ISgjwiKtVs_26S9D5WklDpkGWg5FN4KBfDXNiomU8xw=&u=https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> 
> For important disclosures, please see: https://clicktime.symantec.com/15t5uE9XsFQC7Qk7kQNEq?h=GqPl7-MY2KIl75o5H8ob4oRWV5EdZOb-0TiUB8Oz1g8=&u=https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://clicktime.symantec.com/15t5ejZgVQMQsaGM7jAny?h=TSMoSLWLMSCFVE_msBvk3E-bNX152eJ1jQtsfE-VVu0=&u=https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://clicktime.symantec.com/15t5ZuNQ2nfpTdSRaAmeM?h=skuGBe0-9p6Q6bKdLkfmjGMNe-r_OrCz4yP_Du-cGJI=&u=http://publicresearch.barclays.com.
> ______________________________________________________________________
> ____________ If you are incorporated or operating in Australia, read 
> these important disclosures: https://clicktime.symantec.com/15t5jZkxx231HX6GfHZwb?h=59l9AYOa74derd2shOK9ydN_NsfU5EV4DDyy0lC20Qk=&u=https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> ______________________________________________________________________
> ____________ For more details about how we use personal information, 
> see our privacy notice: https://clicktime.symantec.com/15t5pPxFQdibhTvCCqy6D?h=M5qHmn-V09pHP54DC8CQtxPowDPpTqQn567A_MYEi38=&u=https://www.cib.barclays/disclosures/personal-information-use.html.
> ______________________________________________________________________
> ____________
> 


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


This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html. 

For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
__________________________________________________________________________________ 
If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html. 
__________________________________________________________________________________

Re: maven debugging frustrations

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Some commands that might help you get started:

What are you using to build the artifact
----------------------------------------------------
mvn help:effective-pom
mvn help:effective-pom -Dverbose

What artifacts are being brought in
----------------------------------------------
mvn dependency:tree
mvn dependency:tree -Dverbose

Debug output
------------------
mvn -X package

I'm sure that there are more, but this might get you started.

. . . just my two cents
/mde/

On 12/19/2023 1:56 PM, mark.yagnatinsky@barclays.com.INVALID wrote:
> When my Java code does something I didn't expect, I can run it under a debugger and step through it line by line until things make sense again.
> When maven does something I didn't expect, my debugging strategy is usually more like "try to think of something in my bag of tricks".
> Sometimes I suddenly have an epiphany and I realize "oh, it must have broken because of that thing I changed".
> But in the absence of epiphanies, I don't have any good ways to ask maven to tell me what on earth is going on.
> 
> Example from today: some is failing on our build server with "Compilation failure".
> Looking at the build log, there are no compiler errors in sight.
> There are a few compiler warnings, and those seem to logged twice: once at warning level, and then again at error level.
> It only fails on SOME (not all) of our build configs, even though our configs are pretty darn similar to each other.
> 
> So I'm left flailing around more or less at random (try compiling on a different server!  Try copying the command line flags from the one that work!  Etc.)
> What I actually want is for maven to give me some CRUMB of visibility into what on earth is going wrong.
> 
> I don't even know what "Compilation failure" actually means.
> Did some process exit with non-zero status?
> Did the process fail to launch in the first place?
> Maybe there is no extra process, and the compilation is taking place in the same JVM that's running maven?
> If so, what went wrong?  Did an exception get thrown?  Something else?
> 
> You get the idea.
> 
> 
> This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.cib.barclays/disclosures/web-and-email-disclaimer.html.
> 
> For important disclosures, please see: https://www.cib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.cib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Corporate and Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: http://publicresearch.barclays.com.
> __________________________________________________________________________________
> If you are incorporated or operating in Australia, read these important disclosures: https://www.cib.barclays/disclosures/important-disclosures-asia-pacific.html.
> __________________________________________________________________________________
> For more details about how we use personal information, see our privacy notice: https://www.cib.barclays/disclosures/personal-information-use.html.
> __________________________________________________________________________________
> 


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