Hi Peter,
  I have defined the netbeans.installation property in
<user-home>/.m2/settings.xml so that different developers can have their
paths set-up differently.

Here's the content of my settings.xml file:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd";>
    <profiles>
        <profile>
            <id>netbeans-installation</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>

<netbeans.installation>C:/Users/falappa/PortableApps/netbeans-8.2</netbeans.installation>

<netbeans.userdir>C:/Users/falappa/Documents/nb8.2-userdir</netbeans.userdir>
            </properties>
        </profile>
    </profiles>
</settings>

It also defines a location of the user dir, this is handy to avoid feature
activation, maven index download and process every time I launch a
secondary NetBeans instance.
You can avoid the <activation> part but in that case you have to explicit
enable the netbeans-installation profile when you run/debug your project.

Hope it helps.

Greets,
Alex

Il giorno gio 10 ott 2019 alle ore 08:48 Peter Cheung <mcheun...@hotmail.com>
ha scritto:

> Hi All
>    I check the source code of nbm-maven-plugin
> https://github.com/mojohaus/nbm-maven-plugin/blob/4f25f6a3f80f97a0fd9986b7df38e7e9ed58d263/nbm-maven-plugin/src/main/java/org/codehaus/mojo/nbm/RunNetBeansMojo.java
> . It has no code to set the variable "netbeans.installation", so it
> probably netbeans pass this var to it. Is there any UI/tool/whatever i can
> view the value of this variable?
> thanks
> Peter
> ________________________________
> From: Peter Cheung <mcheun...@hotmail.com>
> Sent: Thursday, October 10, 2019 2:37 PM
> To: dev@netbeans.apache.org <dev@netbeans.apache.org>
> Subject: nbm-maven-plugin detected wrong path
>
> Hi
>     Why my nbm-maven-plugin is detecting a wrong path, so when i run the
> netbeans module, it said:
>
> Failed executing NetBeans: Error while executing process. Cannot run
> program "/Users/peter/workspace/netbeans-quick-outline/VALUE/bin/netbeans":
> error=2, No such file or directory
>
> When i click the about dialog, the "user directory" path is correct. I
> don't want to specific <netbeansInstallation> in pom.xml, because not
> everyone using same installation path.
>
> Please tell me how to fix?
>
>
> Thanks
> From Peter
>

Reply via email to