Migrating my Mind to Maven (Part 3) – Running and Errors

Everything is subtly (or not so subtly) different between building and running a NetBeans Platform application with Ant and with Maven. When running an application from the IDE, only one instance of the application is allowed to run at a time. The error message displayed when trying to run a second instance with an Ant-based project is clear:

[text]C:NetBeansharnesssuite.xml:502: The following error occurred while
executing this line:
C:NetBeansharnessrun.xml:198: The application is already running within
the test user directory.
You must shut it down before trying to run it again.[/text]

The Maven one is a little less informative, particularly for Java developers who are not used to building .exes:

[text]Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.7:cluster-app
(default-cli) on project test2-app: Cannot process etc folder content
creation. C:ProjectsTeststest2applicationtargettest2bintest2.exe
(The process cannot access the file because it is being used by another
process) -> [Help 1][/text]

Hopefully the knowledge that these two things have the same cause will be useful to developers new to developing NetBeans Platform applications with Maven. 🙂

Leave a Comment