You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Peter Cheung <mc...@hotmail.com> on 2019/10/10 06:37:42 UTC

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

Re: nbm-maven-plugin detected wrong path

Posted by Alessandro <al...@gmail.com>.
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 <mc...@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 <mc...@hotmail.com>
> Sent: Thursday, October 10, 2019 2:37 PM
> To: dev@netbeans.apache.org <de...@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
>

Re: nbm-maven-plugin detected wrong path

Posted by Peter Cheung <mc...@hotmail.com>.
Thank you Alessandro & Eric

________________________________
From: Eric Barboni <sk...@apache.org>
Sent: Thursday, October 10, 2019 4:49 PM
To: dev@netbeans.apache.org <de...@netbeans.apache.org>
Subject: RE: nbm-maven-plugin detected wrong path

Hi Peter,

 You can put the netbeans.installation parameter in the settings.xml so it's
not in the pom. (resolve project problem should appears)

 If you plan to give plugin to others. You will give them nbm file they will
install and they will not have to change their settings.
 You can install/reload also your plugin to test this behavior.

Regards
Eric

-----Message d'origine-----
De : Peter Cheung <mc...@hotmail.com>
Envoyé : jeudi 10 octobre 2019 08:49
À : dev@netbeans.apache.org
Objet : Re: nbm-maven-plugin detected wrong path

Hi All
   I check the source code of nbm-maven-plugin
https://github.com/mojohaus/nbm-maven-plugin/blob/4f25f6a3f80f97a0fd9986b7df
38e7e9ed58d263/nbm-maven-plugin/src/main/java/org/codehaus/mojo/nbm/RunNetBe
ansMojo.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 <mc...@hotmail.com>
Sent: Thursday, October 10, 2019 2:37 PM
To: dev@netbeans.apache.org <de...@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


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

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




RE: nbm-maven-plugin detected wrong path

Posted by Eric Barboni <sk...@apache.org>.
Hi Peter,

 You can put the netbeans.installation parameter in the settings.xml so it's
not in the pom. (resolve project problem should appears)

 If you plan to give plugin to others. You will give them nbm file they will
install and they will not have to change their settings. 
 You can install/reload also your plugin to test this behavior.

Regards
Eric
 
-----Message d'origine-----
De : Peter Cheung <mc...@hotmail.com> 
Envoyé : jeudi 10 octobre 2019 08:49
À : dev@netbeans.apache.org
Objet : Re: nbm-maven-plugin detected wrong path

Hi All
   I check the source code of nbm-maven-plugin
https://github.com/mojohaus/nbm-maven-plugin/blob/4f25f6a3f80f97a0fd9986b7df
38e7e9ed58d263/nbm-maven-plugin/src/main/java/org/codehaus/mojo/nbm/RunNetBe
ansMojo.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 <mc...@hotmail.com>
Sent: Thursday, October 10, 2019 2:37 PM
To: dev@netbeans.apache.org <de...@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


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

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




Re: nbm-maven-plugin detected wrong path

Posted by Peter Cheung <mc...@hotmail.com>.
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 <mc...@hotmail.com>
Sent: Thursday, October 10, 2019 2:37 PM
To: dev@netbeans.apache.org <de...@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