Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans not copying source files to web folder

I'm using Netbeans to develop an HTML/PHP site and I have the Run Configuration set as follows:

Project URL: http://localhost/JEB Project Folder: C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB Source Folder: C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB Web Root:

The "Copy files from Sources Folder to another location" option is checked and the Copy to Folder location is: C:\xampp\htdocs\JEB.

The problem is, when I edit files in the Project Folder, and then click Run, I'm expecting them to copy to the web location (C:\xampp\htdocs\JEB) and then run in the browser. But that's not happening. The files are not getting copied over so I'm seeing the old versions of the files that were previously in the C:\xampp\htdocs\JEB folder. (I had this working once before, I thought.)

Am I misunderstanding how this works? I thought you were supposed to edit the files in the Source folder, and they would automatically be copied to my web server folder when I ran the project locally. I've checked the NetBeans forums and found one other person with this problem, but no working solution. I was having this problem with Netbeans 6.5.1 so I upgraded to 6.7.1 and still no luck.

Thanks.

like image 630
johnnyb10 Avatar asked Oct 19 '09 15:10

johnnyb10


2 Answers

I had this problem too and it seemed to be a bug in NetBeans. I was using Ubuntu Linux 9.04 with NetBeans 6.5 and 6.7.1.

When it happened to me, I would delete all of the files in the destination location and then run the project again. When NetBeans sees that there are no files there, it copied the latest version over. From then on it usually worked correctly (i.e. automatically copying files from the source to destination folder every time I ran the project). Sometimes I also had to restart NetBeans for this to work correctly.

like image 74
Adam Sheehan Avatar answered Oct 21 '22 21:10

Adam Sheehan


Not a solution, but work around.

Create a XAMPP Alias to the directory where your files are located, see: Make XAMPP/Apache serve file outside of htdocs

like image 39
2 revs Avatar answered Oct 21 '22 22:10

2 revs