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.
[recent trunk build with Automatic projects from the Development AUC, NB6.5beta+Automatic projects from the pre-installed AUC] It is not possible to create a freeform project (based on build.xml) when the Automatic projects are installed. The new freeform project wizard warns the user that "Project folder is already owned by NetBeans project <foo>".
This should be a warning, not an error, unless there is an actual nbproject dir.
OK, but if it's only warning then we allow to create two projects over one folder in fact. Automatically created AP and user created Freeform project? IMO as far as we want to have AP and Freeform projects supported in one build user must say which project will be actually created for given project folder, can't be both.
Sorry, but I do not agree with the "just a warning" solution, for several reasons: -AFAICT, there is no guarantee that (after the New Project wizard is finished), the freeform project would take ownership over the project dir. So, the autoproject might be opened at the end of the wizard, causing confusion. -as Milan points out, the New Project wizard would allow to create new projects for source roots of existing projects, which does not seem right to me. I am also not sure what you mean by "unless there is an actual nbproject dir" - AFAIK the NB projects are not required to have nbproject directory, so checking for the nbproject directory seems quite unreliable for me.
If the freeform project is to place an nbproject dir directly beneath the main project dir, then it can go ahead and do so if there is no existing nbproject dir. Ant-based project types always take precedence over autoprojects. We might need a new API call in ProjectManager to force the project dir to be rerecognized during the current IDE session (otherwise a restart could be required). If the freeform project is to claim external source roots which happen to be beneath a dir with a build.xml, it can also go ahead and do so; the use of FileOwnerQuery.markExternalRoot will cause that root to be owned by the freeform project (and this information is now also persisted across IDE sessions, so Java scanning should work later even if the freeform project is not open). In both cases, a warning but not an error seems appropriate. Again please note that this has nothing to do with autoprojects in particular; the exact same considerations would apply to a directory that happened to contain a pom.xml that the user has no interest in, etc.
Well, I still think that changing the current error to warning is opening of Pandora's box. I can imagine quite a few (unsolvable) problems that the users may encounter caused by one project created over another project. Moreover, whether a project will be able to "steal" project directory from another project depends on the order of ProjectFactories, which will be confusing for the user. E.g. it should be possible to create a freeform project from an autoproject, but it is not possible (I think) to create an autoproject from freeform project? Quite confusing, IMO. The external source roots make it even worse, IMO. The current support for external support is not perfect, but if we allow "stealing" source roots between projects, the resulting behavior will be unpredictable, I think.
automatic project aren't related to 6.5, right?
AP is available as a beta download for 6.5 but is not part of the official product. In the short term I may need to do some workaround in AP for problems in the wizards of other project types, such as making the autodetection of folders containing build.xml as a project optional.
In the future the automatic project wizard will probably offer an option to convert a freeform project (i.e. delete nbproject/). Ownership of external source roots (which are subdirs of the potential project dirs) is not dependent on order of project factories; FOQ pays attention first to marked external roots, and only second to project factories on parent dirs.
For the updated 6.5 version, autodetection of folders containing build.xml as autoprojects is off by default but can be enabled if desired. This at least should make the bug in the freeform wizard less likely to be encountered.
See last comment for justification for lowered priority. See also issue #150561.
Changing the default component owner to tzezula.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss