Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 186299 - NetBeans force usage of METRO 2.0 library
NetBeans force usage of METRO 2.0 library
Status: RESOLVED FIXED
Product: webservices
Classification: Unclassified
Component: Code
6.x
PC Other
: P3 (vote)
: 7.0
Assigned To: Milan Kuchtiak
issues@webservices
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-18 13:44 UTC by hmlnarik
Modified: 2010-07-13 03:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 = "http://my.org/ns/", 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
Fixed:
http://hg.netbeans.org/web-main/rev/b6eda0858e43

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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b6eda0858e43
User: mkuchtiak@netbeans.org
Log: #186299: don't force METRO 2.0 stack in WS Support


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo