java - 如果想在 RCP 应用程序开发中添加本地 p2 更新站点,如何使用 Tycho 在 pom.xml 的 <repository> 部分中指定 <id> 和 <url>?

标签 java maven eclipse-rcp maven-3 tycho

我正在按照 this 运行本地 p2 更新站点,接下来我想使用 Maven 和 Tycho 插件来构建我的插件项目。如何将本地 p2 更新站点添加到 pom.xml 中?特别是不知道怎么填写<id><url> 。目前。我的<repository>部分如下。

<repositories>  
    <repository>  
      <id>neon</id>  
      <url>http://download.eclipse.org/releases/neon</url>  
      <layout>p2</layout>  
    </repository>       
</repositories> 

最佳答案

I'm running a local p2 update site by following this, next I want to use Maven and Tycho plugin to build my plug-in project. How can I add the local p2 update site into pom.xml? In particular, I don't know how to fill in and . For now. my section is as following.

  • <id>可以是任意的,但在您的构建中应该是唯一的(即,任何两个 <url> 都不应该具有相同的 <id> )。
  • <url>需要是http:指向本地 p2 更新站点内容的 URL(通过 target/repository 放入 p2-maven-plugin 目录中的内容。引用 README of the p2-maven-plugin :

    Unfortunately, it's not the end of the story since tycho does not support local repositories (being more precise: repositories located in a local folder). The only way to work it around is to expose our newly created update site using an HTTP server. We're going to use the jetty-plugin - don't worry, the example above contains a sample jetty-plugin set-up. Just type 'mvn jetty:run' and open the following link http://localhost:8080/site. Your P2 update site will be there!

我希望这足以让您开始。

关于java - 如果想在 RCP 应用程序开发中添加本地 p2 更新站点,如何使用 Tycho 在 pom.xml 的 <repository> 部分中指定 <id> 和 <url>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39609446/

相关文章:

第二台显示器上全屏独占模式下的 Java 框架

java - JSONObject ClassNotFoundException异常

Java8 maven raise 错误引用过滤器不明确

eclipse - 在 Docker 容器中的 Eclipse 中运行 JavaFX GUI 应用程序时出现 fatal error

java - 在 AWT 中重写paintComponent

java - 抽屉导航中的按钮

java - Ant macrodef 编译任务

deployment - 部署 web-ear 时 sun.reflect.annotation.TypeNotPresentExceptionProxy 错误

java - 在 RCP Project 的 Project Explorer 中隐藏以点开头的文件夹

eclipse-rcp - eclipse RCP : why ViewerCell and ViewerRow do not have method to get row index?