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 186299

Summary: NetBeans force usage of METRO 2.0 library
Product: webservices Reporter: hmlnarik
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Severity: normal CC: mgrebac
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:

Description hmlnarik 2010-05-18 13:44:15 UTC
NetBeans add Metro 2.0 to the dependencies by default for web-service project.

However, I want to use Apache CXF library. Everytime I try to manually delete "METRO 2.0" library from project dependencies and remove the Metro-related files, NetBeans put this dependency back. Moreover it modifies web.xml to use Metro's listener and servlet for annotated services. This is VERY annoying bug. 

I understand that such an automatic support for web services can be helpful for people using (GlassFish and) Metro as their primary platform. On the other hand, it should be made optional as some developers don't want use METRO at all and NetBeans should not force them to do so.
Comment 1 Martin Grebac 2010-05-19 14:26:12 UTC
Just to be sure this is not WSIT issue, but a generic WS support issue - would you please provide reproduction steps? Thanks.
Comment 2 Milan Kuchtiak 2010-05-19 15:54:03 UTC
Yes, agree, the request is legitimate.
Comment 3 hmlnarik 2010-05-20 05:23:38 UTC
Reproduction steps:

(Setup: Netbeans 6.8, having both Tomcat 6 and GlassFish v3 installed)

1) Create a new Web Application project
2) Create a new class HelloWorld with the following contents:
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService(targetNamespace = "", serviceName="HelloWorld")
public class HelloWorld {
	public String sayHi(@WebParam(name = "text") String text) {
		return "Hi " + text;
3) Save the class

4) Now inspect project libraries (it contains METRO 2.0) and web.xml file (contains new entries for Metro WS servlets and listener). A new file "sun-jaxws.xml" is created as well which is unusable for frameworks other than Metro.
Comment 4 Milan Kuchtiak 2010-07-08 15:14:00 UTC
We plan to fix this "intrusive" behaviour to the next release.
Comment 5 Milan Kuchtiak 2010-07-09 15:33:24 UTC

Note: the fix was implemented for ant project types only. Maven projects work fine from the beginning.
Comment 6 Quality Engineering 2010-07-13 03:31:20 UTC
Integrated into 'main-golden', will be available in build *201007130001* on (upload may still be in progress)
Log: #186299: don't force METRO 2.0 stack in WS Support