| View previous topic :: View next topic |
| Author |
Message |
vra5107
Joined: 15 Mar 2011 Posts: 49
|
Posted: Thu Apr 21, 2011 1:24 am Post subject: misconfigured Maven project |
|
|
Hi
Netbeans 7.0 complains for the very same maven project that Netbeans 6.9.1 opens without a problem. Has anybody else faced this?
Venkat |
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Mon Apr 25, 2011 12:11 pm Post subject: |
|
|
| I have the same problem and had to switch to 6.9.1 for now |
|
| Back to top |
|
 |
vra5107
Joined: 15 Mar 2011 Posts: 49
|
Posted: Mon Apr 25, 2011 6:33 pm Post subject: |
|
|
I am using Netbeans 7. I think it's the stupid Windows security that is doing this. Netbeans 7.0 is working fine on my Ubuntu.
I tried installing in C:\ root directory to see if I will find any luck. I tried moving the .netbeans to C:\ root directory to see if that will work. Nothing has worked so far. |
|
| Back to top |
|
 |
gros_bidule
Joined: 22 Jun 2010 Posts: 215
|
Posted: Mon Apr 25, 2011 10:54 pm Post subject: |
|
|
Hi,
can you show your pom.xml ?
NB6.9 uses (internal) Maven 2 and NB7 Maven3. Did you try to use external Maven binaries ? (Maven2 with NB7) |
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Tue Apr 26, 2011 7:03 am Post subject: |
|
|
| gros_bidule wrote: | Hi,
can you show your pom.xml ?
NB6.9 uses (internal) Maven 2 and NB7 Maven3. Did you try to use external Maven binaries ? (Maven2 with NB7) |
I can't show the pom, but I can tell that I used external Maven 2, which successfully build the projects. When I tried to build the projects with internal NB7 maven I got an error. I believe the problem may be connected with projects that contains modules, because some projects open fine. Here is one more post pointing to the problem with maven projects with modules http://forums.netbeans.org/viewtopic.php?t=38465. |
|
| Back to top |
|
 |
vra5107
Joined: 15 Mar 2011 Posts: 49
|
Posted: Tue Apr 26, 2011 5:56 pm Post subject: |
|
|
Hi
I had external maven configured when I was using 6.9. When I installed 7.0 it imported the configuration from 6.9 which also configured the external maven in 7.0. Essentially I am using external Maven 2.2.1 in Netbeans 7.0.
By the way I think its worth mentioning that I am defending Netbeans against in IDE wars here !!! So please help me stay proud.
Venkat |
|
| Back to top |
|
 |
vra5107
Joined: 15 Mar 2011 Posts: 49
|
Posted: Wed Apr 27, 2011 11:08 pm Post subject: |
|
|
Aight
First of all, for the impatient the solution is to copy the settings.xml into ${user_home}\.m2 directory. ( Ex: C:\Users\Venkat\.m2 ( On Windows 7 )).
I found the reason why this is happening. There is only one way to specify maven settings.xml in Netbeans. As in it is not possible to specify project specific maven settings. You typically configure it in Tools -> Options -> Maven.
If my understanding is right Netbeans uses this settings.xml that is configured in options only during building. It does not use this for any netbeans related stuff ( like for reading through the project and its modules. ) This is the reason the project was showing this error.
If this is how Netbeans deals with the settings.xml, there is room for improvement.
Venkat |
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Fri Apr 29, 2011 1:35 pm Post subject: |
|
|
| It seams that NB7 do not understand profiles.xml from the projects built with external maven 2. It's a pity, I have to stick to 6.9.1 while working on old projects. |
|
| Back to top |
|
 |
