You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Spencer (JIRA)" <ji...@codehaus.org> on 2007/05/11 17:32:12 UTC
[jira] Created: (MNG-2984) Allow more control around the
configuration and use of optional dependencies
Allow more control around the configuration and use of optional dependencies
----------------------------------------------------------------------------
Key: MNG-2984
URL: http://jira.codehaus.org/browse/MNG-2984
Project: Maven 2
Issue Type: Improvement
Components: Dependencies
Affects Versions: 2.0.6
Reporter: Paul Spencer
This request is based on the following posting to the users mailing list.
How can I include a dependency's optional dependency without
adding the optional dependency to the pom?
As an example, shale-test has an optional dependency on commons-digester. Since
my application does not use commons-digester, I do not have it defined as
a dependency in the pom. When the test that used shale-test failed I had to
determine the failure was due to a missing dependency that was defined in shale-test's
pom. Thus the following questions.
1) Is their a way I can include all of a dependencies optional dependencies
without knowing what they are?
<dependency>
<groupId>org.apache.shale</groupId>
<artifactId>shale-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>test</scope>
<includeOptionalDependencies all="true"/> <!-- Just a guess to illustrate the intent -->
<dependency>
2) Is their a way I can include selected optional dependencies for a dependency?
<dependency>
<groupId>org.apache.shale</groupId>
<artifactId>shale-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>test</scope>
<includeOptionalDependencies> <!-- Just a guess to illustrate the intent -->
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
</dependency>
</includeOptionalDependencies>
<dependency>
3) Can optional dependencies be grouped to allow for the inclusion of a
named group of optional dependencies, thus freeing the user from
having to know and maintain a list of optional dependencies to
include?
<dependency>
<groupId>org.apache.shale</groupId>
<artifactId>shale-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>test</scope>
<includeOptionalDependencies group="FunctionalGroup1"/> <!-- Just a guess to illustrate the intent -->
<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
[jira] Updated: (MNG-2984) Allow more control around the
configuration and use of optional dependencies
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-2984:
------------------------------
Fix Version/s: (was: Reviewed Pending Version Assignment)
3.x
> Allow more control around the configuration and use of optional dependencies
> ----------------------------------------------------------------------------
>
> Key: MNG-2984
> URL: http://jira.codehaus.org/browse/MNG-2984
> Project: Maven 2
> Issue Type: Improvement
> Components: Dependencies
> Affects Versions: 2.0.6
> Reporter: Paul Spencer
> Fix For: 3.x
>
>
> This request is based on the following posting to the users mailing list.
> How can I include a dependency's optional dependency without
> adding the optional dependency to the pom?
> As an example, shale-test has an optional dependency on commons-digester. Since
> my application does not use commons-digester, I do not have it defined as
> a dependency in the pom. When the test that used shale-test failed I had to
> determine the failure was due to a missing dependency that was defined in shale-test's
> pom. Thus the following questions.
> 1) Is their a way I can include all of a dependencies optional dependencies
> without knowing what they are?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies all="true"/> <!-- Just a guess to illustrate the intent -->
> <dependency>
> 2) Is their a way I can include selected optional dependencies for a dependency?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies> <!-- Just a guess to illustrate the intent -->
> <dependency>
> <groupId>commons-digester</groupId>
> <artifactId>commons-digester</artifactId>
> </dependency>
> </includeOptionalDependencies>
> <dependency>
> 3) Can optional dependencies be grouped to allow for the inclusion of a
> named group of optional dependencies, thus freeing the user from
> having to know and maintain a list of optional dependencies to
> include?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies group="FunctionalGroup1"/> <!-- Just a guess to illustrate the intent -->
> <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
[jira] (MNG-2984) Allow more control around the configuration and
use of optional dependencies
Posted by "Christian Schulte (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288444#comment-288444 ]
Christian Schulte commented on MNG-2984:
----------------------------------------
Wouldn't it be sufficient, if the 'optional' flag could be managed using the 'dependencyManagement' ?
{code}
<dependencyManagement>
<dependencies>
<dependencies>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>whatever</version>
<optional>false</optional> <!-- Ignored by Maven 2 & 3 in dependency management. -->
</dependency>
</dependencies>
</dependencyManagement>
{code}
> Allow more control around the configuration and use of optional dependencies
> ----------------------------------------------------------------------------
>
> Key: MNG-2984
> URL: https://jira.codehaus.org/browse/MNG-2984
> Project: Maven 2 & 3
> Issue Type: Improvement
> Components: Dependencies
> Affects Versions: 2.0.6
> Reporter: Paul Spencer
> Fix For: Issues to be reviewed for 3.x
>
>
> This request is based on the following posting to the users mailing list.
> How can I include a dependency's optional dependency without
> adding the optional dependency to the pom?
> As an example, shale-test has an optional dependency on commons-digester. Since
> my application does not use commons-digester, I do not have it defined as
> a dependency in the pom. When the test that used shale-test failed I had to
> determine the failure was due to a missing dependency that was defined in shale-test's
> pom. Thus the following questions.
> 1) Is their a way I can include all of a dependencies optional dependencies
> without knowing what they are?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies all="true"/> <!-- Just a guess to illustrate the intent -->
> <dependency>
> 2) Is their a way I can include selected optional dependencies for a dependency?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies> <!-- Just a guess to illustrate the intent -->
> <dependency>
> <groupId>commons-digester</groupId>
> <artifactId>commons-digester</artifactId>
> </dependency>
> </includeOptionalDependencies>
> <dependency>
> 3) Can optional dependencies be grouped to allow for the inclusion of a
> named group of optional dependencies, thus freeing the user from
> having to know and maintain a list of optional dependencies to
> include?
> <dependency>
> <groupId>org.apache.shale</groupId>
> <artifactId>shale-test</artifactId>
> <version>1.1.0-SNAPSHOT</version>
> <scope>test</scope>
> <includeOptionalDependencies group="FunctionalGroup1"/> <!-- Just a guess to illustrate the intent -->
> <dependency>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira