On Jan 16, 2006, at 8:22 AM, Sean Schofield wrote:

2.) Directory names vs. artifiact names.  Bernd has suggested a
preference for the two matching but this is definitely not a
requirement for maven.  I propose core/trunk/api instead of
core/trunk/myfaces-api.  There is no *technical* reason for doing this
*either way.*  My personal preference is to keep the directory names
as short as possible.  The final product will be call myfaces-api.jar
either way.

I'm using the proposed structure for a project at work and it's working well. I used to have the following directory structure:

project-xyz/pom.xml - Master
project-xyz/project-xyz-core/pom.xml - produces project-xyz-core.jar
project-xyz/project-xyz-webapp1/pom.xml - produces projext-xyz- webapp1.war project-xyz/project-xyz-webapp2/pom.xml - produces projext-xyz- webapp2.war

I refactored the directory structure to this and it is working beautifully:

project-xyz/pom.xml - Master
project-xyz/core/pom.xml - produces project-xyz-core.jar
project-xyz/webapp1/pom.xml - produces projext-xyz-webapp1.war
project-xyz/webapp2/pom.xml - produces projext-xyz-webapp2.war

Now the project has a very logical directory structure without a lot of annoying redundancy, yet the distribution artifacts are still named appropriately. I think this will be a common Maven use case. All your subprojects are intrinsically part of the master project and repeating the name becomes very tiresome :-)

Greg


Reply via email to