Maven Eclipse插件安装

时间:2012-02-01 15:23:24

标签: eclipse plugins maven build eclipse-plugin

有没有我可以下载maven eclipse插件的地方,以便我可以手动安装它而无需使用更新站点? 插件http://eclipse.org/m2e/download/的下载站点仅提供有关如何直接从Eclipse IDE下载它的信息,但不提供如何将其作为Zip文件下载的信息。

我需要在没有连接到外部世界的服务器上安装它,所以我需要将其作为zip存档下载然后手动安装。

由于

修改

我还发现Maven插件预装了Eclipse用于JAVA开发人员,而不是Eclipse用于JAVA EE开发人员。 (我正在使用的那个)。

修改

@Soulcheck - 我尝试了你的建议,但它出现了错误。我使用的命令是

java -jar -DproxySet=true  -DproxyHost=myproxyHost -DproxyPort=8080 plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -application  org.eclipse.update.core.standaloneUpdate -command mirror -from http://download.eclipse.org/technology/m2e/releases -to C:\wresource\home\res.nosynch\temp.todel\m2e

我添加了代理选项,因为这是获取外部连接所必需的。错误如下所示:您认为URL可能错误吗?

!SESSION 2012-02-01 16:14:08.581 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_29
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments:  -application org.eclipse.update.core.standaloneUpdate -command mirror -from http://download.eclipse.org/technology/m2e/releases -to C:\wresource\home\res.nosynch\temp.todel\m2e
Command-line arguments:  -application org.eclipse.update.core.standaloneUpdate -command mirror -from http://download.eclipse.org/technology/m2e/releases -to C:\wresource\home\res.nosynch\temp.todel\m2e

