首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当maven-bundle-plugin部署时,OSGI示例失败。

当maven-bundle-plugin部署时,OSGI示例失败。
EN

Stack Overflow用户
提问于 2014-04-11 20:28:28
回答 1查看 1.3K关注 0票数 1

我正在研究"OSGi和ApacheFelix3.0“一书中的一个例子。在maven部署阶段,它在以下消息中失败:

代码语言:javascript
复制
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project bookshelf-inventory-api: 
Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: 
Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: 
The repository system is offline but the artifact org.codehaus.plexus:plexus-utils:jar:1.5.6 is not available in the local repository.

这是什么告诉我的,还有什么可以解决的?

这是我的pom.xml:

代码语言:javascript
复制
<groupId>osgi.example</groupId>
  <artifactId>bookshelf-inventory-api</artifactId>
  <version>1.0.0</version>

  <packaging>bundle</packaging>

  <dependencies>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <version>2.4.0</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Category>inventory</Bundle-Category>
            <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
            <Export-Package>osgi.example.bookshelf.inventory.api</Export-Package>
          </instructions>
          <remoteOBR>repo-rel</remoteOBR>
          <prefixUrl>file:///C:/home/src/demo/osgi/felix-3-book/releases</prefixUrl>
          <ignoreLock>true</ignoreLock>
          <!--
          <instructions>
            <Private-Package>org.foo.myproject.*</Private-Package>
            <Bundle-Activator>org.foo.myproject.impl1.Activator</Bundle-Activator>
          </instructions>
          -->
        </configuration>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
    <!-- releases repo -->
    <repository>
      <id>repo-rel</id>
      <url>file:///C:/home/src/demo/osgi/felix-3-book/releases</url>
    </repository>
  </distributionManagement>
   <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-04-12 12:36:29

消息是说您正在尝试以脱机模式(-o)构建,并且存在一个无法找到的依赖关系:org.codehaus.plexus:plexus:jar:1.5.6

如果情况并非如此,并且您正在在线获取此消息,请尝试删除~/.m2/org/codehaus/plexus,然后再试一次。可能文件下载时有错误。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23021993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档