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.

Bug 195026 - Context Path in Project properties not used as context path on a Maven generated Web application
Summary: Context Path in Project properties not used as context path on a Maven genera...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal with 3 votes (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 12:48 UTC by viggonavarsete
Modified: 2011-02-05 15:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description viggonavarsete 2011-02-03 12:48:44 UTC
Hi,

I've generated a Maven Web application. I've set Context Path (right-click project, select Properties, go to Run) to /cakeometer, and I expect the context path of the deployed application to be the same. Is this a correct assumption?
When I build it, and press Run (I've selected Glassfish 3.1.1 build39) the URL is this: http://localhost:8080/org.scrum_cakeometer_war_1.0-SNAPSHOT/
The context path is a concatenation of <groupId> + "_" + <artifactId> + "_" + <packaging> + "_" + <version>.

I'm part of the NetCat team, and this was tested on development build 201101310000.

Ramon Cacha of the NetCat team reports:
"I think that, by default, that sets the context path for Tomcat; Glassfish uses a different config file."

Then I think this is a bug. Since the Context path input field is available when I've selected GlassFish as server, I also expect the context path to be applied here as well.
Comment 1 David Konecny 2011-02-03 18:55:40 UTC
(In reply to comment #0)
> I've generated a Maven Web application. I've set Context Path (right-click
> project, select Properties, go to Run) to /cakeometer, and I expect the context
> path of the deployed application to be the same. Is this a correct assumption?

Yes.

> When I build it, and press Run (I've selected Glassfish 3.1.1 build39) the URL
> is this: http://localhost:8080/org.scrum_cakeometer_war_1.0-SNAPSHOT/
> The context path is a concatenation of <groupId> + "_" + <artifactId> + "_" +
> <packaging> + "_" + <version>.

I can reproduce it as well. Looks like a bug to me. I'm looking at it right now.

> Ramon Cacha of the NetCat team reports:
> "I think that, by default, that sets the context path for Tomcat; Glassfish
> uses a different config file."

Yes, context path is always stored in server specific way (it is not part of EE specification). That's why it cannot be set it project does not have a server set.
Comment 2 David Konecny 2011-02-03 19:59:57 UTC
org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration - variable 'cr' is always null on line 636 and therefore context is never persisted in glassfish server deployment file.
Comment 3 Quality Engineering 2011-02-05 06:06:57 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6a15db03978d
User: vince kraemer <vkraemer@netbeans.org>
Log: #195026 : Context Path in Project properties not used as context path on a Maven generated Web application