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.
In my case we have a Free Form project that has been being moved to a Maven project. If we remove the nbproject folder and open it with an IDE which doesn't have it cached as a free form project, it opens as a maven project. If you try to open it with an IDE which has it cached (in the recent closed projects) as a free form project, it'll open it as such creating the nbproject folder. Step to reproduce: 1) Checkout PCGen code from: https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk 2) Open the project in the IDE (notice it is detected as Free Form) 3) Close IDE and remove the nbproject folder. 4) Open IDE with clean user dir and try to open the project (notice it shows as Maven project) 5) Open IDE with user dir from step 2. (Notice it is opened as Free form project and the nbfolder is created) This is still present on 7.3 daily builds and probably happening from earlier than 7.2.1.
do you have the java edition only or the full ide? with or without initially disabled project type wizards?
I cannot reproduce. In the IDe with previously opened freeform, upon restart and deletion of nbproject folder I get the freeform icon+name in Recent projects menu item. That's correct, as we cache the icon and name to avoid loading the projects just for the sake of icon in main menu. However upon clicking the menu, maven project opens for me. I don't have ergonomics enabled/present (the code responsible for proxying and lazy enabling the various features in full ide.)
I have full IDE with Java, Jave SE enabled.
I've tried with freshly built complete IDE. everything worked both ways for me. Open as freeform, exit, delete nbproject, restart.. it's maven. exit. svn update . restart ide, now it's freeform. tried with both closing the project before IDE exit or keeping it open. In all cases the right type of project opened for me. The only minor ui glitch is the icon for in recent projects list when project changes type, but that's something I will not fix, the scenario is fairly rare and the icon caching is important to avoid reloading the closed projects. closing as worksforme.
I'm still having the issue. I'll attach a video showing the behavior. Hopefully it helps.
Created attachment 127732 [details] Video
If I close and open the IDE after deleting the nbproject folder it did open as a Maven project.
ok, you might have noticed that the nbproject folder gets indeed created but the crucial files are not present (project.xml for example). You've pulled the plug on a project that is still residing inside netbeans as a live instance, it's still there, registered as THE project at given directory. that's why it's picked up again when reopening. Closing and opening are significant stages in the lifecycle of a project but they are not the start or final stages. Closing a project merely removes it from UI and deregisters it from global classpath recognized by the IDE. A project can be loaded even without being opened at all. Eg. if you have project B depending on project A, and only open project B in the IDE, project A still gets loaded and the switch to a different project type as describe above won't work either. I consider this working as expected. Changing a project type of a project is rare operation for advanced users only and requires a restart of the IDE.