You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by "R. Diez" <rd...@yahoo.de.INVALID> on 2020/09/30 20:21:37 UTC

Build with dependencies + debug in a single Maven invocation

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 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 Mave not support building and running 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?

Thanks in advance,
  rdiez

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

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