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 third convention in Maven, a set of conventions really, is the use of a standard naming convention
for directories and for the primary output of each project. The naming conventions provide clarity and
immediate comprehension. This is important if there are multiple subprojects involved in a build
process, because the naming convention keeps each one separate in a logical, easily comprehensible

This is illustrated in the Coherent Organization of Dependencies section, later in this chapter.

A simple example of a standard naming convention might be commons-logging-1.2.jar. It is
immediately obvious that this is version 1.2 of Commons Logging. If the JAR were named commons-
logging.jar you would not really have any idea of the version of Commons Logging. Moreover, in
a lot of cases, you would not even be able to get the information from the jar's manifest.

The intent behind the standard naming conventions employed by Maven is that it lets you understand
exactly what you are looking at by, well, looking at it. It doesn't make much sense to exclude pertinent
information when you can have it at hand to use.

Systems that cannot cope with information rich artifacts like commons-logging-1.2.jar are
inherently flawed because eventually, when something is misplaced, you'll track it down to a
ClassNotFound exception, which results because the wrong version of a JAR file was used. It's
happened to all of us, but with Maven, and it doesn't have to happen again.

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)//-->