使用maven-bundle-plugin,bnd尝试OSGi包装(嵌入)jaxb-xjc时出错

时间:2016-06-03 14:23:25

标签: osgi apache-felix bnd maven-bundle-plugin

我正在尝试将下面的jar(以及其他jar)嵌入到OSGi包中。

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-xjc</artifactId>
    <version>2.1.13</version>
</dependency>

maven-bundle-plugin与Classes found in the wrong directory: {1.0/com/sun/codemodel/util/Surrogate$Parser.class=com.sun.codemodel.util.Surrogate$Parser, ...many more of these...}的以下设置错误,因为这个jar有一堆类文件作为jar的根目录中名为1.0的文件夹中的资源,它会将其抛出。我该如何解决这个问题?

       <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>3.0.0</version>

            <configuration>
                <instructions>
                    <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                    <Embed-Transitive>true</Embed-Transitive>
                    <Export-Package>a.single.package.i.want.to.export</Export-Package>
                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                </instructions>
            </configuration>
        </plugin>

1 个答案:

答案 0 :(得分:0)

我有同样的问题。看来我在pom.xml中有两个冲突的版本。通过排除其中一个版本,我可以解决问题。

APDU Received: 00A4040008A000000003000000
APDU Sent: 9000
APDU Received: 00CA9F7F
APDU Sent: FF01A3CE00000000000033639D44CFB00C690000000000000000000000000000000000000000000000009000
APDU Received: 80500000085C313D2C8C29F71C
APDU Sent: 000033639D44CFB00C6901020001E3AC80DCF8D08E7D5C5C8C4DCAE29000
APDU Received: 848203001012F927AC6FAC2C247AD0F09679AEC48C
APDU Sent: 9000
APDU Received: 00A4040008A000000003000000
APDU Sent: 9000
APDU Received: 00CA9F7F
APDU Sent: FF01A3CE00000000000033639D44CFB00C690000000000000000000000000000000000000000000000009000
APDU Received: 00A4040008A000000003000000FF
APDU Sent: 9000
APDU Received: 80CA9F7F
APDU Sent: 9F7F2AFF01A3CE00000000000033639D44CFB00C690000000000000000000000000000000000000000000000009000
APDU Received: 00A4040008A000000003000000FF
APDU Sent: 9000
APDU Received: 805000000812D2920F64D6D881
APDU Sent: 000033639D44CFB00C6901020002F8AC3BC0BA50FA6707901F6B6F7A9000
APDU Received: 848203001042E02498FB5BD93AC67DAD9D8EC29373
APDU Sent: 9000
APDU Received: 84D8018150E38DC8FEDD89C6DE48A1C7489CB8EFC83DC1EA0BBCB73E9782EA1593D9A0A327C12702E7EE179ABA888D265C4CAE637338B403B46E41A234564F0F7EC709770178EC32F019F251964C903753766E1DF4
APDU Sent: 0329AD5106993C7EB2649000
APDU Received: 00A404000BA00000030800001000010000
APDU Sent: 9000
APDU Received: 00A404000EE86086480186FA6B81480401010000
APDU Sent: 9000
APDU Received: 8050000008224CDDC4C29B22C3
APDU Sent: 000033639D44CFB00C69030200013C56A721DAB51167FA4320F10AD59000
APDU Received: 84820300101CBA1715E78B70BB20B2032845664977
APDU Sent: 9000
APDU Received: 8420000010C2CBE82EDE23A2984BFDAAC8843E150D
APDU Sent: 9000
APDU Received: 00A4040008A000000003000000FF
APDU Sent: 9000
APDU Received: 805000000885ADBAEFA751CAEB
APDU Sent: 000033639D44CFB00C69030200025FA69462477F571EAA8F0C14AAE49000
APDU Received: 848203001043D948E16FDD63A57FBB6E2EA6673EBB
APDU Sent: 9000
APDU Received: 00A404000BA00000030800001000010000
APDU Sent: 9000
APDU Received: 00A404000EE86086480186FA6B81480401010000
APDU Sent: 9000
APDU Received: 8050000008D15F65B2E12B8199
APDU Sent: 000033639D44CFB00C6903020003048007A68010C2058992616E39529000
APDU Received: 848203001080E36DC19999AB975320ADA23FEF51DD
APDU Sent: 9000
APDU Received: 8400000008309C052FC2AF518700
APDU Sent: 0001000000020000000100000002000000000000000000000000000000000000000000000000000000000000000000000200FFFF0000000000000000000000009000
APDU Received: 841600005841A76F1521DADCAD242B18F13335784DCD34C909C87EFD26D547AF69D00D2881E1CEC3189DC9DB27319B7EB1B454035A2FBF4F5BD453001DB0B95856C544AAEF89F1584495423780CE1209AAEB4F27DCA010CFA3955325FD
APDU Sent: 9000
APDU Received: 841E0000383D3B679C005602D2533321C5B0CB2BB8CB3E9110FDCE4B5990C84010C2EA71D0FF7FEAC9BE1487A72BBC29F52B7FD695FDB792BBE5A8ED78
APDU Sent: 9000
APDU Received: 841A0000080F66BDFF2FD3336F64
APDU Sent: 30218001008101008201008301078401FF8501038601018701008801008901008A01009000
APDU Received: 841A800008C14EECF30745521264
APDU Sent: 30218001008101008201008301078401FF8501038601018701008801008901008A01009000
APDU Received: 841A810008C6EE731C8374C0A264
APDU Sent: 30218001008101008201008301078401FF8501038601018701008801008901008A01009000
APDU Received: 8411010008B1DE5EA8BF8EDF90
APDU Sent: 9000
APDU Received: 841301000862299152D7711722
APDU Sent: 9000
APDU Received: 8412000018433687E78C0B7552BC3939CEF953881623F601ACC92A52C2
APDU Sent: 9000
APDU Received: 8417000008B8C7A9955878DDEB00
APDU Sent: 7F4982010A8182010100BF32292317297991A0B8606A83DF743625BF5AC7708CE798D74DFCEEB13244D7F40CFCA3DEBC928F52CD868674477C52C3F2615B60EBDDAB6D6B4BD1855ADCE7FA0A45F42529571E32385F9E6485333D5CBF24656AF02AEC586FA4A85FA7CA11321106EDCBEDF51108726371BEDA3D75AB5D5F313D042EB0259890697EBE1D12ADFCCAF8477DDA4083AC53590202BF26388CD038D164AE3758CB1139DA9FDDFC74767C5C39DF0DCA5D91AB0C817DCBDDE35A535B6077644C76E74945EB2FA9F1E9365B1B5F91226719848CF365EA75381DFE319461688ACF317A4B49548CFFA71E593100EA9A245DB430FCE79497FD5E63C69398F8266112