On Thu, 2008-05-22 at 15:23 +0200, simon wrote:
> On Thu, 2008-05-22 at 15:02 +0200, Magne Nordtveit wrote:
> > I'm just wondering, how do you name your artifacts in a large
> > multimoduled project to avoid having two modules with the same
> > artifact-id?
> > 
> > I am thinking in the lines of project-partofgroupid-descriptivename as
> > artifact-id. This would make the name of the final jar files (at least
> > more) unique and easily identified, but it might give some long
> > file-names...
> > 
> > I guess I'm just asking for suggestions here, or a pointer if it exists
> > a best-practise on it?
> 
> Why not just set the groupId to something reasonable.
> 
> If your company is acme.com, then the groupId should *start* with
> "com.acme", but you can have any arbitrary number of parts after that.
> 
> And presumably your modules have structured java package names so that
> the classnames don't collide. So why not model the groupId after the
> package in which the code for each module lives?
> 
>   com.acme.tractor.engine
>   com.acme.tractor.chassis
>   com.acme.steamroller
> 
> IMO, that is nicer than embedding excessive structure into the
> artifactId.
> 
> Regards,
> Simon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Exactly.

But what happens when you have com.acme.tractor:common and
com.acme.steamroller:common if you for some reason need to have both
common-packages (ok, probably a bad example) as a dependency to another
project?

When running, wouldn't the classpath be set too
"lib/common-1.0.jar:lib/common-1.0.jar"? As far as I know, its only the
artifactId that gets put into the actual jar-file.

That's what i want to avoid before it happens and while our project is
still sub-100 modules.

Magne
-- 
Magne Nordtveit <[EMAIL PROTECTED]>
Systems Engineer
Offshore Simulator Centre AS
http://www.offsimcentre.no/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to