!ENTRY org.eclipse.update.core 4 0 2012-02-01 16:14:12.213
!MESSAGE Unable to access "http://download.eclipse.org/technology/m2e/releases".
!STACK 1
org.eclipse.core.runtime.CoreException: Error parsing site stream. [The XML stream is not a valid default "site.xml" file. The root tag is not site.]
    at org.eclipse.update.core.Utilities.newCoreException(Utilities.java:225)
    at org.eclipse.update.core.Utilities.newCoreException(Utilities.java:256)
    at org.eclipse.update.core.model.SiteModelFactory.parseSite(SiteModelFactory.java:95)
    at org.eclipse.update.internal.core.SiteURLFactory.createSite(SiteURLFactory.java:80)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:334)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:326)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:298)
    at org.eclipse.update.internal.core.InternalSiteManager.attemptCreateSite(InternalSiteManager.java:222)
    at org.eclipse.update.internal.core.InternalSiteManager.getSite(InternalSiteManager.java:162)
    at org.eclipse.update.core.SiteManager.getSite(SiteManager.java:82)
    at org.eclipse.update.internal.mirror.MirrorCommand.run(MirrorCommand.java:78)
    at org.eclipse.update.standalone.ScriptedCommand.run(ScriptedCommand.java:66)
    at org.eclipse.update.standalone.StandaloneUpdateApplication.run(StandaloneUpdateApplication.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.xml.sax.SAXException: The XML stream is not a valid default "site.xml" file. The root tag is not site.
    at org.eclipse.update.core.model.DefaultSiteParser.handleInitialState(DefaultSiteParser.java:393)
    at org.eclipse.update.core.model.DefaultSiteParser.startElement(DefaultSiteParser.java:198)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.eclipse.update.core.model.DefaultSiteParser.parse(DefaultSiteParser.java:154)
    at org.eclipse.update.core.model.SiteModelFactory.parseSite(SiteModelFactory.java:83)
    ... 28 more
!SUBENTRY 1 org.eclipse.update.core 4 0 2012-02-01 16:14:12.216
!MESSAGE Error parsing site stream. [The XML stream is not a valid default "site.xml" file. The root tag is not site.]
!STACK 0
org.xml.sax.SAXException: The XML stream is not a valid default "site.xml" file. The root tag is not site.
    at org.eclipse.update.core.model.DefaultSiteParser.handleInitialState(DefaultSiteParser.java:393)
    at org.eclipse.update.core.model.DefaultSiteParser.startElement(DefaultSiteParser.java:198)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.eclipse.update.core.model.DefaultSiteParser.parse(DefaultSiteParser.java:154)
    at org.eclipse.update.core.model.SiteModelFactory.parseSite(SiteModelFactory.java:83)
    at org.eclipse.update.internal.core.SiteURLFactory.createSite(SiteURLFactory.java:80)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:334)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:326)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:298)
    at org.eclipse.update.internal.core.InternalSiteManager.attemptCreateSite(InternalSiteManager.java:222)
    at org.eclipse.update.internal.core.InternalSiteManager.getSite(InternalSiteManager.java:162)
    at org.eclipse.update.core.SiteManager.getSite(SiteManager.java:82)
    at org.eclipse.update.internal.mirror.MirrorCommand.run(MirrorCommand.java:78)
    at org.eclipse.update.standalone.ScriptedCommand.run(ScriptedCommand.java:66)
    at org.eclipse.update.standalone.StandaloneUpdateApplication.run(StandaloneUpdateApplication.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
!SUBENTRY 1 org.eclipse.update.core 4 0 2012-02-01 16:14:12.218
!MESSAGE Error parsing site stream. [The XML stream is not a valid default "site.xml" file. The root tag is not site.]
!STACK 0
org.xml.sax.SAXException: The XML stream is not a valid default "site.xml" file. The root tag is not site.
    at org.eclipse.update.core.model.DefaultSiteParser.handleInitialState(DefaultSiteParser.java:393)
    at org.eclipse.update.core.model.DefaultSiteParser.startElement(DefaultSiteParser.java:198)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.eclipse.update.core.model.DefaultSiteParser.parse(DefaultSiteParser.java:154)
    at org.eclipse.update.core.model.SiteModelFactory.parseSite(SiteModelFactory.java:83)
    at org.eclipse.update.internal.core.SiteURLFactory.createSite(SiteURLFactory.java:80)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:334)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:326)
    at org.eclipse.update.internal.core.InternalSiteManager.createSite(InternalSiteManager.java:298)
    at org.eclipse.update.internal.core.InternalSiteManager.attemptCreateSite(InternalSiteManager.java:222)
    at org.eclipse.update.internal.core.InternalSiteManager.getSite(InternalSiteManager.java:162)
    at org.eclipse.update.core.SiteManager.getSite(SiteManager.java:82)
    at org.eclipse.update.internal.mirror.MirrorCommand.run(MirrorCommand.java:78)
    at org.eclipse.update.standalone.ScriptedCommand.run(ScriptedCommand.java:66)
    at org.eclipse.update.standalone.StandaloneUpdateApplication.run(StandaloneUpdateApplication.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

修改

好的,我可以使用以下命令:

eclipse.exe -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source http://download.eclipse.org/technology/m2e/releases -destination file:C:\temp\m2e\

以上内容将把内容放入c:\temp\m2e。要在eclipse上手动安装,   - 点击“帮助”>> “安装新软件”。   - 在弹出的窗口中单击右上角的“添加”,然后在弹出的下一个窗口中单击“本地”并指定路径C:\ temp \ m2e \并单击“确定”,即可完成! :)

1 个答案:

答案 0 :(得分:6)

m2e不提供压缩更新站点,但您可以尝试在本地镜像官方版本,然后使用镜像安装所需的功能。 According to this doc它应该像以下一样简单:

 java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application  org.eclipse.update.core.standaloneUpdate
-command mirror
-from update_site_url
-featureId id_of_the_feature 
-to your_local_dir

edit2 eclipse indigo等 好吧看起来他们改变了一点。现在应该使用p2存储库镜像:

 eclipse -nosplash -verbose 
    -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication 
    -source http://download.eclipse.org/releases/indigo 
    -destination file:/destination_dir 
    -ius org.eclipse.m2e.feature.feature.group

据我所知,-ius参数不起作用,因此整个仓库将被镜像。

看起来p2 ant tasks是创建镜像的首选方式,据推测它们允许对镜像内容进行细粒度控制。