How can I change the source folder for a PHP project in NetBeans?
Asked Answered
M

6

15

I'd like to change the Source Folder for a PHP project that I have set up in NetBeans 6.9. It doesn't look like NetBeans offers any easy way to do this. Does anybody know a way to make this happen?

Thanks...

Material answered 15/2, 2011 at 10:50 Comment(0)
M
25

I've played around with this a bit and found out how to change the Source Folder for a PHP NetBeans project that has already been created. I'm using NetBeans 6.9 on Ubuntu.

I remember trying to do this with NetBeans 6.8 and ending up with various errors like project scans never completing and such.

However, it turns out that this time it was quite easy to do.

I had the nbproject folder inside my source folder. All I had to do was close the project and NetBeans itself, move the nbproject folder into the new source folder and restart NetBeans again. The project was re-scanned and everything seems to be working.

If you're trying to do this and you had the nbproject folder outside of your source folder, it would be worth looking at nbproject/project.properties file.

There's a line there with src.dir= on it. You should be able to edit this line to update the source location.

In my case I had src.dir=., which means the Source Folder was set to be whichever folder is parent to the nbproject folder.

Material answered 15/2, 2011 at 11:54 Comment(3)
Whether you move the nbproject folder or modify src.dir= in the project.properties file, either way requires a restart of Netbeans, based on my findings.Lit
If you are running auto upload, change private/private.properties too ;-)Corroborate
Example of the used path format: src.dir=./Source means a directory besides nbproject.Bailee
C
1

In Ubuntu 11.10 (with a standard script installed version of Netbeans 7.1.1), look in the ~/NetBeansProjects// folder to find the "project.properties" file.

Open this up in your favorite text editor and modify the file path "src.dir=" to your heart's content.

Cornstalk answered 13/4, 2012 at 18:40 Comment(0)
K
0

Did you check under the menu [Run] --> [Set project configuration] --> [Customize] you have plenty of options to change there, it is easy than that.

Good luck

Knownothing answered 24/7, 2013 at 10:29 Comment(0)
N
0

If your project folder is not inside the source folder,

move your source, then in your project's folder find the file named:

project.properties

Open with a text editor and edit the line:

src.dir=your/source/folder
Novia answered 2/12, 2015 at 11:9 Comment(0)
B
0

WARNING: Please note that changing src.dir re-opening and rescanning will cause all Netbeans file change history to be lost! Depending on your work style this can cause quite some loss of history, which might or might not be important to you, especially when you don't frequently submit changes to your repository.

Bookstand answered 31/3, 2017 at 9:56 Comment(0)
E
-1

Solved here already How to change the default Netbeans 7 project directory?

Eveleen answered 15/2, 2011 at 11:3 Comment(1)
Thanks for the link, but it doesn't actually answer my question. I was looking for a way to change the Source Folder for a project that has already been created. Not so much change the default New Project directory.Material

© 2022 - 2024 — McMap. All rights reserved.