[ 
https://issues.apache.org/jira/browse/FELIX-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483920
 ] 

Stuart McCulloch commented on FELIX-253:
----------------------------------------

Hi, the recommended Maven approach to excluding transitive dependencies is to 
use exclusion filters.

For your example:

  <dependencies>
    <dependency>
      <groupId>bla</groupId>
      <artifactId>service-ejb</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb-client</type>
      <exclusions>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring</artifactId> 
        </exclusion>
        <exclusion>
          <groupId>com.ibatis</groupId>
          <artifactId>ibatis2-sqlmap</artifactId>
        </exclusion>
      </exclusions>
    </dependency> 
  </dependencies>

( see http://maven.apache.org/pom.html#Exclusions for more examples )

If this doesn't solve the problem, could you try removing 
<type>ejb-client</type> from the 'service-ejb' dependency, to see if that is 
stopping it from appearing on the project artifact list. Finally, could you 
send the output from running 'mvn -X package' from the affected project 
directory - thanks.


> Dependency is ignored when it contains excludes
> -----------------------------------------------
>
>                 Key: FELIX-253
>                 URL: https://issues.apache.org/jira/browse/FELIX-253
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: 0.8.0
>            Reporter: Jens Baitinger
>
> I have a ejb client jar that is a dependency for a eclipse plugin. 
> Unfortunately it brings dependencies to spring and Ibatis, that are used by 
> the ejbs. But they are not needed for the client and I don't want to have 
> them in my eclipse plugin, that should only hold the ejb client jar. When I 
> exclude those dependencies, the whole ejb client jar is ignored.
> <dependencies>
>               <dependency>
>                       <groupId>bla</groupId>
>                       <artifactId>service-ejb</artifactId>
>                       <version>1.0-SNAPSHOT</version>
>                       <type>ejb-client</type>                 
>               </dependency>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring</artifactId>
>                       <version>1.2.8</version>
>                       <scope>provided</scope>
>               </dependency>
>               <dependency>
>                       <groupId>com.ibatis</groupId>
>                       <artifactId>ibatis2-sqlmap</artifactId>
>                       <version>2.1.7.597</version>
>                       <scope>provided</scope>
>               </dependency>
>       </dependencies>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to