-->

How to preinstall Eclipse m2e configurators (Plugi

2019-01-19 03:52发布

问题:

When importing maven projects into Eclipse IDE fresh install, there is a pop-up question to "Setup Maven plugin connections"

If not to install there will be errors shown in pom.xml like

Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:0.20.0:validate-id (execution: default-validate-id, phase: validate)

How to install m2e configurators at any time (e.g. before when preparing Eclipse package for team, or again after interactive installation failed over network)?

回答1:

You can install M2Eclipse connectors at any time by going to "Window > Preferences > Maven > Discovery".

Then when you click "Open Catalog", you will be greeted with a pop-up that will display all available M2E connectors to install. You need to select the one you want, click "Finish" and follow the standard installation process.



回答2:

Install m2e from command line:

/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://beust.com/eclipse  -installIUs org.testng.eclipse.feature.group
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://findbugs.cs.umd.edu/eclipse  -installIUs edu.umd.cs.findbugs.plugin.eclipse.feature.group
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://eclipse-cs.sourceforge.net/update  -installIUs net.sf.eclipsecs.feature.group
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://coderplus.com/m2e-update-sites/maven-remote-resources-plugin -installIUs com.coderplus.m2e.remoteresourcesfeature.feature.group
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://ianbrandt.github.io/m2e-maven-dependency-plugin/ -installIUs com.ianbrandt.tools.m2e.mdp.feature.feature.group
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-jdt-compiler/ -installIUs org.jboss.tools.m2e.jdt.feature.feature.group


回答3:

You can launch the Maven connector discovery wizard again by finding one of the missing connector errors in the Markers view, right clicking on it, and selecting Quick fix or ctrl + 1 while it's selected.

The quick fix will allow you to launch the wizard to discover connectors for all the Maven errors.