eclipse-rcp - 使用 tycho-p2-extras 镜像 Eclipse p2 存储库时如何获取源包
问题描述
我想创建一个包含构建 rcp 应用程序所需的 ius 的 eclipse p2 存储库的镜像。镜像确实有效,并且所需的包在本地存储。我可以从我的 tycho 构建和我的 eclipse ide 中引用它们。它可以工作,但是包含 eclipse p2 镜像文件夹的 targetdefinition 文件抱怨缺少源包。
我阅读并尝试了 tycho-p2-extras 提供的开关,但似乎没有开关可以解决这个问题。
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>mirror</goal>
</goals>
</execution>
</executions>
<configuration>
<source>
<!-- source repositories to mirror from -->
<!-- supported layouts are "p2-metadata", "p2-artifacts", and "p2"
(for joint repositories; default) -->
<repository>
<id>eclipse-2018-09</id>
<url>http://download.eclipse.org/releases/2018-09</url>
<layout>p2</layout>
</repository>
<repository>
<id>eclipse-2018-09-tech</id>
<url>https://download.eclipse.org/technology/epp/packages/2018-09/</url>
<layout>p2</layout>
</repository>
</source>
<!-- List of IUs to mirror. If omitted, allIUs will be mirrored. -->
<!-- Omitted IU version element means latest version of the IU -->
<ius>
<iu>
<id>org.eclipse.e4.rcp.feature.group</id>
</iu>
<iu>
<id>org.eclipse.emf.common.feature.group</id>
</iu>
<iu>
<id>org.eclipse.emf.ecore.feature.group</id>
</iu>
<iu>
<id>org.eclipse.equinox.executable.feature.group</id>
</iu>
<iu>
<id>org.eclipse.ui.themes</id>
</iu>
<iu>
<id>org.objectweb.asm</id>
</iu>
<iu>
<id>org.eclipse.swt</id>
</iu>
</ius>
<!-- The destination directory to mirror to. -->
<destination>${project.build.directory}/repository</destination>
<!-- Whether only strict dependencies should be followed. -->
<!-- "strict" means perfect version match -->
<followStrictOnly>false</followStrictOnly>
<!-- Whether or not to follow optional requirements. -->
<includeOptional>true</includeOptional>
<!-- Whether or not to follow non-greedy requirements. -->
<includeNonGreedy>true</includeNonGreedy>
<!-- Filter properties. E.g. filter only one platform -->
<!--
<filter>
<osgi.os>win32</osgi.os>
<osgi.ws>win32</osgi.ws>
<osgi.arch>x86_64</osgi.arch>
</filter>
-->
<!-- Whether to filter the resulting set of IUs to only -->
<!-- include the latest version of each IU -->
<latestVersionOnly>false</latestVersionOnly>
<!-- don't mirror artifacts, only metadata -->
<mirrorMetadataOnly>false</mirrorMetadataOnly>
<!-- whether to compress the content.xml/artifacts.xml -->
<compress>false</compress>
<!-- whether to append to the target repository content -->
<append>true</append>
<!-- whether to mirror pack200 artifacts also. Available since tycho-extras
0.17.0 -->
<includePacked>true</includePacked>
</configuration>
</plugin>
</plugins>
</build>
解决方案
据我所知,tycho-p2-extras-plugin:mirror
目标中没有这样的选项,因为插件所依赖的 Eclipse 镜像应用程序中没有这样的选项。
您必须自己镜像相应的源功能(这将自动镜像包含的捆绑包的相关源)。
但是,某些项目提供了自动包含所有源的功能,例如org.eclipse.emf.sdk.feature.group
. 如果您镜像此类功能,您还将镜像所有源。
推荐阅读
- macos - Eclipse RCP 无法在 MAC Big Sur 中启动产品
- matlab - uiaxes中缺少轴 - matlab
- html - 为什么我不能使用 mx-auto 水平居中子元素?
- javascript - 如何等待从 useEffect 设置值?
- typescript - 提取内部通用类型的联合返回未知
- reactjs - 从 api 反应钩子中删除城市
- fortran - Fortran 管理本地数组内存
- javascript - 在 Axios 请求后向数组中的对象添加属性
- android - 如何将小部件带到 ListViewBuilder 的下一行?扑
- angular - 路由在本地工作,不在服务器上工作,即使 href 设置为服务器目标文件夹