문제

I've searched this for quite some time now and haven't found an answer I need.

I'm working on a project which consists of 3 modules:

  1. module (jar)
  2. server (war)
  3. client (war)

server and client depend on module, but client also depends on the fact that server is built before the client so it's WSDL's are generated before client's wsimport can import them and generate client classes.

How can I set client project to be dependent on server project in a way that server project will not be included in the client.war or overlayed in any way and only instruct Maven to build and package server before client?

And how to add a war-deploy to Glassfish action during package phase of the server project?

Right now I only have clean project which only depends on the module project which can be embedded into server and client.

도움이 되었습니까?

해결책

You can add an dependency from the client-module to the server-module and set this dependency to provided (the scope). Then the server-module should not be part of the client-module.

But I am not sure if this is the maven-way. Sounds a bit like a hack...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top