2015-11-12 5 views
1

Я пытаюсь интегрировать Хадсона с Nexus. Поскольку я строю проект без использования Nexus, его сборка успешна.Nexus не загружает артефакты через Hudson

Когда я пытаюсь строить его с Nexus, я получаю следующие ошибки построения:

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 12:22:22-0300) 
Maven home: /var/lib/hudson/maven/slavebundle/bundled-maven 
Java version: 1.7.0_91, vendor: Oracle Corporation 
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre 
Default locale: pt_BR, platform encoding: UTF-8 
OS name: "linux", version: "2.6.32-220.el6.x86_64", arch: "amd64", family: "unix" 

SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/var/lib/hudson/maven/slavebundle/lib/maven3-eventspy-runtime.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/var/lib/hudson/maven/slavebundle/bundled-maven/lib/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 



[DEBUG] Connected to remote 
[INFO] o.h.m.e.h.SettingsBuildingRequestHandler - Using settings document ID: ff56412a-102c-4256-80bf-f234990c91ba 

[INFO] Scanning for projects... 

[INFO] 

[INFO] ------------------------------------------------------------------------ 
[INFO] Building Project 
[INFO] ------------------------------------------------------------------------ 
Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom 

[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.5 is missing, no dependency information available 
Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.378s 
[INFO] Finished at: Thu Nov 12 11:37:31 BRST 2015 
[INFO] Final Memory: 7M/30M 
[INFO] ------------------------------------------------------------------------ 
[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s) 
[INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 in nexus (http://localhost:8081/nexus/content/groups/public) 
[DEBUG] Closing connection to remote 
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 in nexus (http://localhost:8081/nexus/content/groups/public) -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 
[DEBUG] Waiting for process to finish 
[DEBUG] Result: 1 
[DEBUG] Skipping watched dependency update for build: Tracker #26 due to result: FAILURE 
Finished: FAILURE 

И это мои сконфигурированные настройки на Гудзоне:

<settings> 
    <mirrors> 
    <mirror> 
     <!--This sends everything else to /public --> 
     <id>nexus</id> 
     <mirrorOf>*</mirrorOf> 
     <url>http://localhost:8081/nexus/content/groups/public</url> 
    </mirror> 
    </mirrors> 
    <profiles> 
    <profile> 
     <id>nexus</id> 
     <!--Enable snapshots for the built in central repo to direct --> 
     <!--all requests to nexus via the mirror --> 
     <repositories> 
     <repository> 
      <id>central</id> 
      <url>http://central</url> 
      <releases><enabled>true</enabled></releases> 
      <snapshots><enabled>true</enabled></snapshots> 
     </repository> 
     </repositories> 
    <pluginRepositories> 
     <pluginRepository> 
      <id>central</id> 
      <url>http://central</url> 
      <releases><enabled>true</enabled></releases> 
      <snapshots><enabled>true</enabled></snapshots> 
     </pluginRepository> 
     </pluginRepositories> 
    </profile> 
    </profiles> 
    <activeProfiles> 
    <!--make the profile active all the time --> 
    <activeProfile>nexus</activeProfile> 
    </activeProfiles> 
    <servers> 
    <server> 
     <id>nexus</id> 
     <username>admin</username> 
     <password>admin123</password> 
    </server> 
    </servers> 
</settings> 

Я не знаю, почему это не загружая из центрального репозитория в общий публичный репозиторий.

Может кто-то пролить свет на это?

+0

Вы не открыты для Интернета, чтобы загрузить необходимые артефакты, которые еще не находятся в вашей связи? – khmarbaise

+0

@khmarbaise Да, это человек. Проверено с помощью iptables и до сих пор не удалось загрузить. Я пробовал с Хадсоном без Nexus, который работает на той же машине, и он работал как шарм. Он также работает, если Nexus находится на другой машине. Поэтому я попытаюсь переустановить все это еще раз. –

+0

Вы проверили внутри Nexus конфигурацию прокси-сервера, если это работает? – khmarbaise

ответ

1

Я, наконец, решил. Это было выбрано как SSL Exception при попытке доступа к Центральному репозиторию.

Это исключение автоматически блокировало мой доступ.

Я отправился в Центральный репозиторий> Конфигурация и изменил адрес удаленного хранилища: http://repo.maven.apache.org/maven2/ и щелкнул правой кнопкой мыши по центру и нажал «Разрешить прокси».

После этого он работал как шарм.

Я надеюсь, что это поможет кому-то, потому что я потерял почти два дня.

EDIT (19/11/2015):

Если вы используете свой OpenJDK, используя RedHat/CentOS, есть ошибка предотвращения доступа через SSL, так же, как указал на @rseddon в разделе комментариев. В обходные здесь: https://issues.sonatype.org/browse/NEXUS-7999?focusedCommentId=306680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-306680

Если вы в спешке, это один я использовал:

Добавьте следующую строку в $ {JAVA_HOME} /jre/lib/security/java.security:

jdk.tls.disabledAlgorithms = EC, ECDHE, ECDH

Теперь я могу использовать ссылку HTTPS на моем Центральной Repo.

+0

Запустили openjdk на ОС redhat/centos? Если это так, есть ошибка, которая препятствует доступу к центру через ssl. См. Здесь обходной путь: https://issues.sonatype.org/browse/NEXUS-7999?focusedCommentId=306680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-306680 – rseddon

+0

Я запускал его на CentOs. Спасибо, мужчина, я посмотрю. –