我在一个没有连接到互联网的专用网络中有一个eclipse插件的镜像。到目前为止,这一切都很好,除了像这样的插件http://texlipse.sourceforge.net/或https://borisvl.github.io/Pdf4Eclipse/。
问题(可能是?)是在它们的content.jar
文件中有硬编码的绝对URL。
对于textlipse,content.jar
包含单个文件content.xml
,并且其中有引用绝对URL的行http://texlipse.sourceforge.net/...和https://borisvl.github.io/Pdf4Eclipse/...。因此,我无法从镜像中安装任何这些功能。exlipse更新程序试图连接到这些url,但失败了。
我用以下命令镜像插件:
$ eclipse -application
org.eclipse.equinox.p2.metadata.repository.mirrorApplication
-nosplash -verbose -source http://texlipse.sourceforge.net/
-destination /texlipse/ -compare
$ eclipse -application
org.eclipse.equinox.p2.artifact.repository.mirrorApplication
-nosplash -verbose -source http://texlipse.sourceforge.net/
-destination /texlipse/ -compare
有没有一种简单的方法可以将网络中存储库的新url放入content.jar
(以及artifact.jar
,甚至可能是site.xml
)?还是我必须手动破解?
这是一个完全的破解,但您可以修改hosts
文件,将有问题的主机名引导到127.0.0.1