问题
When I hover over a package that is not found within Eclipse and click 'Search repositories', the dependency I'm searching for is not found. The dependency exists on the official maven repository : http://search.maven.org/remotecontent?filepath=javax/portlet/portlet-api/2.0-r12/portlet-api-2.0-r12.pom
Do I need to configure m2e to search the maven repository ?
回答1:
Try to update your repository index in the Maven Repositories View.
- Open the View with:
Windows -> Show View -> Others -> Maven -> Maven Repositories View
- Start
Rebuild Index
and/orupdate Index
from the context menu of the Central Repository
This (long running) task is normally done on startup (Windows -> Preferences -> Maven ->Download Repository Index updates on startup) but maybe it is disabled to get a better eclipse startup performance.
来源:https://stackoverflow.com/questions/10122483/m2e-not-finding-missing-repository-m2e-eclipse-plugin