我正在按照 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 thep2-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/