You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by jim ma <ma...@gmail.com> on 2010/06/17 18:02:41 UTC
Endorse jaxws 2.2 API jar
Hi all ,
When we update to jaxws 2.2 , we have to endorse the jaxws api jar for
jdk6. I've updated the jaxws api dependency to 2.2 and endorsed the
jaxws api 2.2 jar to maven surefire and compiler plugin . If there
is no objection , I will check in this change .
We also need to look at endorsing the maven codegen plugin , cxf ant
task and samples in distribution kit. If you have any concerns and
thoughts about jaxws2.2 api update and endorse dir , please let me
know .
Thanks
Jim
Re: Endorse jaxws 2.2 API jar
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 17 June 2010 12:02:41 pm jim ma wrote:
> Hi all ,
>
> When we update to jaxws 2.2 , we have to endorse the jaxws api jar for
> jdk6. I've updated the jaxws api dependency to 2.2 and endorsed the
> jaxws api 2.2 jar to maven surefire and compiler plugin . If there
> is no objection , I will check in this change .
> We also need to look at endorsing the maven codegen plugin , cxf ant
> task and samples in distribution kit. If you have any concerns and
> thoughts about jaxws2.2 api update and endorse dir , please let me
> know .
Yes, I object to this. Out of the box, CXF needs to work without endorsing
anything or doing anything funky. Thus, by default, it's going to need to
stay JAX-WS 2.1 compliant.
Also, when I run "mvn -Psetup.eclipse" or similar, it needs to create projects
that will load into eclipse without any funky setup there. Right now, there
isn't a way to endorse things in eclipse.
For 2.2, we'll likely need a separate cxf-rt-frontend-jaxws22 module or
similar that just subclasses the ProviderImpl and EndpointImpl of the regular
JAX-WS module and provides the additional 2.2 specific API's. Then, to the
distribution, we would need a "jaxws-2.2" subdir in lib or similar that would
contain the stuff needed for 2.2 and a good readme that explains everything a
user would need to do.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Endorse jaxws 2.2 API jar
Posted by Johan Edstrom <jo...@opennms.org>.
I'm not sure that actually is needed, from the jax-ws website -
JDK 6u4 includes JAX-WS 2.1 and JAXB 2.1 API and RI. JAX-WS RI 2.2EA includes newer and enhanced RI of JAX-WS/JAXB 2.1. In order to run JAX-WS RI 2.2EA you would need to put the jars in the classpath(endorsed mechanism is not required anymore).
On Jun 17, 2010, at 10:41 AM, Benson Margulies wrote:
> More or less putting it in the boot classpath.
>
>
>
> On Thu, Jun 17, 2010 at 12:30 PM, Glen Mazza <gl...@gmail.com> wrote:
>>
>> BTW, what does "endorse" mean here--I don't understand the concept.
>>
>> Thanks,
>> Glen
>>
>>
>> jim ma wrote:
>>>
>>> Hi all ,
>>>
>>> When we update to jaxws 2.2 , we have to endorse the jaxws api jar for
>>> jdk6. I've updated the jaxws api dependency to 2.2 and endorsed the
>>> jaxws api 2.2 jar to maven surefire and compiler plugin . If there
>>> is no objection , I will check in this change .
>>> We also need to look at endorsing the maven codegen plugin , cxf ant
>>> task and samples in distribution kit. If you have any concerns and
>>> thoughts about jaxws2.2 api update and endorse dir , please let me
>>> know .
>>>
>>> Thanks
>>>
>>> Jim
>>>
>>>
>>
>> --
>> View this message in context: http://old.nabble.com/Endorse-jaxws-2.2-API-jar-tp28916357p28916691.html
>> Sent from the cxf-dev mailing list archive at Nabble.com.
>>
>>
Johan Edstrom
joed@opennms.org
They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.
Benjamin Franklin, Historical Review of Pennsylvania, 1759
Re: Endorse jaxws 2.2 API jar
Posted by Benson Margulies <bi...@gmail.com>.
More or less putting it in the boot classpath.
On Thu, Jun 17, 2010 at 12:30 PM, Glen Mazza <gl...@gmail.com> wrote:
>
> BTW, what does "endorse" mean here--I don't understand the concept.
>
> Thanks,
> Glen
>
>
> jim ma wrote:
>>
>> Hi all ,
>>
>> When we update to jaxws 2.2 , we have to endorse the jaxws api jar for
>> jdk6. I've updated the jaxws api dependency to 2.2 and endorsed the
>> jaxws api 2.2 jar to maven surefire and compiler plugin . If there
>> is no objection , I will check in this change .
>> We also need to look at endorsing the maven codegen plugin , cxf ant
>> task and samples in distribution kit. If you have any concerns and
>> thoughts about jaxws2.2 api update and endorse dir , please let me
>> know .
>>
>> Thanks
>>
>> Jim
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Endorse-jaxws-2.2-API-jar-tp28916357p28916691.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>
>
Re: Endorse jaxws 2.2 API jar
Posted by Glen Mazza <gl...@gmail.com>.
BTW, what does "endorse" mean here--I don't understand the concept.
Thanks,
Glen
jim ma wrote:
>
> Hi all ,
>
> When we update to jaxws 2.2 , we have to endorse the jaxws api jar for
> jdk6. I've updated the jaxws api dependency to 2.2 and endorsed the
> jaxws api 2.2 jar to maven surefire and compiler plugin . If there
> is no objection , I will check in this change .
> We also need to look at endorsing the maven codegen plugin , cxf ant
> task and samples in distribution kit. If you have any concerns and
> thoughts about jaxws2.2 api update and endorse dir , please let me
> know .
>
> Thanks
>
> Jim
>
>
--
View this message in context: http://old.nabble.com/Endorse-jaxws-2.2-API-jar-tp28916357p28916691.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Endorse jaxws 2.2 API jar
Posted by Daniel Kulp <dk...@apache.org>.
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.
Dan
>
> 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
dkulp@apache.org
http://dankulp.com/blog
Re: Endorse jaxws 2.2 API jar
Posted by Glen Mazza <gl...@gmail.com>.
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?
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.
>
--
View this message in context: http://old.nabble.com/Endorse-jaxws-2.2-API-jar-tp28916357p28952108.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Endorse jaxws 2.2 API jar
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 22 June 2010 9:39:43 am Jim Ma wrote:
> Hi Dan,
> Looks nice,especially the jaxws 2.2 Providerimpl. Can we also use this
> profile to publish jaxws2.2 jar with different artifact id into maven
> repository?
Shouldn't need a new artifactId or anything. I just need to update hudson to
add the -Pjaxws22 profile onto the maven command line. I'll do that now.
I may try and see if I can get this to be the default when run from maven, but
not when the setup eclipse stuff is done. I'll need to play a bit more.
The other thing I'm thinking of trying is when using Java5, make the default
be jaxb2.2 and jaxws 2.2 across the board since we don't need to endorse
anything. That will probably screw up the kits a bit. Not really sure
though. Must play a bit with it. :-)
Dan
> Jim
>
> On Jun 22, 2010, at 2:20, Daniel Kulp <dk...@apache.org> wrote:
> > Jim,
> >
> > I just committed some changes that I think should work for us. Can
> > you give
> > it a look?
> >
> > Basically, in jaxws module, I've separated out the jaxws 2.2
> > specific stuff
> > into a separate source tree. I've added a "jaxws22" profile that
> > will add
> > the 2.2 stuff into the build and setup the endorsed stuff (for
> > compile only
> > right now, would need to add surefire as well if/when we need it) as
> > well as
> > include a different META-INF/services/... file that points at the 2.2
> > provider.
> >
> > 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.
> >
> > What's good is that the 2.2 Provider will detect if 2.2 api jar is not
> > available and will return the 2.1 Endpoint if not. Thus, it should
> > work fine
> > with 2.1 (non-endorsed) type stuff as well. You can easily test
> > this by
> > building jaxws with -Pjaxws22 and going to the system tests and run
> > them.
> > Since they don't bring in 2.2 at all, and they still run completely
> > fine, it's
> > looking pretty good.
> >
> > Anyway, I would need to update the release profiles to add the
> > jaxws22 profile
> > stuff and I still need to update the distribution to somehow take it
> > into
> > account and create the new jaxws22-endorsed lib dir as well. But I
> > wanted
> > you to look at this so far.
> >
> > Dan
> >
> > On Friday 18 June 2010 11:11:16 am jim ma wrote:
> >>> Possibly not. It would end up as a classpath ordering issue more
> >>> than
> >>> anything else. The 2.2 jar would just need to be in front of the
> >>> other
> >>> jar on the classpath or in the classloader. For the
> >>> distribution, we
> >>> can easily setup the manifest jar to put the 2.2 jar first, but
> >>> not put
> >>> it in lib. To use 2.2, it would just be a matter of copying the
> >>> jar
> >>> into lib and the manifest would automatically pick it up first.
> >>
> >> This can only fix the use case which uses manifest jar to pick up
> >> all cxf
> >> jars. It does not work for the other projects which explicitly add
> >> specific cxf jars to
> >> integrate cxf as their web service server . Using the classpath
> >> ordering is not easy for
> >> other projects embeds cxf to switch jaxws2.2 implementation .
> >>
> >> Cheers,
> >> Jim
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Endorse jaxws 2.2 API jar
Posted by Jim Ma <ma...@gmail.com>.
Hi Dan,
Looks nice,especially the jaxws 2.2 Providerimpl. Can we also use this
profile to publish jaxws2.2 jar with different artifact id into maven
repository?
Jim
On Jun 22, 2010, at 2:20, Daniel Kulp <dk...@apache.org> wrote:
>
> Jim,
>
> I just committed some changes that I think should work for us. Can
> you give
> it a look?
>
> Basically, in jaxws module, I've separated out the jaxws 2.2
> specific stuff
> into a separate source tree. I've added a "jaxws22" profile that
> will add
> the 2.2 stuff into the build and setup the endorsed stuff (for
> compile only
> right now, would need to add surefire as well if/when we need it) as
> well as
> include a different META-INF/services/... file that points at the 2.2
> provider.
>
> 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.
>
> What's good is that the 2.2 Provider will detect if 2.2 api jar is not
> available and will return the 2.1 Endpoint if not. Thus, it should
> work fine
> with 2.1 (non-endorsed) type stuff as well. You can easily test
> this by
> building jaxws with -Pjaxws22 and going to the system tests and run
> them.
> Since they don't bring in 2.2 at all, and they still run completely
> fine, it's
> looking pretty good.
>
> Anyway, I would need to update the release profiles to add the
> jaxws22 profile
> stuff and I still need to update the distribution to somehow take it
> into
> account and create the new jaxws22-endorsed lib dir as well. But I
> wanted
> you to look at this so far.
>
> Dan
>
>
>
> On Friday 18 June 2010 11:11:16 am jim ma wrote:
>>> Possibly not. It would end up as a classpath ordering issue more
>>> than
>>> anything else. The 2.2 jar would just need to be in front of the
>>> other
>>> jar on the classpath or in the classloader. For the
>>> distribution, we
>>> can easily setup the manifest jar to put the 2.2 jar first, but
>>> not put
>>> it in lib. To use 2.2, it would just be a matter of copying the
>>> jar
>>> into lib and the manifest would automatically pick it up first.
>>
>> This can only fix the use case which uses manifest jar to pick up
>> all cxf
>> jars. It does not work for the other projects which explicitly add
>> specific cxf jars to
>> integrate cxf as their web service server . Using the classpath
>> ordering is not easy for
>> other projects embeds cxf to switch jaxws2.2 implementation .
>>
>> Cheers,
>> Jim
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
Re: Endorse jaxws 2.2 API jar
Posted by Daniel Kulp <dk...@apache.org>.
Jim,
I just committed some changes that I think should work for us. Can you give
it a look?
Basically, in jaxws module, I've separated out the jaxws 2.2 specific stuff
into a separate source tree. I've added a "jaxws22" profile that will add
the 2.2 stuff into the build and setup the endorsed stuff (for compile only
right now, would need to add surefire as well if/when we need it) as well as
include a different META-INF/services/... file that points at the 2.2
provider.
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.
What's good is that the 2.2 Provider will detect if 2.2 api jar is not
available and will return the 2.1 Endpoint if not. Thus, it should work fine
with 2.1 (non-endorsed) type stuff as well. You can easily test this by
building jaxws with -Pjaxws22 and going to the system tests and run them.
Since they don't bring in 2.2 at all, and they still run completely fine, it's
looking pretty good.
Anyway, I would need to update the release profiles to add the jaxws22 profile
stuff and I still need to update the distribution to somehow take it into
account and create the new jaxws22-endorsed lib dir as well. But I wanted
you to look at this so far.
Dan
On Friday 18 June 2010 11:11:16 am jim ma wrote:
> > Possibly not. It would end up as a classpath ordering issue more than
> > anything else. The 2.2 jar would just need to be in front of the other
> > jar on the classpath or in the classloader. For the distribution, we
> > can easily setup the manifest jar to put the 2.2 jar first, but not put
> > it in lib. To use 2.2, it would just be a matter of copying the jar
> > into lib and the manifest would automatically pick it up first.
>
> This can only fix the use case which uses manifest jar to pick up all cxf
> jars. It does not work for the other projects which explicitly add
> specific cxf jars to
> integrate cxf as their web service server . Using the classpath
> ordering is not easy for
> other projects embeds cxf to switch jaxws2.2 implementation .
>
> Cheers,
> Jim
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog