0

I get this error even though the jar file, osgi.core-4.0.1.jar is there in my local .bnd folder.

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

The error is on line 1 (<?xml version="1.0" encoding="UTF-8"?>), of the .classpath in my project's main API (com.mycompany.test.api)

<?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>

What could be the problem? Thank you all in a advance.

Program-Me-Rev
  • 6,184
  • 18
  • 58
  • 142

1 Answers1

0

When using Bndtools, you do not edit the .classpath file to add jars to compile path. Instead edit the bnd.bnd file and add the jar to the -buildpath. Bndtools will then have Bnd read the bnd.bnd file and use the -buildpath and -testpath information to populate the aQute.bnd.classpath.container classpath container.

BJ Hargrave
  • 9,324
  • 1
  • 19
  • 27