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.
[ BUILD # : 201012100001 ] [ JDK VERSION : 1.6.22 ] For some reason on today's build my C++ project opened as a Maven project. See attachment.
Created attachment 103947 [details] Picture
Created attachment 103948 [details] Logs Couldn't see anything related to the issue but just in case.
Well I think I know why, I have a pom.xml in the root of the project for using sonar in the project. That file has been there for a while. Still think it shouldn't happen (and it didn't on yesterday's build)
Looks as Maven issue. Reassigning to J2EE for evaluation.
(In reply to comment #4) > Looks as Maven issue. Reassigning to J2EE for evaluation. Why J2EE? Why no just Maven?
(In reply to comment #5) > (In reply to comment #4) > > Looks as Maven issue. Reassigning to J2EE for evaluation. > Why J2EE? Why no just Maven? I just found Maven subcat there. Sorry if it was a wrong one.
(In reply to comment #3) > I have a pom.xml in the root of the project Then it will be considered a Maven project, unless some other project type claims it first. http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/build/generated/services.txt lists the Maven factory at position 666 where it has always been. If and only if the CND support uses a factory registered at a lower position, and your project has well-formed metadata for that factory, it will be recognized as such.
Shouldn't Maven project use a stronger check? Just checking for the presence of one file (pom.xml) seems very weak.
There are other projects than CND that has a higher 'position'. They will break too. Seems like Maven project needs a stronger check.
Bug does not reproducible. Pleas provide steps to reproduce bug if bug still exists. My use case was: - create maven application - create C/C++ application - close maven application - close IDE - copy all staff under maven application in C/C++ application folder - start IDE I see C/C++ application. - close IDE - remove nbproject folder under C/C++ application - start IDE I see maven application. So possible your bug can be caused by: - C/C++ application has a broken nbproject - C/C++ plugin does not activated
Hi Javier, can you send us your nbproject subfolder? Do you use ergonomics? Can you reproduce it with disabled ergonomics? (comment out ergonomics line in nb_inst/etc/netbeans.clusters file) Thanks, Vladimir.
In my case just placing a pom.xml file in the root of the C++ project causes that to be seen as a Maven project. The IDE is smart enoguht to detect if a folder is already part of a C++ project. Why not use that to determine if the folder is a Maven project?
Removing ergonomics doesn't change anything.
Created attachment 104210 [details] nbproject folder As requested
reassign to evaluation
Comment #14 says "ergonomics don't have any influence on the issue". Why is the bug assigned to ergonomics then? Either I am confused or Alexander deserves the issue back.
javydreamercsw, Could you make following experiment: - copy nbproject in some new folder - copy pom.xml in the created folder - open project from this folder - close IDE - attach the folder and IDE message log (if issue is reproduced). - if issue is not reproduced, please send IDE log for you original use case. Thanks, Alexander
I think there's a confusion. If you see comment # 12 (http://netbeans.org/bugzilla/show_bug.cgi?id=193256#c12) I refer to the IDE being smart enough to know that that folder is included in a C++ project. The C++ project is not on the same folder as the sources. Folder 1(Netbeans Project) shows a a C++ project. Folder 2 (sources) shows as a Maven project due to the pom.xml file. If you make the mistake, like I did, and try to open folder 2 the Maven project a lot of stuff was created (I assume related to Maven) As feedback to your experiment, if you place the netbeans folder in the same place the pom.xml file is, it is displayed as a C++ project. I think that the real issue is pointed out in comments 8 and 9. That's what really raised this issue to P1.
Maven project should have more reasons to treat folder as Maven project. From C/C++ point of view folder that contains: - any file Makefile, *.mk, configure, *.pro, CMakeLists.txt, build.xml, ... - C/C++/Header files in any subfolders *cannot* be treated as Maven project. So it seems Maven module mixes "opening" and "importing" actions.
Sorry, but a folder with a pom.xml is a Maven project and the IDE will open it as such. If you want your project metadata to take priority over Maven metadata, place your project factory in a lower position. Users can also use external source roots if necessary. (In reply to comment #19) > it seems Maven module mixes "opening" and "importing" actions. There is no import step for Maven. This is a key feature.