Unless something has changed (regression), this is automatically handled by recent releases of the EAR and WAR plugins (jars are renamed to be unique). Give it a try and report back.
Wayne On 8/26/08, Shakun Gupta <[EMAIL PROTECTED]> wrote: > Hi Guillaume, > > Sorry, I did not provide a bit of clarification while asking the question. > Actually, all our projects have a similar structure. > For ex : - > A (groupId) > - entities (artifactId) > - utilities (artifactId) > etc.. > > B (groupId) > - entities (artifactId) > - utilities (artifactId) > etc.. > > Entities in A is totally different from entities in B, so I can not share > entities. When i run /*mvn install, */entities are installed in the > .m2/respository as follows : > > A (groupId) > - entities (artifactId) > - 1.0.0 > - entities-1.0.0.jar > - etc.. > B (groupId) > - entities (artifactId) > - 1.0.0 > - entities-1.0.0.jar > - etc.. > > So, now if my another project D (also following the same structure), depends > on both A and B, and I deploy a web-app, then there is a conflict between > the entities-1.0.0.jar. > > I can do one thing as renaming entities in A to A-entities and so on to > avoid the conflict. Is there a better way? I am not sure if the folder name > (entities) can be different from the artifactId. > > Regards, > Shakun > > Jeudy, Guillaume wrote: > > > > An artifact is uniquely identified by its groupId, artifactId, version and > classifier. > > In your case I hope your groupId, artifactId is different because your > 'M' module really(i deduce) is a different module for 'A' & 'B' projects. > > If your M module is a shared module then I suggest that either 'A' or 'B' > refer to the other 'M' rather than installing it's own 'M'. You might also > want to move out M module in its own project and have both A and B refer to > it. You'll have to take into account the lifecycles of your projects and > decide what makes the most sense to do. > > -GJ > > > > ________________________________ > > > > From: Shakun Gupta [mailto:[EMAIL PROTECTED] > > Sent: Mon 25/08/2008 6:28 AM > > To: Maven Users List > > Subject: how to manage two different projects with similar project > structures > > > > > > > > Hi, > > > > I have created two different projects, say "A" & "B". Both contain a > > module, say "M". When i run, /mvn install /in both the projects, M gets > > installed in my local repository at two different locations, but with > > the same name, say M-1.0.0.jar. Now, if I add the modules M as > > dependencies to my 3rd application, say "D", in the final war of D, only > > one M is there. > > Is there a way to change the name of M-1.0.0.jar of A to A-M-1.0.0.jar > > or some similar name, without explicitly renaming the folder name of > > module M to A-M and B-M. > > > > Regards, > > Shakun > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > ____________________________________________________________________________________________________ > > This electronic mail (including any attachments) may contain information > that is privileged, confidential, and/or otherwise protected from disclosure > to anyone other than its intended recipient(s). Any dissemination or use of > this electronic email or its contents (including any attachments) by persons > other than the intended recipient(s) is strictly prohibited. If you have > received this message in error, please notify us immediately by reply email > so that we may correct our internal records. Please then delete the original > message (including any attachments) in its entirety. Thank you. > > > > > ------------------------------------------------------------------------ > > > > > --------------------------------------------------------------------- > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
