it does in nb691 and is a convenience - new context root matches project name.
it does not in nb70b2 -- keeps old context root value.
see this with JSF2 web projects
just a FYI -- i dont know what it really should do
what do we need to do to reproduce what you are seeing?
here is what I did...
started a recently built pull from web-main with a fresh userdir
i did not import settings
i registered a 3.1 build
i create a java ee 6 web app that targets server... with project name WebApplication193
i run the project
the server starts. the browser starts. the index.xhtml page displays as expected
the url was http://localhost:8080/WebApplication193
I used the Copy action on WebApplication193's right-click menu.
A dialog appeared to let me select the name and directory for the new project
I kept the default values (webApplication193_1, ~/NetBeansProjects).
The new project appeared.
I used the Run item from WebApplication193_1's right click menu.
the project deployed. the index.xhtml page appeared.
What steps did you follow that were different from the one I described above?
things work as you describe in nb691
the nb7.0beta2 works differently
use that build if you want to reproduce
i am not currently running dev builds -- i could if you are not seeing
it in the cureent dev builds -- to confirm issue is gone away
Please provide more details about "the nb7.0beta2 works differently"...
Maybe you would be willing to attach the 'src' project also.
Created attachment 106507 [details]
project before copy
Created attachment 106508 [details]
project after copy
copied jpa to jpa_4; context root remains /jpa in both with nb70beta2
Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
with nb691 jpa_4 would have context root /jpa_4
I can see that JPA_4 you attached has "<context-root>/jpa</context-root>" in sun-web.xml. If I perform copy myself on
Product Version: NetBeans IDE Dev (Build 110223-f768bf0f0b79)
Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02
System: Linux version 2.6.35-25-generic running on amd64; UTF-8; en_NZ (nb)
then no context-root is set in my copy of JPA project and therefore it is deployed correctly. I'm not aware of any changes in this area since Beta2 so I wonder if it is reproducible only under certain other conditions.
Hmm. I will take a look at it some more.
One thing that I would note.... this is one of those things that can never be 'right' to all users.
I would bet that there are some users that would say the way 6.9.1 worked was incorrect and the 'new' way is correct, too.
Maybe we need to add a check-mark on the Copy dialog that allows a user to state their preference about how to handle the content of 'location dependent data' like the context root?
as i noted in initial post -- it just works differently than nb691 -- but i cannot say which way is "better" ?
(In reply to comment #8)
> Maybe we need to add a check-mark on the Copy dialog that allows a user to
> state their preference about how to handle the content of 'location dependent
> data' like the context root?
I intentionally turned this into P4 as I do not think copying projects is part of developers daily(not even weekly) workflow.
This is more about decision how it should work instead of fixing it.
Targeting for next release. Adding Petr Hejl to cc list to know his opinion.