m2eclipse插件作为本地站点存储库

时间:2011-07-14 14:06:41

标签: eclipse maven m2eclipse

是否可以下载m2eclipse插件,以便我可以将其作为本地站点从eclipse安装? 如果是这样,你能指点我的链接,我在m2eclipse网站上找不到它:

m2e eclipse download link

====================================

试过@Torsten的评论

我用这个条目创建了一个批处理文件:

@echo off
set ECLIPSE=D:/DevProgs/dumps/Eclipse3.5
echo Mirroring metadata for %1
java -jar %ECLIPSE%/plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar \
 -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication \
 -source %1 \
 -destination p2-mirror \
 -destinationName "D:\temp" \
 -verbose \
 -compare

并调用批处理文件,但它只是启动eclipse而没有任何反应......你能告诉我在此之后该怎么做吗?

D:\DevAreas\test>DownloadEclipseRepo.bat "http://download.eclipse.org/technology/m2e/releases/"
Mirroring metadata for "http://download.eclipse.org/technology/m2e/releases/"

并且批处理文件不会执行任何其他操作。

当我停止批处理文件时......它抱怨这样的事情:

D:\DevAreas\test>DownloadEclipseRepo.bat "http://download.eclipse.org/technology/m2e/releases/"
Mirroring metadata for "http://download.eclipse.org/technology/m2e/releases/"
Terminate batch job (Y/N)?
^C'-application' is not recognized as an internal or external command,
operable program or batch file.
'-source' is not recognized as an internal or external command,
operable program or batch file.
'-destination' is not recognized as an internal or external command,
operable program or batch file.
'-destinationName' is not recognized as an internal or external command,
operable program or batch file.
'-verbose' is not recognized as an internal or external command,
operable program or batch file.
'-compare' is not recognized as an internal or external command,
operable program or batch file.
D:\DevAreas\test>

请您提供更多清晰度/建议吗?

1 个答案:

答案 0 :(得分:2)

可悲的是,越来越多的Eclipse项目不再作为Zips或可下载站点分发。这真的会伤害人们构建离线安装。

现代......

我认为这也是M2Eclipse的情况。作为一种解决方案,您可以使用p2.mirror脚本从p2存储库中检索站点的本地副本,如下所示,它使用本地Eclipse 3.5安装。你可能想要适应你手头的东西。

希望这有帮助,

的Torsten

#!/bin/sh
ECLIPSE=C:/eclipse3.5

echo Mirroring metadata for $1
java -jar ${ECLIPSE}/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar \
 -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication \
 -source ${1} \
 -destination p2-mirror \
 -destinationName "Corporate P2 Repo" \
 -verbose \
 -compare

echo Mirroring artifacts for $1
java -jar ${ECLIPSE}/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar \
 -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication \
 -source ${1} \
 -destination p2-mirror \
 -destinationName "Corporate P2 Repo" \
 -verbose \
 -compare