Hi Stefano,

Stefano Bagnara wrote:

> In Apache JAMES we have a multimodule project depending on javamail.
> 
> We want to easily switch from sun's javamail to geronimo javamail and
> back for testing purposes.
> 
> What is the maven best practice for this?
> 
> I don't want to go through all of our modules dependencies and alter
> their declaration and at the same time I don't want my parent pom (in
> the multimodule root) to include a dependency on that as not all of the
> modules should require javamail.
> 
> I currently added
> 
> <properties>
> <javax.mail.groupId>org.apache.geronimo.javamail</javax.mail.groupId>
> <javax.mail.artifactId>geronimo-javamail_1.4_mail</javax.mail.artifactId>
>
<javax.activation.groupId>org.apache.geronimo.specs</javax.activation.groupId>
>
<javax.activation.artifactId>geronimo-activation_1.1_spec</javax.activation.artifactId>
> <!--
> <javax.activation.groupId>javax.activation</javax.activation.groupId>
> <javax.activation.artifactId>activation</javax.activation.artifactId>
> <javax.mail.groupId>javax.mail</javax.mail.groupId>
> <javax.mail.artifactId>mail</javax.mail.artifactId>
> -->
> </properties>
> 
> to my main pom and then used similar snippets in child poms:
> 
> <dependency>
>    <groupId>${javax.mail.groupId}</groupId>
>    <artifactId>${javax.mail.artifactId}</artifactId>
> </dependency>
> 
> 
> Is this the best way?

We use always the Sun version, but declare it (already in an inherited
depMgmnt section) as provided (as it is in an JEE env or newer JDKs). Then
you can easily write an IT using the Geronimo version.

- Jörg


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

Reply via email to