0

即使 jar 文件 osgi.core-4.0.1.jar 在我的本地 .bnd 文件夹中,我也会收到此错误。

Eclipse: The .classpath containsa a library that will not be available during continuous integration: C:/Users/UserName/.bnd/cache/https%3A%2F%2Fraw.githubusercontent.com%2Fbndtools%2Fbundle-hub%2Fmaster%2Fosgi.core/osgi.core-4.0.1.jar

错误出现<?xml version="1.0" encoding="UTF-8"?>在我项目的主 API (com.mycompany.test.api) 中 .classpath 的第 1 行 ( )

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" output="bin" path="src"/>
    <classpathentry kind="src" output="bin_test" path="test"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
    <classpathentry kind="con" path="aQute.bnd.classpath.container"/>
    <classpathentry kind="lib" path="C:/Users/UserName/.bnd/cache/https%3A%2F%2Fraw.githubusercontent.com%2Fbndtools%2Fbundle-hub%2Fmaster%2Fosgi.core/osgi.core-4.0.1.jar" sourcepath="C:/Users/UserName/.bnd/cache/https%3A%2F%2Fraw.githubusercontent.com%2Fbndtools%2Fbundle-hub%2Fmaster%2Fosgi.core/osgi.core-4.0.1.jar">
        <attributes>
            <attribute name="bsn" value="osgi.core"/>
            <attribute name="type" value="REPO"/>
            <attribute name="project" value="org.example.impls"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="bin"/>
</classpath>

可能是什么问题呢?提前谢谢大家。

4

1 回答 1

0

使用 Bndtools 时,您无需编辑.classpath文件以将 jars 添加到编译路径。而是编辑bnd.bnd文件并将 jar 添加到-buildpath. 然后 Bndtools 将让 Bnd 读取bnd.bnd文件并使用-buildpath-testpath信息来填充aQute.bnd.classpath.container类路径容器。

于 2015-12-09T13:36:23.727 回答