Take the 2-minute tour ×

i'm building a WebService-Client for an in-house-Service, which should be integrated into 2 3rd-Party Java legacy-application.

My jar-package contains generated classes and some wrapper-classes around those generated classes. For one of those 3rd-party applications its a requirement to use CXF, for the other one JAX-WS RI.

Most of the Wrapper-Classes are the same for both implementations, just one is tied to CXF/JAX-WS.

How can i setup a maven build-process which generates one Jar (with the respective Wrapper-File) for CXF and the other one for JAX-WS?

I'm quite new to maven.

My first thougt was to split up my stuff somehow; The classes which are common in both implementations get in one jar, classes which are Implementation-Specific go to separate JARs (CXF or JAX-WS RI - "Target) and generated classes go to separate JARs too...

Any help or hints are greatly appreciated.


share|improve this question
After some googling around, it seems that a multi-module-maven project could be my friend, right? –  crushervx Nov 22 '12 at 15:37
The solution you mentioned to have a common module and two separate modules for each implementation is the way it should go. Yes and you are going towards an multi-module build. –  khmarbaise Nov 23 '12 at 8:58
add comment


Your Answer



Browse other questions tagged or ask your own question.