ionuion
Joined: 03 Feb 2010 Posts: 190
|
Posted: Fri Apr 29, 2011 3:18 pm Post subject: |
|
|
Alniks,
I can confirm what you said regarding profiles.xml, I'll just add more details:
Comparing Netbeans 6.9.1 to 7.0
Both have defined external installation of maven 2.2.1 (tools->options->miscellaneous->maven->maven home field)
Create new Maven project
Netbeans 6.9.1: File, New Project, Categories=Maven, Projects=Maven Project, Next, Maven Archetypes=Maven Quickstart Archetype, project details
Netbeans 7.0: New Project, Categories=Maven, Projects=Java Application, project details
Create profiles.xml
extend the project node, right click on the Project Files node
Netbeans 6.9.1: context menu containing Create profiles.xml is displayed
Netbeans 7.0: not possible to create profiles.xml
Open project with profiles.xml
Netbeans 6.9.1: the profiles.xml file is visible under the Project Files node
Netbeans 7.0: the profiles.xml is not visible in the Projects pane
Having the project opened at previous step, look for the profile definitions
Right click on the project node, Properties, Categories=Configurations.
Netbeans 6.9.1: The profiles defined in profiles.xml are present under Configurations
Netbeans 7.0: The profiles defined in profiles.xml are not present under Configurations
I find the change decision very consistent - not supporting profiles.xml at all. I guess the decisions were made based on the fact that profiles.xml is no longer supported in maven 3.0.
A backwards compatible love would be to check what maven version the user is using and based on that to deploy the old or the profile.xml-less behaviour.
I guess the following holds true:
Using old style? use the old NetBeans 6.9.1.
NetBeans 7 encourage new styles. Want it? migrate your profiles to settings.xml |
|
| Back to top |
|
 |
Javier.Ortiz Posted via mailing list.
|
Posted: Fri Apr 29, 2011 4:10 pm Post subject: misconfigured Maven project |
|
|
Netbeans 7.0 comes with Maven 3. You might need to configure it to use Maven 2 for your projects.
Javier A. Ortiz Bultr |
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Fri Apr 29, 2011 6:20 pm Post subject: misconfigured Maven project |
|
|
profiles.xml files have been removed in maven 3.0.
http://jira.codehaus.org/browse/MNG-4060
Milos
On Fri, Apr 29, 2011 at 3:35 PM, Alniks <address-removed> wrote:
| Quote: | It seams that NB7 do not understand profiles.xml from the projects built with external maven 2. It's a pity, I have to stick to 6.9.1 while working on old projects.
|
|
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Thu May 05, 2011 6:21 am Post subject: Re: misconfigured Maven project |
|
|
| Milos Kleint wrote: | profiles.xml files have been removed in maven 3.0.
http://jira.codehaus.org/browse/MNG-4060
Milos
On Fri, Apr 29, 2011 at 3:35 PM, Alniks <address-removed> wrote:
| Quote: | It seams that NB7 do not understand profiles.xml from the projects built with external maven 2. It's a pity, I have to stick to 6.9.1 while working on old projects.
|
|
Unfortunately, I work with maven 2 project. |
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Thu May 05, 2011 6:23 am Post subject: Re: misconfigured Maven project |
|
|
| Javier.Ortiz wrote: | Netbeans 7.0 comes with Maven 3. You might need to configure it to use Maven 2 for your projects.
Javier A. Ortiz Bultr |
How can I do so? |
|
| Back to top |
|
 |
emiddio-frontier Posted via mailing list.
|
Posted: Thu May 05, 2011 9:43 pm Post subject: [SPAM] Re: misconfigured Maven project |
|
|
tools/options/maven
gary
----- Original Message -----
From: "Alniks" <address-removed>
To: <address-removed>
Sent: Wednesday, May 04, 2011 11:23 PM
Subject: [nbusers] misconfigured Maven project
| Quote: |
Javier.Ortiz wrote:
| Quote: | Netbeans 7.0 comes with Maven 3. You might need to configure it to use
Maven 2 for your projects.
Javier A. Ortiz Bultr
|
How can I do so?
|
|
|
| Back to top |
|
 |
Alniks
Joined: 25 Apr 2011 Posts: 6
|
Posted: Tue May 10, 2011 6:36 am Post subject: Re: [SPAM] Re: misconfigured Maven project |
|
|
| emiddio-frontier wrote: | tools/options/maven
gary
----- Original Message -----
From: "Alniks" <address-removed>
To: <address-removed>
Sent: Wednesday, May 04, 2011 11:23 PM
Subject: [nbusers] misconfigured Maven project
| Quote: |
Javier.Ortiz wrote:
| Quote: | Netbeans 7.0 comes with Maven 3. You might need to configure it to use
Maven 2 for your projects.
Javier A. Ortiz Bultr
|
How can I do so?
|
|
Changing maven installation to external maven 2 doesn't help. Though, as I wrote, projects are built fine after change. |
|
| Back to top |
|
 |
|