[英]Create local p2 site from remote p2 sites?
在eclipse中,我創建了一個.target文件,我在其中添加了遠程eclipse p2站點的功能。
現在我想創建一個本地p2站點,它是目標定義中定義的聚合功能的副本(最好是適用於所有環境)。
我需要使用maven3 / tycho的本地p2站點與構建系統一起使用,但是沒有找到“穩定”的方法來執行此操作。 我嘗試過以下方法:
1)將目標文件導出到本地目錄。
問題:不創建p2站點只是具有功能/插件的文件夾。
2)將目標文件導出到本地目錄並在目錄上運行eclipse FeaturesAndBundlesPublisher應用程序。
問題:這會創建一個p2站點,但缺少一些原始功能/包。
3)使用buckmeister從.target文件初始化的功能創建p2站點:
問題:.target文件內容的原始功能不會保留在生成的p2站點中。 特別是如果目標文件包含以下功能,則會出現問題:org.eclipse.equinox.executable.feature此特征將在生成的p2站點中丟失。
4)復制內容:
workspace.metadata.plugins \\ org.eclipse.pde.core.bundle_pool
問題:不是有效的p2站點。
有關如何從遠程p2站點創建工作(具有完整功能)本地p2站點的任何建議?
您可以直接從命令行運行Ant,而不是使用Ant:
eclipse -nosplash -verbose
-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication
-source http://download.eclipse.org/releases/luna
-destination file:/temp/lunaclone
eclipse -nosplash -verbose
-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication
-source http://download.eclipse.org/releases/luna
-destination file:/temp/lunaclone
進入時,每個命令當然應該是一行。
如果您使用Windows系統,目標路徑就像
-destination file:C:/temp/lunaclone
如果您需要一個不同的版本( -source
)而不是查看Eclipse Project Update Sites
您想使用p2 mirror命令。 為它提供一個遠程存儲庫URL和一個鏡像到的本地目錄。 這是一個Ant宏來執行此操作。 注意它是如何進行兩次鏡像調用的,因為大多數p2存儲庫實際上是兩個存儲庫(工件和元數據)。
它需要“bootstrap.platform”屬性集,這是Eclipse安裝的位置,您要使用它的p2。
<macrodef name="p2.mirror">
<attribute name="source"/>
<attribute name="destination"/>
<sequential>
<echo message="Mirroring repository @{source} to @{destination}..."/>
<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true">
<classpath>
<fileset dir="${bootstrap.platform}/plugins">
<include name="**/org.eclipse.equinox.launcher_*.jar"/>
</fileset>
</classpath>
<arg line="-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication"/>
<arg line="-source @{source}"/>
<arg line="-destination @{destination}"/>
</java>
<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true">
<classpath>
<fileset dir="${bootstrap.platform}/plugins">
<include name="**/org.eclipse.equinox.launcher_*.jar"/>
</fileset>
</classpath>
<arg line="-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication"/>
<arg line="-source @{source}"/>
<arg line="-destination @{destination}"/>
</java>
</sequential>
</macrodef>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.