1

以下の 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 のルートにある 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>
4

1 に答える 1

0

同じ問題がありました。pom.xml に競合する 2 つのバージョンがあったようです。バージョンの1つを除外することで、問題を解決できました。

<dependency>
    <groupId>uk.ac.ebi.chebi.webapps.chebiWS.client</groupId>
    <artifactId>chebiWS-client</artifactId>
    <version>2.2.2</version>
    <exclusions>
        <exclusion>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-tools</artifactId>
        </exclusion>
    </exclusions>
</dependency>
于 2016-08-02T15:33:36.687 に答える