Just to be clear that I understand how NetBeans is working. When a Maven based 
project is executed with one of the two run commands that are not in the Run 
Maven submenu, there is a goal set by NetBeans, likely exec:java or exec:exec? 
This will explain why my <defaultGoal> is ignored as using a goal on the mvn 
command line overrides <defaultGoal>. In the Run Maven submenu when I use the 
Other goals choice, leaving this dialog blank will use the <defaultGoal>.

If this is so, then I implore you to please provide a way to override this and 
use the <defaultGoal> from the pom file for the simple Run commands. This is 
important, in my opinion, to ensure that a Maven project behaves the same in 
NetBeans as it would from the command line or in other IDEs.

Ken

PS: Pretty please . . .


-----Original Message-----
From: Neil C Smith <neilcsm...@apache.org>
Sent: March 14, 2025 5:52 AM
To: dev@netbeans.apache.org
Cc: Kenneth Fogel <kfo...@dawsoncollege.qc.ca>
Subject: Re: Run Maven / Maven Run

On Thu, 13 Mar 2025 at 20:02, Kenneth Fogel <kfo...@dawsoncollege.qc.ca> wrote:
> Here is the github link to a very trivial project:
> https://gith/
> ub.com%2Fomniprof%2Fjavafx_01_basicexample.git&data=05%7C02%7Ckfogel%4
> 0dawsoncollege.qc.ca%7Cef14dd769f89495b326808dd62dde13e%7Cb6b66a7afbbb
> 42b8a7c5712342094eef%7C1%7C0%7C638775427294948313%7CUnknown%7CTWFpbGZs
> b3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIj
> oiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=zDJO26hta0rcwbbr68dHaya5
> NzHex2n8Hk7IN6Xl63k%3D&reserved=0
>
> It is Maven based. If I try to run the project I get the following error:
> Error: JavaFX runtime components are missing, and are required to run
> this application If I use Run Maven -> Other goals and just hit enter it runs.

Ah, OK, you didn't mention JavaFX.  That brings a different complexion to this, 
as that has its own plugin goals to consider.  This is (was) covered somewhere 
in the JavaFX docs - check the modular Maven section at 
https://openjfx.io/openjfx-docs/#IDE-NetBeans

Anyway, if you want your existing project to work, you need to override the 
goals attached to the run and other actions in the project properties to call 
javafx:run instead of the exec plugin.
This will create an nbactions.xml in the project, which you could choose to 
check in.

It's a curious question whether defaultGoal(s) should be considered in any of 
this.  To be honest, I'd even forgotten that was an option.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to