首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Eclipse p2 mirrorApplication伪影滤波

Eclipse p2 mirrorApplication伪影滤波
EN

Stack Overflow用户
提问于 2012-07-30 19:34:03
回答 1查看 810关注 0票数 0

我试图使用以下命令镜像Windows下的更新站点。

代码语言:javascript
复制
eclipsec -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -writeMode clean -source http://download.eclipse.org/technology/m2e/releases/1.1/1.1.0.20120530-0009 -destination file:/C:/m2ecore
eclipsec -nosplash -verbose -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -writeMode clean -source http://download.eclipse.org/technology/m2e/releases/1.1/1.1.0.20120530-0009 -destination file:/C:/m2ecore

这是可行的,但它下载了所有的工件两次,无论是规范形式还是打包形式。例如:

代码语言:javascript
复制
Mirroring: osgi.bundle,org.eclipse.m2e.editor.source,1.1.0.20120530-0009 (Descriptor: packed: osgi.bundle,org.eclipse.m2e.editor.source,1.1.0.20120530-0009)
Mirroring: osgi.bundle,org.eclipse.m2e.editor.source,1.1.0.20120530-0009 (Descriptor: canonical: osgi.bundle,org.eclipse.m2e.editor.source,1.1.0.20120530-0009)

是否有一种方法可以指定我只想镜像规范形式?

有点像-filter (!format=packed)

我注意到artifacts.xml中有过滤器,p2应用程序似乎支持过滤器开关,只是文档很少。它看起来像LDAP查询,但在命令行中没有被识别。

如果无法过滤,我如何安全地修改本地回购以从元数据中删除打包的文件?手工编辑XML似乎不是个好主意。

编辑:以手动的方式完成了它。如果有人知道如何过滤以避免不必要的下载,那么这个问题就没有答案了。

转到C:\m2ecore,解压缩artifacts.jar,然后删除它。

编辑artifacts.xml中的属性部分

代码语言:javascript
复制
Remove the line <property name='publishPackFilesAsSiblings' value='true'/>
Adjust the properties size parameter (e.g: from 3 to 2)

编辑artifacts.xml中的映射部分

代码语言:javascript
复制
Remove the line <rule filter='(&amp; (classifier=osgi.bundle) (format=packed))' output='${repoUrl}/plugins/${id}_${version}.jar.pack.gz'/>
Remove the line <rule filter='(&amp; (classifier=org.eclipse.update.feature) (format=packed))' output='${repoUrl}/features/${id}_${version}.jar.pack.gz'/>
Adjust the mappings size parameter (e.g.: from 5 to 3)

删除所有打包的工件元数据

代码语言:javascript
复制
Use an editor with regex support to clear all matches of:
<artifact[\s]+[^>]*>(.(?!<[/]?artifact>))+Pack200Unpacker(.(?!<[/]?artifact>))+[\s]*</artifact>

To clear the blank lines, first regex replace with empty strings the matches of:  
^[\s]*$
and then do an extended replace from \r\n\r\n to \r\n

Modify the total artifacts count by searching for matches of:
<artifact[\s]+[^>]*>

将artifacts.xml压缩到artifacts.zip并将其重命名为artifacts.jar

从树中删除所有_*.pack.gz_文件。

EN

回答 1

Stack Overflow用户

发布于 2012-08-02 02:26:33

独立镜像应用程序功能有限,可以使用p2蚂蚁任务获取所需的东西。

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

https://stackoverflow.com/questions/11728322

复制
相关文章

相似问题

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