We've done something similar. We use project of type pom that declares dependencies to things that several of our projects need.
So, create a project with all the EJB dependencies, and include it as a standard dependency. The transitive-dependency mechanism in maven will take care of the rest. Stefan Roland Förther <[EMAIL PROTECTED]> skrev 31.07.2006 12:33:04: > Hi, > > On 31.07.2006 at 11:42, Barrie Treloar wrote: > > > On 7/31/06, Roland Förther <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> is it possible to specify a dependency on several modules > >> by a single dependency declaration (e.g. by a dependency on a parent > >> pom)? > > > > You might want to explain more of what you are trying to do. > > Ok, let me describe, what I'm trying to do. Think of a web client, > which acts on a J2EE middleware using many ejb client JARs. > Each ejb client JAR is an artifact generated by a maven project with > type 'ejb'. > These ejb projects do not depend on each other and are part > of what we call a middleware application. > > In the web client's POM I have to make a dependency declaration > on each ejb client jar separately. It would be nice for convenience > to have > a kind of maven project, which for example could be called > 'application-x-ejb-client', > that bundles the dependencies for a client and might help deliver > them all > by providing a single dependency declaration on application-x-ejb-client > in thw web client's POM. > > > > > > Also you might want to make sure the terminology you use is correct. > > It took me a while to work it out and I can't guarantee I'm 100% > > correct. > > > > A module is just a way to make building your application easier from > > the command line. > > It has zero effect on dependencies since in order to be a parent > > module and have modules your project must be of type pom, which is > > doesn't compile anything. (You do get pom.xml inheritance but that is > > not the same as dependencies). Through the use of modules you can run > > a single maven command at the parent level and it will also be run on > > all the modules. > > > > A dependency is where your artifact requires the other artifact. And > > with Maven 2 this is now transitive. So if artifact A depends on > > artifact B, and artifact B depends on C, then artifact A will > > automatically pull in C through B. You can have dependencies without > > having a module. > > I agree. > > > > > HTH > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > Thanks, > > Roland > > ______________________________________________________________ > Roland Förther 100world.com AG > [EMAIL PROTECTED] www.100world.com > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
