I have been asked to do the following:
- Take a project within a repo (repo has multiple projects inside)
- Build ant build script that will build two separate tomcat webapp war files. They are two web apps.
- The two war files have to be different web app since there are functionalities required in one war file and must not be in another war file
Is this the recommended way to do it? I feel like the proper way is the follows instead:
- Separate web app needs to be in separate projects (even in separate repos to help with commit/push tracking) as a Maven project
- The common between the two web apps should be moved into a common project (even repo as well to track with commit/push better) as a Maven project
- Changes in the common project get deployed by Jenkin into a Nexus/Maven server
- The two web apps will have dependency on the common project via Maven
- Do NOT use ant build anymore, and let Maven build the two war files for two web app projects
Short question is: Is it very strange that we build two separate web app war files (that have something in common) from a single project source with a delicate ant build script. Even if this is possible, I feel this is too much like hacking into the ant build script to copy and paste resources to separate temporary locations and build war files from separate location into separate web apps.