P. 1
maven comp

maven comp


|Views: 65|Likes:
Publicado poranon-177773

More info:

Published by: anon-177773 on Oct 25, 2007
Direitos Autorais:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





The second convention used by Maven is the concept that a single Maven project produces only one
primary output. To illustrate,consider a set of sources for a client/server-based application that
contains client code, server code, and shared utility code.

You could produce a single JAR file which includes all the compiled classes, but Maven would
encourage you to have three, separate projects: a project for the client portion of the application, a
project for the server portion of the application, and a project for the shared utility code portion. In this
scenario, the code contained in each project has a different concern (role to play) and they should be

The separation of concerns (SoC) principle states that a given problem involves different kinds of
concerns, which should be identified and separated to cope with complexity and to achieve the
required engineering quality factors such as adaptability, maintainability, extendibility and reusability.

If you have placed all the sources together in a single project, the boundaries between our three
separate concerns can easily become blurred and the ability to reuse the utility code could prove to be
difficult. Having the utility code in a separate project (a separate JAR file), makes it much easier to
reuse. Maven pushes you to think clearly about the separation of concerns when setting up your
projects because modularity leads to reuse.


Better Builds with Maven

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->