views:

16

answers:

0

Hi,

I have a maven project which library should also be an OSGi bundle with an declarative service. I added the OSGI-INF folder with the service.xml inside src/java/resources which will be added to the jar. But: When I start the project as equinox project, where I want to check if the service is loaded, I get the error that the OSGI-INF/service.xml can't be found. I guess eclipse won't add the resources folder to the classpath when starting.

BTW: The MANIFEST-MF is in the root folder and the pom.xml contains the following text:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
     <configuration>
      <archive>
        <manifestFile>META-INF/MANIFEST.MF</manifestFile>
      </archive>
    </configuration>
</plugin>

Has anbody a good idea how to tell eclipse where to find the metadata files? I'm using m2eclipse if this is relevant.

Thanks in advance Hannes