[ 
http://jira.codehaus.org/browse/MANTTASKS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy closed MANTTASKS-102.
-----------------------------------

      Assignee: Herve Boutemy
    Resolution: Won't Fix

Hi Kevin,

Scopes are not intended to do what you're trying : see 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.

As I replied in the Users list : 
http://www.nabble.com/Maven-Ant-Tasks%3A-provided-dependencies-don%27t-exclude-trans-to14121460s177.html#a14121460,
 getting a simple dependency without any transitivity handling is IMHO best 
done simply with Ant's get task :
{code:xml}<get 
src="http://repo1.maven.org/maven2/org/springframework/spring/2.0.7/spring-2.0.7.jar";
 dest="bogus"/>{code}


> Provided scope doesn't filter out transitive dependencies
> ---------------------------------------------------------
>
>                 Key: MANTTASKS-102
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-102
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: dependencies task
>    Affects Versions: 2.0.7
>            Reporter: Kevin Stembridge
>            Assignee: Herve Boutemy
>            Priority: Minor
>
> Copied from a posting to the Maven users list:
> I'm trying to use the dependencies ant task to copy artifacts to a given 
> location but I'm having trouble excluding transitive dependencies. 
> My understanding from the documentation is that I should be able to use the 
> following XML to copy an artifact, without its transitives. But, nothing at 
> all gets copied.
> {code:xml}
> <target name="test">
>         
>     <artifact:dependencies filesetId="copy.test.fileset" useScope="provided" 
> verbose="true">
>         <dependency groupId="org.springframework" artifactId="spring" 
> version="2.0.7" scope="provided"/>
>     </artifact:dependencies>
>     
>     <copy todir="bogus" verbose="true">
>         <fileset refid="copy.test.fileset" />
>         <mapper type="flatten" />
>     </copy>
>     
> </target>
> {code}
> I've tried the following combinations of the useScope and scope attributes:
> ||useScope || scope || Result||
> |provided | provided | Nothing copied|
> |provided | runtime | Nothing copied|
> |provided | compile | Nothing copied|
> |runtime | provided | Nothing copied|
> |runtime | runtime | Dependency and transitives copied|
> |runtime | compile | Dependency and transitives copied|
> |compile | provided | Dependency and transitives copied|
> |compile | runtime | Nothing copied|
> |compile | compile | Dependency and transitives copied|
> Note that none of these configurations gives me a dependency without any 
> transitives. I understand that I can specify exclusion elements to exclude 
> all the transitives but it seems to me that specifying provided scope is 
> supposed to achieve the same goal, and would be much nicer. 

-- 
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

        

Reply via email to