We are a small team but have a couple of big Maven projects.
One project has over 70 modules that depends on about 60 external libraries.
The final application is a portal that runs on Tomcat.
Ron
On 16/11/2011 11:57 PM, Ron Wheeler wrote:
Your situation is pretty common.
ProjectA
ProjectB
ProjectC
ProjectD
DeliverableX
DeliverableY
are all separate projects.
You build and release Project A to D as independent library versions.
The deliverables are just projects that depend on the other projects.
Think of your projects in the same way you look at third party libraries
Do not get too confused about parent projects. Try to keep them simple
and focused on identifying things that are common to the entire
project(deployment repositories).
Get your own Maven repo installed and working before you start using
Mavem. I really like Nexus but some people use other repo systems.
It makes the whole Maven concept easier to understand and puts you on
the right track .
We wasted 2 years working with Maven without a repo.
Key things to remember:
1) Maven profiles are inherently evil. They leads to problems and
really bad practices. In my opinion, the world would be a better place
without them. I have never used them but I have seen people get into
bad headspaces after dabbling in profiles.
2) If you fight Maven you will lose. It is very determined and depends
on you adopting the "Maven philosophy". It will battle you until you
submit so you might as well submit now and enjoy life.
3) Do not mix run-time issues with build time activities.
http://blog.artifact-software.com/tech/?p=58
4) Use the assembly plug-in to build modules that create archives
(zip, war) that do not have any compiled code (DeliverableX,
DeliverableY). The shade plug-in is also used. Not sure why.
5) Remember that thousands of people use maven to build all sorts of
applications. If you have questions - ask. Someone has already solved
the problem unless you are building something so bizarre that no one
else has ever built anything like it.
Ron
On 16/11/2011 11:34 PM, Barrie Treloar wrote:
On Thu, Nov 17, 2011 at 2:23 PM, zebahmad<[email protected]> wrote:
Hi,
I am currently migrating my projects from my company's in-house
build system
based on ant, to maven. We have a concept of deliverable, where a
deliverable may be a combination of projects. Two or more projects are
basically merged, to create a deliverable. The projects may be part
of more
than 1 deliverable.
e.g. Suppose we have 4 projects
ProjectA
ProjectB
ProjectC
ProjectD
and two deliverables
DeliverableX |--*ProjectA*
|--ProjectB
DeliverableY|--*ProjectA*
|--ProjectC
|--ProjectD
Here ProjectA needs to be separated out as it is common code, yet it
is part
of the DeliverableX and DeliverableY. I cannot change the structure of
DeliverableX and DeliverableY, as the existing codebase entirely
depends
upon this packaging. How can I implement this with maven? I checked out
multi-module projects, but that seems to require me to embed the
module into
a parent project. Any pointers are appreciated!!
Have you read the freely available books at
http://maven.apache.org/articles.html
You can try the assembly plugin
http://maven.apache.org/plugins/maven-assembly-plugin/
That should be able to copy/layout on disk the contents of the
artifacts for each project that DeliverableX depends upon allowing you
to repackage however you see fit.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]