Netbeans not copying source files to web folder
Asked Answered
R

2

5

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.

Rights answered 19/10, 2009 at 15:10 Comment(0)
G
7

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.

Gemot answered 19/10, 2009 at 15:18 Comment(1)
I also experienced this bug with Netbeans 7.2. Restarting NB "fixed" the problem here as well.Ytterbium
U
1

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

Unsnap answered 19/10, 2009 at 15:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.