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.
I have two maven POMs they both have one child module defined named "server" (but each with a unique artifact id). When I deploy the first one to my glassfish (v2) server it deploys with no problems. When I try to deploy the second one, it undeploys the first one, and then deploys the second one. If I change the name of the child modules in the POMs (and change the corresponding directory name) both deploy properly.
I've tested this on 6.5 and 6.7M3.
Attaching two sample maven projects to replicate this: 1. Open both projects and their required projects. You should now have 4 projects "Test Project One (pom)", "Test Project Two (pom)", "test.one.server-one Maven Webapp (war)", "test.two.server-two Maven Webapp (war)" 2. Run the "test.one.server-one" project and target a Glassfish server 3. In the Services window, in the "Web Applications" folder of the glassfish servers should now show "Test_One" 4. Run the "test.two.server-two" project and target the same Glassfish server 5. In the Services window, in the "Web Applications" folder of the glassfish server ONLY shows "Test_2" Attempting to go to http://localhost/Test_One/ shows that the Test_one web-app is no longer deployed. 6. Go to the "test.two" folder and change copy the "server" folder to a folder called "server2" 7. Update the test.two/pom.xml and change the module to be "server2" 8. Undeploy the "Test_2" web-app from glassfish 9. Close the existing "test.two.server-two Maven Webapp (war)" project 10. Open the "test.two/server2" pom as a project 11. Run the "test.one.server-one Maven Webapp (war)" project targeting a glassfish server. 12. The services tab shows that the "Test_One" app was deployed properly 13. Run the new "test.two.server-two Maven Webapp (war)" project and target the same glassfish server. 14. The services tab now shows that both the "Test_One" and "Test_2" web apps are deployed.
Created attachment 80781 [details] Sample Maven projects reproducing issue
it seems to apply to tomcat as well, not only glassfish. I haven't tested with more servers. reassigning to j2eeserver support, I haven't found any instance in maven projects where we would return the project folder as identifier of any sorts, we always use artifactId or a groupId+artifactId+version combo. It has to be noted though, that a recommended setup for maven projects is to have the project folder name matching the artifactId, but it's definitely not mandatory.
*** This issue has been marked as a duplicate of 96587 ***