I have an existing web project which currently uses Ant. I have tasks that:
- create the jar based on only certain packages for other applications which use this project as a dependency
- create the war file for the app
and a lot of others.
Separately I have a webservice project which uses the jar built by the previous application. This project uses Maven.
Now what I want to achieve is to move the first project to Maven, break it into core and web, and then move the webservice project into the first one.
So the result will be a multi-module project:
- core
- ui
- webservice
Is it possible to move the sources that deal with the web delivery mechanism into the ui module (which will be a war in Maven), or I need to keep the sources in the core?
What would the best approach to do this be?
Should I look into Maven profiles?
I am a novice with Maven, so I am unsure on how to approach this.
Yes you can achieve what you want with Maven. I would break the modules like this:
Core:
UI:
Web service:
Main Project:
Then, in Core / UI and Web service you declare myapp as the parent:
For further info refer to: