You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Tuomas Kiviaho (JIRA)" <ji...@apache.org> on 2012/06/20 09:09:43 UTC

[jira] [Created] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Tuomas Kiviaho created FELIX-3565:
-------------------------------------

             Summary: Embed-Transitive leaks transitive dependencies of excluded artifacts
                 Key: FELIX-3565
                 URL: https://issues.apache.org/jira/browse/FELIX-3565
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-2.3.7
            Reporter: Tuomas Kiviaho


I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 

myproject (*;scope=compile|bundle;type=!bundle)
+dep-1;scope=compile;type=jar // included ok
  +dep-1.1;scope=compile;type=jar // included ok
  -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
  -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
    -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
-dep-2;scope=compile;type=bundle // excluded ok because type is bundle
  -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
  +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern

In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.

I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437482#comment-13437482 ] 

Tuomas Kiviaho edited comment on FELIX-3565 at 8/19/12 7:46 PM:
----------------------------------------------------------------

Here's the final patch that covers also instructions parameters and as well as exclusions parameter. It shouldn't be too hard for someone familiar with the testing harness to make a test case to cover the described case. This version already seems to be working with maven2 but maven3 requires still the MSHARED issue to be fixed in one way or another. 

Most of the changes are just delegation of the dependency graph down the execution stack until the dependency filtering is applied. Also the tests required passing of the dependency graph component. The actual work is done in new method AbstractDependencyFilter#filterDependencies and with helps of slight adjustment to AbstractDependencyFilter#processInstruction method. 
                
      was (Author: tuomas_kiviaho):
    Here's a patch that covers also instructions parameters and not only exclusions parameter. It shouldn't be too hard for someone familiar with the testing harness to make a test case to cover the described case. This version already seems to be working with maven2 but maven3 requires still the dependency tree patch. 

Most of the changes are just delegation of the dependency graph down the execution stack until the dependency filtering is applied. Also the tests required passing of the dependency graph component. The actual work is done in new method  {{AbstractDependencyFilter#filterDependencies}} and with helps of slight adjustment to {{AbstractDependencyFilter#processInstruction}} method. 
                  
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting bb-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|runtime;type=!bundle)
> +a-1;scope=compile;type=jar // included ok
>   +aa-1.1;scope=compile;type=jar // included ok
>   -ab-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -ac-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -aca-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -b-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -ba-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +bb-2.2;scope=compile;type=jar // NOT excluded ok because parent already excluded
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Attachment: maven-bundle-plugin.patch

Here's a patch that doesn't fix the described case of instruction based exclusion but works already for excludeDependencies parameter. It uses the newest dependency tree component that seems to be working for maven 2.x as promised. 
                
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|bundle;type=!bundle)
> +dep-1;scope=compile;type=jar // included ok
>   +dep-1.1;scope=compile;type=jar // included ok
>   -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -dep-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Attachment: maven-bundle-plugin.patch

Here's a patch that covers also instructions parameters and not only exclusions parameter. It shouldn't be too hard for someone familiar with the testing harness to make a test case to cover the described case. This version already seems to be working with maven2 but maven3 requires still the dependency tree patch. 

Most of the changes are just delegation of the dependency graph down the execution stack until the dependency filtering is applied. Also the tests required passing of the dependency graph component. The actual work is done in new method  {{AbstractDependencyFilter#filterDependencies}} and with helps of slight adjustment to {{AbstractDependencyFilter#processInstruction}} method. 
                
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting bb-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|runtime;type=!bundle)
> +a-1;scope=compile;type=jar // included ok
>   +aa-1.1;scope=compile;type=jar // included ok
>   -ab-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -ac-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -aca-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -b-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -ba-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +bb-2.2;scope=compile;type=jar // NOT excluded ok because parent already excluded
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Description: 
I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting bb-2.2 embedded although it should be excluded. 

myproject (*;scope=compile|runtime;type=!bundle)
+a-1;scope=compile;type=jar // included ok
  +aa-1.1;scope=compile;type=jar // included ok
  -ab-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
  -ac-1.3;scope=provided;type=bundle // excluded ok because scope is provided
    -aca-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
-b-2;scope=compile;type=bundle // excluded ok because type is bundle
  -ba-2.1;scope=provided;type=jar // excluded ok because scope is provided
  +bb-2.2;scope=compile;type=jar // NOT excluded ok because parent already excluded

In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.

I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

  was:
I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 

myproject (*;scope=compile|bundle;type=!bundle)
+dep-1;scope=compile;type=jar // included ok
  +dep-1.1;scope=compile;type=jar // included ok
  -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
  -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
    -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
-dep-2;scope=compile;type=bundle // excluded ok because type is bundle
  -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
  +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern

In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.

I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

    
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting bb-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|runtime;type=!bundle)
> +a-1;scope=compile;type=jar // included ok
>   +aa-1.1;scope=compile;type=jar // included ok
>   -ab-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -ac-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -aca-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -b-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -ba-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +bb-2.2;scope=compile;type=jar // NOT excluded ok because parent already excluded
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Attachment: maven-bundle-plugin.patch

Here's the same patch now working with released version of the new dependency tree
                
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|bundle;type=!bundle)
> +dep-1;scope=compile;type=jar // included ok
>   +dep-1.1;scope=compile;type=jar // included ok
>   -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -dep-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Attachment:     (was: maven-bundle-plugin.patch)
    
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting bb-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|runtime;type=!bundle)
> +a-1;scope=compile;type=jar // included ok
>   +aa-1.1;scope=compile;type=jar // included ok
>   -ab-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -ac-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -aca-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -b-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -ba-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +bb-2.2;scope=compile;type=jar // NOT excluded ok because parent already excluded
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435899#comment-13435899 ] 

Tuomas Kiviaho commented on FELIX-3565:
---------------------------------------

I noticed that the example which used type bundle would not be working correctly due to http://jira.codehaus.org/browse/MSHARED-235
                
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|bundle;type=!bundle)
> +dep-1;scope=compile;type=jar // included ok
>   +dep-1.1;scope=compile;type=jar // included ok
>   -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -dep-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3565) Embed-Transitive leaks transitive dependencies of excluded artifacts

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho updated FELIX-3565:
----------------------------------

    Attachment:     (was: maven-bundle-plugin.patch)
    
> Embed-Transitive leaks transitive dependencies of excluded artifacts
> --------------------------------------------------------------------
>
>                 Key: FELIX-3565
>                 URL: https://issues.apache.org/jira/browse/FELIX-3565
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>            Reporter: Tuomas Kiviaho
>         Attachments: maven-bundle-plugin.patch
>
>
> I was trying to re-config some of my projects so that I get compile(+runtime) scoped dependencies and their transitive dependencies embedded by using Embed-Transitive=true with the exception of dependencies that I had with type bundle. Exclusion of bundles turned out to be trickier than I though because I can't use provided scope without sacrificing the respective transitive dependencies in the process. Everything went ok until I noticed that inclusion process with the transitive dependencies of already excluded compile scoped dependencies that had type set to bundle as shown below where I'm getting dep-2.2 embedded although it should be excluded. 
> myproject (*;scope=compile|bundle;type=!bundle)
> +dep-1;scope=compile;type=jar // included ok
>   +dep-1.1;scope=compile;type=jar // included ok
>   -dep-1.2;scope=compile;type=bundle // excluded ok and there are no transitive dependency candidates available
>   -dep-1.3;scope=provided;type=bundle // excluded ok because scope is provided
>     -dep-1.3.1;scope=compile;type=jar  // excluded ok although scope is compile because provided scope doesn't reveal any of the existing dependencies as transitive dependencies
> -dep-2;scope=compile;type=bundle // excluded ok because type is bundle
>   -dep-2.1;scope=provided;type=jar // excluded ok because scope is provided
>   +dep-2.2;scope=compile;type=jar // NOT excluded ok because scope and type no not match exclusion pattern
> In short: Everything not matching exclusion pattern (and matching inclusion pattern) will be excluded no matter if their origin has been already excluded.
> I checked the codebase and noticed that the reason for having 'NOTE: test scoped dependencies are not included in the classpath seen by BND.' on the web page accumulated from the problem. It seems that dependency tree shared component seems to have given problems before and that Aether isn't backwards compatible but I suggest giving a try to maven-dependency-tree 2.0 that is Aether based for Maven 3 but remains still backwards compatible with Maven 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira