2013-11-20 3 views
0

Я бег затмения Kepler 4.3 и Maven 3.0.5 при запуске Maven: архетип генерировать на первый раз он говорит Failed скачать требуемый plugins.Build не удался, и бросал NoPluginFoundForPrefixException. Я новичок в maven, пожалуйста, помогите мне.Maven архетип: генерировать первое исполнение времени бросает ошибку

[INFO] Scanning for projects... 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 o 
r one of its dependencies could not be resolved: Failed to read artifact descrip 
tor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
install-plugin/2.3.1/maven-install-plugin-2.3.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3 
.1 or one of its dependencies could not be resolved: Failed to read artifact des 
criptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
deploy-plugin/2.7/maven-deploy-plugin-2.7.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or 
one of its dependencies could not be resolved: Failed to read artifact descripto 
r for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
site-plugin/3.0/maven-site-plugin-3.0.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-site-plugin:3.0: Plugin org.apache.maven.plugins:maven-site-plugin:3.0 or one 
of its dependencies could not be resolved: Failed to read artifact descriptor fo 
r org.apache.maven.plugins:maven-site-plugin:jar:3.0 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
antrun-plugin/1.3/maven-antrun-plugin-1.3.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or 
one of its dependencies could not be resolved: Failed to read artifact descripto 
r for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plu 
gin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read 
artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-b 
eta-5 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
dependency-plugin/2.1/maven-dependency-plugin-2.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin 
:2.1 or one of its dependencies could not be resolved: Failed to read artifact d 
escriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
release-plugin/2.0/maven-release-plugin-2.0.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave 
n-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 o 
r one of its dependencies could not be resolved: Failed to read artifact descrip 
tor for org.apache.maven.plugins:maven-release-plugin:jar:2.0 
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat 
a.xml 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
metadata.xml 
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xm 
l from/to central (http://repo.maven.apache.org/maven2): Connection to http://re 
po.maven.apache.org refused 
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/ 
to central (http://repo.maven.apache.org/maven2): Connection to http://repo.mave 
n.apache.org refused 
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from h 
ttp://repo.maven.apache.org/maven2 was cached in the local repository, resolutio 
n will not be reattempted until the update interval of central has elapsed or up 
dates are forced. Original error: Could not transfer metadata org.apache.maven.p 
lugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): 
Connection to http://repo.maven.apache.org refused 
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://r 
epo.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 a 
re forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-m 
etadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to 
http://repo.maven.apache.org refused. 

Это то, что я получаю из командной строки .. и я использую окно 7.

+0

возможно дубликат: http://stackoverflow.com/questions/7819163/maven-failed-to-retrieve-plugin-descriptor-error – poiu2000

+0

спасибо, что помог lot.Maven указывает т o неправильный settings.xml и его изменение отлично работает! – shashantrika

ответ

0

Похоже, что соединение не установлено в удаленное хранилище Maven. Прокси IE может привести к этой ошибке.

Выполните следующие действия для решения этой проблемы: -

Шаг 1: Проверьте свои данные прокси-сервера на - Tools-->Internet Options-->Connections-->LAN Settings

Шаг 2: скопировать и порт прокси

Шаг 3: перейти по умолчанию локального расположения хранилища: Default: ~/.m2/repository и редактировать файл 'settings.xml'

поиска прокси-тег и заполнить детали, как

цен ниже
<proxy> 
    <id>optional</id> 
    <active>true</active> 
    <protocol>http</protocol> 
    <username><user-name></username> 
    <password><password></password>  
    <host><proxy-host></host> 
    <port>80</port>   
</proxy> 

По умолчанию Порт прокси: 80 (применяется в соответствии с вашими настройками)

, если вы не нашли 'settings.xml' файл на '~/.m2/repository' месте в хранилище по умолчанию затем скопировать этот файл из '~\apache-maven-3.0.5\conf' места.

Шаг 4: сохраните файл.

Шаг 5: работать в команде prompt-- mvn:archetype generate

ваша проблема должна быть решена.

0

Да у меня была такая же проблема, настройки прокси-сервера в файле setting.xml marven папки командой

sudo gksu gedit /usr/share/maven/conf/settngs.xml 

затем снимите комментарий раздел прокси и и установить прокси-сервер, как показано ниже

<proxies> 
<!-- proxy 
| Specification for one proxy, to be used in connecting to the network. 
| 
--> 
<proxy> 
    <id>optional</id> 
    <active>true</active> 
    <protocol>http</protocol> 
    <username></username> 
    <password></password> 
    <host>10.3.100.207</host> 
    <port>8080</port> 
    <nonProxyHosts>local.net|some.host.com</nonProxyHosts> 
</proxy> 

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