Nikolas Falco created FELIX-5501:
------------------------------------

             Summary: Pom dependency are not reduced when embedding is inline
                 Key: FELIX-5501
                 URL: https://issues.apache.org/jira/browse/FELIX-5501
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-3.2.0
         Environment: Maven 3.3.9
Windows OS
            Reporter: Nikolas Falco


Looking the code seems that reduction is not done if embed is marked inline.

Let me explain with use cases.

*Use case 1*
I would embed a third party (for example commons-io) dependency inline into my 
project P1 means that all commons-io classes are placed into the P1.jar.
They are visible throught export package manifest header in a OSGi environment 
and to the compiler at compile time (javac).

When I build with maven a project P2 that has P1 as dependency, maven looks 
also for P1 dependencies, so I have in the classpath (P1 + commons-io) classes 
from P1 jar and commons-io classes again from commons-io jar. Similar problem 
on copy-dependency-plugin.

I think that this is the use case that have more benefit of pom reduction.

*Use case 2*
I would embed a third party (for example commons-lang) dependency into my 
project P1 as jar into _lib/_ folder, means that commons-lang.jar is placed 
into lib folder of the P1.jar and it's added to Bundle-Classpath manifest 
header.
They are visible throught export package manifest header in a OSGi environment 
but *NO* to the compiler at compile time (javac).

When I build with maven a project P2 that has P1 as dependency, maven looks 
also for P1 dependencies (empty because stripped by reduction), so I have in 
the classpath onyl P1 classes from P1 jar and no commons-lang classes so build 
will break.

So I think that this is the use case that have should no benefit of pom 
reduction.

The actual behaviour is reversed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to