You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mike Youngstrom (JIRA)" <ji...@codehaus.org> on 2010/03/25 21:41:23 UTC

[jira] Issue Comment Edited: (MNG-2966) Use optional transitive dependencies versions as dependencyManagement does

    [ http://jira.codehaus.org/browse/MNG-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215342#action_215342 ] 

Mike Youngstrom edited comment on MNG-2966 at 3/25/10 3:39 PM:
---------------------------------------------------------------

A colleage of mine had a conversation with Jason and Brian about this feature and they said that the "inclusion" method was out because of the complexities of changing the model xml.

However, they did say that the blank version approach could work if it can be done without changing the xml.  And that they would likely accept it if there was a good patch with tests submitted.

Which is good since the blank version approach seems as though it will be easier to implement. :)  I'm going to start work on a patch.

Mike

      was (Author: youngm):
    A college of mine had a conversation with Jason and Brian about this feature and they said that the "inclusion" method was out because of the complexities of changing the model xml.

However, they did say that the blank version approach could work if it can be done without changing the xml.  And that they would likely accept it if there was a good patch with tests submitted.

Which is good since the blank version approach seems as though it will be easier to implement. :)  I'm going to start work on a patch.

Mike
  
> Use optional transitive dependencies versions as dependencyManagement does
> --------------------------------------------------------------------------
>
>                 Key: MNG-2966
>                 URL: http://jira.codehaus.org/browse/MNG-2966
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Dependencies
>    Affects Versions: 2.0.6
>            Reporter: Daniel Beland
>             Fix For: 3.x (to be reviewed)
>
>
> I would like to be able to add an includes statement on a dependency to get its optional dependency(ies).
> ie:
>     <dependency>
>       <groupId>hibernate</groupId>
>       <artifactId>hibernate</artifactId>
>       <version>3.2.1.ga</version>
>       <inclusions>
>         <inclusion>
>           <groupId>jgroups</groupId>
>           <artifactId>jgroups-all</artifactId>
>           <scope>runtime</scope>
>           <optional>false</optional>
>         </inclusion>
>       </inclusions>
>     </dependency>
>  For example, I use hibernate 3.2.1.ga, it has an optional dependency on jgroups-all-2.2.8.
> I would like to be able to add an inclusion statement on the hibernate lib to tell that I want to include jgroups as well. 
> The main reason for this is that I want the same version as specified in the hibernate pom.
> This way, upgrading hibernate would also upgrade my version of jgroups at the same time.
> Obviously, we need to be able to define a scope and optional attribute as well (not inherited)
> Or maybe we could set the dependency explicitly in the pom without specifying the version and have maven resolve the version from the nearest source (as it does normally) automatically or we specify where to resolve it.
> ie something like:
>     <dependency>
>       <groupId>jgroups</groupId>
>       <artifactId>jgroups-all</artifactId>
>       <! -- either maven resolves the version from the nearest source automatically or we need to tell maven where to find it -->
>       <versionLookup>
>         <groupId>hibernate</groupId>
>         <artifactId>hibernate</artifactId>
>         <!-- maven will resolve the version from the hibernate pom as long as hibernate is already a dependency of my project (no version needed)
>                or we specify which version from a property (to have it defined only once in the pom) -->
>         <version>${hibernate.version}</version>
>       </versionLookup>
>       <scope>runtime</scope>
>       <optional>false</optional>
>     </dependency>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira