Going to be rusty on NetBeans specific bits as not used for maybe 10+
years because it was slow and bugging from memory, switched to Eclipse
and then IntelliJ and not looked back.

So execute [1] I believe is because you have checked "Build With
Dependencies" so it does a force rebuild of all projects and execute
[2] is running your application.

Why do you feel you need to do a forced rebuild? I'm sure NetBeans has
a compile on depend option. Did you have issues and then checking
"Build With Dependencies" fix that issue?

Do you have custom plugins or code generation running on your project
as that would be the only reason I would force a rebuild.

Maven can execute the same command line goals to all projects in a
single innovation, but it can't execute different command line goals
to different projects in a single innovation. So you might need to use
a profile or something and push the exec into that profile and then
run the profile. So after it does the build, it then does the exec.

Might sound a strange question but why do you have to use exec to run
your application. If it's loaded into NetBeans as a maven project can
you just run the main class manually instead of via exec?

If you were using IntelliJ you would just need to do the exec as
everything would have been rebuild automatically as required. The only
limitation is if you have plugins or some kind of code generation
which wouldn't have been execute. I would also just execute the main
class or what ever exec is doing instead of going via a maven wrapper
for exec.

Do you have a branch I can look at with your maven build and I'll look
it at when free to see if i can spot anything obvious, or push you
maven wip.

John







On Tue, 20 Oct 2020 at 00:37, R. Diez <rdiezmail-2...@yahoo.de.invalid> wrote:
>
> Hi all:
>
> I am migrating the following 2 Java applications and 1 "shared" library from 
> NetBeans Ant-based projects to Maven:
>
> https://sourceforge.net/p/filereadtest/code/ci/master/tree/
>
> I have noticed that Maven is rather slow, which bugs me (I am very impatient 
> for a part-time
> Java developer). I suspect the start-up costs are a big factor, and GraalVM 
> is probably not
> quite ready yet to replace the standard JVM.
>
> When I am writing code, I want to press a key in order to immediately start 
> the application
> under the debugger. All modified code, whether in the application or in the 
> common library,
> should be recompiled (if necessary). This is standard in most development 
> environments for
> most computer languages.
>
> So, after starting NetBeans, I went to the project settings, "Actions", 
> "Debug project" and ticked "Build With Dependencies".
>
> I then noticed in the output window that Maven actually runs twice:
>
> 1) [...] mvn -DskipTests=true --also-make --projects QuickDiskTest install
>
> 2) [...] mvn [...] process-classes 
> org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
>
> Is there a way to run Maven just once? Or does Maven not support building and 
> running (under a debugger) in a single invocation?
>
> Inside NetBeans, I could experiment with a new custom 
> BuildWithDependenciesAndDebug action,
> but there does not seem to be a way to fully control the command-line 
> arguments for an action. There are fields for goals, profiles and properties,
> but that is probably not enough. Or am I mistaken here?
>
> I am hoping that someone here could help me. I already posted this question 
> in the NetBeans mailing list, but nobody answered:
>
> http://mail-archives.apache.org/mod_mbox/netbeans-users/202009.mbox/%3C1652543010.678234.1601497297309%40mail.yahoo.com%3E
>
> I cannot migrate this project away from NetBeans yet, because I am using the 
> NetBeans GUI builder (Matisse) for the forms (see the .form files), which
> I guess is only available inside NetBeans.
>
> Thanks in advance,
>    rdiez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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

Reply via email to