How to create .war file using maven?

前端 未结 3 1452
挽巷
挽巷 2021-01-12 13:49

Here is my project consisting of the following maven modules:

model, services, web

Only web module war file is creating under target folder..web

3条回答
  •  伪装坚强ぢ
    2021-01-12 14:12

    I assume the web module depends on the model and services module. Then in the web module you should use packaging

    war
    

    which will create a WAR with everything in it. See War Plugin The created WAR contains its dependencies. You can not deploy the model or services projects alone.

    If your project already is packaged as war, check if JARs of model and services are inside the WAR/WEB-INF/lib folder. if yes everything is ok and the war is ready to be deployed.

提交回复
热议问题