maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From João Pedro <pedro.j...@gmail.com>
Subject How to install the impl module for a api dependency in maven
Date Tue, 05 Nov 2013 10:50:27 GMT
I have a multi-module maven project structured in something like this:

parent
   |
   |-presentation
   |+services
   |    |-services-api
   |    |-services-impl
   |+data-access
   |    |-data-access-api
   |    |-data-access-impl
   |-+connector
   |    |-connector-api
   |    |-connector-implA
   |    |-connector-implB
   |-...

The presentation module is packaged in a war and it depends only on the api
modules.

When i run the install goal the only dependencies that the war installs are
the api modules. To choose wich impl modules to install in the presentation
module i'm using profiles that add the dependency to the impl modules at
build time depending on the profiles selected.

>From what i've been reading i don't think that this is correct usage for
the maven profiles.

What is the best way to tell maven to add the chosen impl to the
presentation module?


I would like to keep the dependency to only the api module but with the
usage of profiles, if the profile is active, the dependency is there and no
compilation errors will happen when i reference a class of the impl
module...
thanks
-- 
Cumprimentos,
João Pedro

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message