cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Endorse jaxws 2.2 API jar
Date Mon, 21 Jun 2010 19:01:53 GMT
On Monday 21 June 2010 2:48:18 pm Glen Mazza wrote:
> Just to confirm, why should the default *not* be JAX-WS 2.2--is it because
> 2.1 is presently the default version in the JDK?  Is setting the default to
> 2.1 meant to help developers of CXF or users of CXF (i.e., does this
> default have any bearing on CXF usage or is just when programming CXF
> internals)? Also, if we listed JAX-WS API 2.2 as a Maven dependency would
> that free CXF devs or users from needing to manually place JAX-WS 2.2 JARs
> in their JDK's endorsed folder--i.e., so we could use 2.2 as the default
> without
> inconveniencing anyone?

Well, Maven is definitely one of the reasons for keeping it 2.1.    There 
isn't a way  in maven to tell dependents that something needs to be endorsed.   
Thus, if my "hello world" pom.xml depends on cxf-rt-frontend-jaxws and *I* 
don't specifically go out of my way to endorse things, no matter what happens, 
you are going to get the JAX-WS 2.1 built into Java 6.

Even if we list the 2.2 jar as a dep in the pom, devs still need to endorse it 
to make it get picked up with Java6.    (not so with Java 5)   When we run 
"mvn install", in the pom, we can specifically configure various things like 
maven-compiler-plugin and maven-surefire-plugin and such to endorse it, but 
it's kind of a pain and requires large blocks of XML.   Plus, it ONLY works 
for plugins that can/will fork themselves.   For example, our own cxf-codegen-
plugin does NOT have a fork mode.   Thus, nothing we can do within maven will 
allow it to JAX-WS 2.2 stuff.  You would HAVE to endorse it at the JDK level 
or pass the endorsed flags to Maven via the MAVEN_OPTS.       Longer term, we 
may need to add a "fork" mode to the codegen plugin (and the java2ws plugins 
and xjc plugins and such) to support this.

Eclipse is another issue.   There isn't a way (that I can find) to endorse 
anything in Eclipse EXCEPT at the "Installed JREs" level.    Thus, again, 
nothing we do in Maven would allow the projects created using our instructions 
for setting up eclipse to actually work without requiring the user to also do 
special stuff to setup an endorsed JRE in eclipse.

For most of the changes we've needed to support 2.2, we've kind of gone out of 
our way to detect if 2.1 is being used and NOT do the 2.2 stuff.   Thus, it 
just "keeps working" and doesn't require a lot of work from the developer to 
get it working.


> Thanks,
> Glen
> dkulp wrote:
> > By default,  "mvn install" or whatever will be jaxws 2.1.    With
> > -Pjaxws22,
> > it will create the jar with the 2.2 stuff.    Since the jaxws22 profile
> > isn't
> > normally active, if you -Psetup.eclipse or intellij or whatever, it will
> > be
> > setup as jaxws 2.1 and the 2.2 stuff won't be visible in eclipse.   Thus,
> > normal development won't break.

Daniel Kulp

View raw message