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.

Bug 238125 - Allow placing HTML5 project metadata to a different directory than sources
Summary: Allow placing HTML5 project metadata to a different directory than sources
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks: 229313
  Show dependency tree
 
Reported: 2013-11-08 08:08 UTC by Petr Jiricka
Modified: 2014-10-08 11:36 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-11-08 08:08:35 UTC
Extracted from issue 237099:

Could the "HTML5 project" and "HTML5 project with existing sources" wizards offer to place nbproject in another directory, similarly to PHP project? This could solve the problem that when you currently want to look at HTML5 sources in NB, the IDE "pollutes" the source repository with the nbproject directory, which is not appropriate in many cases - especially if there are several people contributing to the project and each is using a different IDE/editor.
Comment 1 Petr Jiricka 2013-11-08 08:14:19 UTC
Follow-up discussion from issue 237099:

> BTW if the main problem is pollution of source repository, than there 
> is easy fix. nbproject should ignored but versioning system.

Well, I think sometimes it is desirable to put nbproject into version control, if all team members use NetBeans (or if they tolerate presence of nbproject in the repository). So the user should be able to choose - this is also consistent with PHP project.

> BTW if you create PHP project in folder phpsrc and you want to have 
> metadata in folder phpprj you can do that. But you *cannot* open phpsrc
> as NetBeans project. In fact you create project phpprj, which actual 
> source files are outside of project directory. From implementation point
> of view PHP does not have metadata outside of php project. It has 
> sources outside of php project, right?

Yes, this is a disadvantage of this approach. It may still be worth it if the presence of nbproject in the repository is really unacceptable.
Comment 2 Tomas Mysik 2013-11-08 08:18:48 UTC
IMHO this could already work (at least I think that the SiteRoot, Tests and Config directories can be outside of project directory) but Honzo, you need to verify it (David wrote this part so I am not sure).
Comment 3 Jan Becicka 2013-11-08 12:10:06 UTC
BTW both PHP Project and HTML5 Project have it's metadata in nbproject folder, which is consequence of fact, that those projects are ant-based, which is quite strange, because they don't use ant at all.
Comment 4 David Konecny 2013-11-10 21:11:17 UTC
I do not remember any request for this feature from external users. So my suggestion would be to rather wait than to implement this.

I personally never understood the rationale to move nbproject somewhere else - I would expect that intelliJ, Eclipse, NetBeans, and other IDEs store their project metadata along the project sources. It's not a "pollution" but useful project metadata for tooling to build and manipulate project.
Comment 5 Tomas Mysik 2013-11-11 06:10:36 UTC
(In reply to Jan Becicka from comment #3)
> those projects are ant-based,
> which is quite strange, because they don't use ant at all.

The reason is simple - reusing existing project infrastructure (project properties, listeners etc.).
Comment 6 Jan Becicka 2013-11-11 08:31:47 UTC
> I personally never understood the rationale to move nbproject somewhere else

Exactly. If someone don't want to use our project system and still want to edit html files, he should add this directory to Favorites Tab and just don't use Projects tab and Projects features.

If someone wants to use our Project system, but don't want to "pollute" versioning repository, he should set "nbproject" folder to be ignored by versioning system (just add it to .hgignore or .gitignore or .whateverignore)
Comment 7 Tomas Mysik 2013-11-11 08:49:29 UTC
(In reply to David Konecny from comment #4)
> I personally never understood the rationale to move nbproject somewhere else

For PHP, I believe the reason is simple - do not allow to access the nbproject directory via webserver (not all PHP projects have separated web root and project directory). Please note that not all PHP web hostings allow you to configure hidden/forbidden folders/files.
Comment 8 Petr Jiricka 2013-11-11 09:09:10 UTC
> I do not remember any request for this feature from external users.

Right, this is based on my own personal experience, not real customer data. Many other Easel features are also not based on real customer data.

> If someone don't want to use our project system..., he should...
> If someone wants to use our Project system..., he should...

In practice, users don't do things the way we tell them they "should" do them. They have their own ideas on how to do things in an IDE... or they just switch to another IDE if they don't like the approach the IDE forces on them. The reality is that most client-side web developers use simple text editors like Sublime, or they use WebStorm. We are not going to win them over by saying "you can do this with NetBeans, but you need to do it this way". This enhancement is one idea how to make NetBeans more approachable to users with existing sources - if you have other ideas how to achieve that, by all means explore them and implement them!
Comment 9 Petr Jiricka 2013-11-11 09:10:50 UTC
> I do not remember any request for this feature from external users.

iPhone would never exist if Apple only listened to requests of existing customers.
Comment 10 David Konecny 2013-11-11 18:56:06 UTC
> iPhone would never exist if Apple only listened to requests of existing
> customers.

Sure but moving nbproject somewhere else is not a new feature.

I do understand it in PHP case:

  if (project folder == public_html) then nbproject = problem
Comment 11 Tomas Mysik 2014-07-18 10:39:46 UTC
Today I fixed issue #244029 so now all the folders (Site Root, Unit Tests and Config) can be outside of the project directory.
Comment 12 Tomas Mysik 2014-10-08 11:36:16 UTC
(In reply to Tomas Mysik from comment #11)
> Today I fixed issue #244029 so now all the folders (Site Root, Unit Tests
> and Config) can be outside of the project directory.

I guess we can close this issue now. If anyone disagrees, reopen this issue but please note that now it is only about a proper project setup.

Thanks.