简体   繁体   English

如何使用无头P2安装M2E-WTP

[英]How to install m2e-wtp using headless p2

I have this problem I've been struggling with for a while. 我有一段时间一直在努力的这个问题。 I want to install Eclipse plugins automatically during an automated Eclipse installation process. 我想在自动化的Eclipse安装过程中自动安装Eclipse插件。 So far I've been able to install the following over fresh eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz: 到目前为止,我已经能够在新的eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz上安装以下代码:

./eclipse -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2/ \
  -installIU org.codehaus.groovy.jdt.patch.feature.group \
  -installIU org.codehaus.groovy.eclipse.feature.feature.group \
  -installIU org.codehaus.groovy17.feature.feature.group \
  -installIU org.codehaus.groovy18.feature.feature.group \
  -installIU org.codehaus.groovy20.feature.feature.group \
  -repository http://download.eclipse.org/technology/m2e/releases \
  -installIU org.eclipse.m2e.feature.feature.group \
  -repository http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.15.0/N/0.15.0.201207090125/ \
  -installIU org.sonatype.m2e.mavenarchiver.feature.feature.group \
  -repository http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124 \
  -installIU org.sonatype.m2e.buildhelper.feature.feature.group \
  -repository http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt \
  -installIU org.jboss.tools.maven.apt.feature.feature.group \
  -repository http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-jdt-compiler/ \
  -installIU org.jboss.tools.m2e.jdt.feature.feature.group

All is nice but when I try to import a Groovy, Maven-managed web application project Eclipse starts complaining about missing m2e-wtp being missing. 一切都很好,但是当我尝试导入Groovy时,Maven管理的Web应用程序项目Eclipse开始抱怨缺少m2e-wtp。 Now here's the real issue. 现在是真正的问题。 I can install it either using UI (which is what I don't want) and then it works but tries to install both org.jboss.tools.maven.apt.feature.feature.group and org.jboss.tools.m2e.jdt.feature.feature.group once again and then the missing org.eclipse.m2e.wtp.feature.feature.group. 我可以使用UI来安装它(这是我不想要的),然后它可以工作,但尝试同时安装org.jboss.tools.maven.apt.feature.feature.group和org.jboss.tools.m2e。再次单击jdt.feature.feature.group,然后丢失org.eclipse.m2e.wtp.feature.feature.group。 When I install it using P2 as follows 当我使用P2如下安装它时

./eclipse -nosplash \
  -application org.eclipse.equinox.p2.director \
  -repository http://download.eclipse.org/m2e-wtp/releases/ \
  -installIU org.eclipse.m2e.wtp.feature.feature.group \

nothing works anymore even Eclipse does not find anything on the Eclipse Market. 即使Eclipse在Eclipse Market上找不到任何东西,也无济于事。

Can someone shed some light on how to install those dependencies properly? 有人可以阐明如何正确安装这些依赖项吗?

An example project can be found on Bitbucket: https://bitbucket.org/padcom/groovy-spring-web-example 可以在Bitbucket上找到一个示例项目: https : //bitbucket.org/padcom/groovy-spring-web-example

I found what the problem was. 我发现了问题所在。 I have forgotten to add the 我忘记添加

org.codehaus.groovy.m2eclipse.feature.group

feature while installing Groovy Eclipse thus there was noting to connect Eclipse and Maven. 在安装Groovy Eclipse时添加了特性,因此无需连接Eclipse和Maven。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM