Sunday, March 25, 2007

Sun Web Service with Maven 2

Is it just me or does this happen to everyone? I find that it's extremely difficult to import all necessary jars from Sun Web Service Developer Pack to Maven 2? There are somewhere around 20 to 30 jars in the jwsdp downloadable package, and there are not a single version number on any jars. I'm able to find some of the projects in global maven repository. However, some of those projects don't really have jars. They only use maven repository as a place holder.

This is what I'm going to do, I'm not very proud of it, but I guess I'll have to live with it. Someone else from the team has already downloaded jwsdp package. He's already extracted out all the jars and moved them to our build server. I will simply copy those jars out and run maven install:file to install those jars as they are our own artifacts.

Here is an example:
mvn install:install-file -DgroudId=my-group -DartifactId=jaxws-api -Dversion=1.0 -Dpackage=jar -Dfile=jaxw-api.jar

I'm pretty sure the real version number for jaxws-api is not 1.0. But what can I do about it since Sun does not provide a version number in the downloadable package. Next time when I download a newer version of jwsdp, I'll have to run maven install-file again to import all the jars.

No comments: