Skip to end of metadata
Go to start of metadata

When developing in Maven, you would often like to have the Enunciate-generated client-side artifacts deployed along with your "war" artifact to your Maven repository. There are two approaches to this:

  1. Leverage Enunciate's ability to "attach" an artifact to the Maven project. This is done with the "artifacts" configuration element of the Enunciate Maven Plugin.
  2. Use the Maven Deploy Plugin to deploy an additional artifact.

The Problem with Attaching Artifacts

The problem with the first is that the client-side artifact will be attached to the server-side POM, meaning anybody who depends on the client-side artifact in a project will get all the transitive dependencies of the server-side artifact. Instead, we only need the standalone artifact and no other dependencies. Of course, it's possible to explicitly exclude all the transitive dependencies, but that solution is less than ideal.

Using the Maven Deploy Plugin

What we really want is to have Maven do an additional deploy of our client-side artifact. That's what the Maven Deploy Plugin is used for.

Here's an example of deploying an Enunciate-generated client-side jar and its source jar using the Maven Deploy Plugin. Sure, it's verbose, but that's Maven for you.

Labels
  • None