maven-bundle-plugin与不同版本的重复捆绑

时间:2017-07-12 05:03:06

标签: apache-felix maven-bundle-plugin

插件版本:3.3.0

我想知道maven-bundle-plugin如何从重复的Export-Packages包解析版本,以下是来自mvn -X debug输出,看起来插件正在使用找到的第一个包中的版本。

  

----------------------------------------------- ------------------------

     

[DEBUG] BND Classpath:

     

----------------------------------------------- ------------------------

     

-classpath:\ D:\ dev \ m3repo \ io \ dropwizard \ metrics \ metrics-core \ 3.1.2 \ metrics-core-3.1.2.jar,\   d:\ dev的\ m3repo \ COM \ codahale \度量\度量核\ 3.0.2 \度量核-3.0.2.jar

     

----------------------------------------------- ------------------------

MANIFEST.MF(io \ dropwizard \ metrics \ metrics-core \ 3.1.2 \ metrics-core-3.1.2.jar)

sudo debootstrap xenial xenial > /dev/null    
sudo tar -C xenial -c . | sudo docker import - xenial
sudo docker run xenial cat /etc/lsb-release

MANIFEST.MF(com \ codahale \ metrics \ metrics-core \ 3.0.2 \ metrics-core-3.0.2.jar)

Manifest-Version: 1.0 
Bnd-LastModified: 1430020731305 
Build-Jdk: 1.8.0_05 
Built-By: ryantenney 
Bundle-Description: Metrics is a Java library which gives you unparallel  ed insight into what your code does in        production. Metrics provi  des a powerful toolkit of ways to measure the behavior of critical     
    components in your production environment. 
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.html Bundle-ManifestVersion: 2 
Bundle-Name: Metrics Core 
Bundle-SymbolicName: io.dropwizard.metrics.core 
Bundle-Version: 3.1.2 
Created-By: Apache Maven Bundle Plugin 
Export-Package: com.codahale.metrics;uses:="org.slf4j,javax.management,sun.misc";version="3.1.2"
Implementation-Title: Metrics Core 
Implementation-Vendor-Id: io.dropwizard.metrics 
Implementation-Version: 3.1.2 
Import-Package: javax.management,org.slf4j;version="[1.6.0,2.0.0)",sun.m  isc;resolution:=optional 
Tool: Bnd-1.50.0

我的包的最终输出MANIFEST.MF:

Manifest-Version: 1.0 
Bnd-LastModified: 1392597083041 
Build-Jdk: 1.7.0_51 
Built-By: coda 
Bundle-Description: Metrics is a Java library which gives you unparallel  ed insight into what your code does in     production. Metrics provi  des a powerful toolkit of ways to measure the behavior of critical     
    components in your production environment. 
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.html 
Bundle-ManifestVersion: 2 
Bundle-Name: Metrics Core 
Bundle-SymbolicName: com.codahale.metrics.core 
Bundle-Version: 3.0.2 
Created-By: Apache Maven Bundle Plugin 
Export-Package: com.codahale.metrics;uses:="org.slf4j,javax.management,s  un.misc";version="3.0.2" 
Implementation-Title: Metrics Core 
Implementation-Vendor-Id: com.codahale.metrics 
Implementation-Version: 3.0.2 
Import-Package: javax.management,org.slf4j;version="[1.6.0,2.0.0)",sun.m  isc;resolution:=optional 
Tool: Bnd-1.50.0

com.codahale.metrics的最终版本是[3.1,4],我想它应该是[3.0,4],如果我错了,请纠正我的理解。

感谢。

1 个答案:

答案 0 :(得分:0)

我想说自动机会使用您指定的maven依赖关系,然后继续尝试通过传递依赖关系进行解析。可能隐藏在那里需要3.1的东西。

相关问题