OSGi包编译错误

时间:2015-09-08 12:51:47

标签: osgi apache-felix osgi-bundle

当我构建我的包时,maven会抛出异常:

[ERROR] Bundle com.onboard:com.onboard.service.security:bundle:3.0.0-SNAPSHOT : Exporting packages that are not on the Bundle-Classpath[Jar:dot]: [about_files, XXX]
[ERROR] Error(s) found in bundle configuration

我使用maven-bundle-plugin来构建我的代码:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>2.3.7</version>
    <extensions>true</extensions>
    <configuration>
      <manifestLocation>src/main/resources/META-INF</manifestLocation>
      <instructions>
        <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
        <Bundle-Version>${project.version}</Bundle-Version>
        <Export-Package>${bundle.Export-Package};version="${project.version}"</Export-Package>
        <Private-Package>!${bundle.Export-Package};${bundle.Export-Package}.internal.*</Private-Package>
        <_include>osgi.bnd</_include>
      </instructions>
    </configuration>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <configuration>
      <source>1.6</source>
      <target>1.6</target>
    </configuration>
  </plugin>

我的依赖是:

<dependency>
  <groupId>org.eclipse.jetty.orbit</groupId>
  <artifactId>javax.servlet</artifactId>
</dependency>

<dependency>
  <groupId>org.springframework.security</groupId>
  <artifactId>org.springframework.security.web</artifactId>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>org.springframework.web.servlet</artifactId>
</dependency>

<dependency>
  <groupId>org.elevenframework</groupId>
  <artifactId>org.elevenframework.web.api</artifactId>
</dependency>

<dependency>
  <groupId>com.onboard</groupId>
  <artifactId>com.onboard.domain.model</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.onboard</groupId>
  <artifactId>com.onboard.service.common</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.onboard</groupId>
  <artifactId>com.onboard.service.web</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.onboard</groupId>
  <artifactId>com.onboard.service.account</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.onboard</groupId>
  <artifactId>com.onboard.service.collaboration</artifactId>
  <version>${project.version}</version>
</dependency>

几天前运行良好的应用程序。我认为依赖com.onboard.XXX的修改导致了这一点。但我不是这样的。我该怎么办?

0 个答案:

没有答案