2015-06-17 2 views
0

Я получаю следующие ошибки, и я не знаю почему. Я настроил свой проект на нескольких средах, и у Ive никогда не было проблем, но недавно я добавил проект в среду под управлением Windows 8 со всем, что было настроено правильно (например, Maven ...), и я, похоже, получаю эту проблемуОшибка Maven: не удалось вычислить план сборки

Multiple annotations found at this line: 
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile) 
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile) 
    - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read 
    artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler- 
    plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported by protocol family: connect 
    - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read 
    artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 
    from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. 
    Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported 
    by protocol family: connect 

и

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 

Я смотрел на это в Интернете и пытались многочисленные различные вещи, перечисленные ниже, чтобы попытаться решить эту проблему, но ни один из них не похоже на работу. Просто отметить, я не использую никаких прокси

  • Удалить .m2 хранилище, Maven -> Update Project ...
  • Удалить все файлы .lastUpdated, Maven -> Project Update ...
  • Пробовал выбора " Force Update of Snapshots/Releases "при обновлении проекта

Есть ли у кого-нибудь другие идеи о том, что я мог попробовать?

+0

Сначала попробуйте создать свой проект в командной строке, а не в Eclipse .... Кроме того. Это «семейство адресов не поддерживается ...» выглядит как проблема сетевого/брандмауэра ... – khmarbaise

ответ

0

похоже, что ваш проект не устанавливает необходимую зависимость. Поэтому вам нужно установить его самостоятельно.

Скачать обе фляги и POM файлы из Maven Repository и установить его с помощью команды (лучше, чем копирование в папку непосредственно)

mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile> 

, а также быть уверенным, что вы установили все необходимое хранилище для проект и кросс проверить в .m2/repository папке с файлами фляга

+0

даже вы можете попытаться очистить .m2/репозиторий/папку вручную, используя rm -rf, а затем перестроить проект. Надеюсь, что это работает для вас. Удачи. –

0

в Eclipse, перейдите в Windows> Preferences> Maven> Настройки пользователя

в настройках пользователя, введите в поле с путем settings.xml>%M2_HOME%\conf (или правильный путь).

+0

Документы Maven могут помочь определить, что путь к 'settings.xml': https://maven.apache.org/settings.html#Quick_Overview –

Смежные вопросы