This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans 7.0 with maven 2.2.1 is not able to find a maven projects situated in a parent directory. The directories structure is the following: -CodeBase -- Module A -- Module B -- Module Shared Lib -- Module C -- Module C.A -- Module C.B In this structure, the Module A and B can find the Module "Shared Lib". However the modules C.A and C.B can't find the "Shared Lib" dependency. The POM of the CodeBase defines the module A, B, Shared Lib and C. The POM of the Module C defines the module C.A and C.B. In the artifacts of the modules C.A and C.B are declared as dependencies the necessary artifacts of the module "Share Lib" This project compiles and runs perfectly, but NetBeans can't resolve these dependencies that leads to unrecognized classes (classes red underlined and no completion available). This configuration was perfectly working with the previous version of NetBeans as the 6.9.1 one. Thus, I think this is a regression. Due to this problem I just can't use NetBeans 7.0 and continue to develop with the previous version. Thanks in advance for your help
*** Bug 198532 has been marked as a duplicate of this bug. ***
That's definitely a blocker for me before switching to Netbans 7.
Hello, same problem here. Pretty annoying when you're working with a big project (with lot of dependencies). That would be nice if at some point this issue was fixed. Looked for some work around and haven't found any (as Netbeans 7.0 is pretty new, don't know if this issue was encountered by some of the tester during the beta?) so for now I'm back to version 6.9.1. Cheers.
Most likely an error in the user's projects; first read through https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html to check for well-known issues that users might encounter when moving from M2 to M3. In order to evaluate such issues I need to have a complete, self-contained test case that can be reproduced using posted instructions.
(In reply to comment #4) > Most likely an error in the user's projects; first read through > https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html to check for > well-known issues that users might encounter when moving from M2 to M3. In > order to evaluate such issues I need to have a complete, self-contained test > case that can be reproduced using posted instructions. In fact I still use maven 2 (2.2.1) to avoid this problem. Do you want that I add a dummy project with this problem?
Same problem, please fix.
(In reply to comment #5) > (In reply to comment #4) > > Most likely an error in the user's projects; first read through > > https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html to check for > > well-known issues that users might encounter when moving from M2 to M3. In > > order to evaluate such issues I need to have a complete, self-contained test > > case that can be reproduced using posted instructions. > > In fact I still use maven 2 (2.2.1) to avoid this problem. Do you want that I > add a dummy project with this problem? I mean I don't use maven 3 to avoid compatibilities problem. But with maven 2.2.1 NetBeans 7 can't resolve parent dependencies (but the project compile thus this is a NetBeans bug).
(In reply to comment #6) > Same problem, please fix. Again, I need a test case to reproduce any problem. (In reply to comment #7) > I don't use maven 3 to avoid compatibilities problem. NetBeans 7 embeds Maven 3, so a project which cannot be built using Maven 3 may not be correctly loaded by the IDE either. (Selecting a Maven installation in the Options dialog only affects builds as shown in the Output Window; it has no effect on the embedder.)
It's an show stopper for me. Why it is closed?
Again, because there is no information to reproduce the problem and thus evaluate it. http://www.chiark.greenend.org.uk/~sgtatham/bugs.html has a nice summary. Ideally I would want to see a ZIP file containing a complete multimodule project source tree (no target/ dirs!) which builds correctly using Maven 3 on a virgin computer (or with any necessary setup prerequisites listed in detail), but persistently displays error badges (or whatever the problem is) when opened in NetBeans. Output from the "NetBeans Metadata Project Inspector" module (available from the update center) may be helpful but is not a substitute for a test case.
It looks like I found a workaround. Unfortunately I'm busy with other assignment now, bot I'll get back soon.
[WORKAROUND] This issue is environment specific and it is a big dial to reproduce it. NetBeans fails with project which has parent POM project. This parent project must not be installed locally. It must be located some where in remote repository. In this case, when maven downloads it and put is into local repository the corresponding file maven-metadata-local.xml is still unchanged. This is, I believe, a root cause of the issue. I have fixed this issue in my environment in following way. I have 3 nested parent projects. I have downloaded them all from the remote repository and install locally with following command: mvn install:install-file -Dfile=war-parent-1.0.0.pom -DpomFile=war-parent-1.0.0.pom Please reopen this issue. It is quite critical for big projects.
(In reply to comment #12) > NetBeans fails with project which has parent POM project. This parent project > must not be installed locally. It must be located some where in remote > repository. In this case, when maven downloads it and put is into local > repository the corresponding file maven-metadata-local.xml is still unchanged. > This is, I believe, a root cause of the issue. When I delete ~/.m2/repository/ and open a checkout of https://svn.codehaus.org/mojo/trunk/mojo/nbm-maven-plugin it works - the IDE says "Reloading online", and downloads necessary artifacts in the background and then reloads the project. ~/.m2/repository/org/codehaus/mojo/mojo-parent/28/mojo-parent-28.pom has been downloaded as expected after this is done. There is no maven-metadata-local.xml but it does not seem to matter. > I have 3 nested > parent projects. I have downloaded them all from the remote repository and > install locally with following command: > > mvn install:install-file That will certainly work, but it should not be necessary - the IDE will attempt to download all parent POMs when opening the project, and if that fails you can simply run a build of the child project (the 'validate' phase suffices). If command-line Maven (e.g. F11 from the IDE) does not retrieve your parent POMs then you have some kind of misconfiguration in your projects and/or environment. By the way, this does not sound like the same problem as Nocia's ("projects situated in a parent directory"), though without information to reproduce any of them it is hard to be sure.
Yes mvn downloads all dependencies, but NetBeans still says "can't resolve ... ".
(In reply to comment #14) > mvn downloads all dependencies, but NetBeans still says "can't resolve ..." So some sort of issue with embedder configuration seems likeliest; bug #167208 is my only guess among issues already reported.