安装opendaylight控制器的问题

时间:2018-12-14 15:58:38

标签: java maven maven-3 java-7 opendaylight

我正在使用

  • ubuntu 14.04,
  • maven 3.3.9和
  • jdk 1.7.0_45

问题: 我正在使用本手册(第Importing the Source Into Eclipse节): https://wiki.opendaylight.org/view/GettingStarted:_Eclipse#OLD:_Manual_procedure_previously_used

运行mvn clean install时出现此错误:

[WARNING] Failure to transfer org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml from https://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 metadata org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version
[WARNING] Failure to transfer org.apache.maven.plugins:maven-resources-plugin/maven-metadata.xml from https://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 metadata org.apache.maven.plugins:maven-resources-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version
[WARNING] Failure to transfer org.apache.maven.plugins:maven-deploy-plugin/maven-metadata.xml from https://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 metadata org.apache.maven.plugins:maven-deploy-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/yangtools/mockito-configuration/0.6.1-1-SNAPSHOT/maven-metadata.xml
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/yangtools/mockito-configuration/0.6.1-1-SNAPSHOT/mockito-configuration-0.6.1-1-SNAPSHOT.pom
[WARNING] The POM for org.opendaylight.yangtools:mockito-configuration:jar:0.6.1-1-SNAPSHOT is missing, no dependency information available
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/yangtools/mockito-configuration/0.6.1-1-SNAPSHOT/mockito-configuration-0.6.1-1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] commons.parent ..................................... SUCCESS [  3.215 s]
[INFO] checkstyle ......................................... SUCCESS [  9.702 s]
[INFO] commons.opendaylight ............................... SUCCESS [ 17.156 s]
[INFO] sal ................................................ SUCCESS [02:31 min]
[INFO] configuration ...................................... SUCCESS [  3.291 s]
[INFO] containermanager ................................... SUCCESS [  3.044 s]
[INFO] usermanager ........................................ SUCCESS [  6.530 s]
[INFO] appauth ............................................ SUCCESS [  2.346 s]
[INFO] clustering.services ................................ SUCCESS [  2.078 s]
[INFO] sal.connection ..................................... SUCCESS [  2.076 s]
[INFO] connectionmanager .................................. SUCCESS [  2.350 s]
[INFO] hosttracker ........................................ SUCCESS [  3.004 s]
[INFO] switchmanager ...................................... SUCCESS [  8.574 s]
[INFO] topologymanager .................................... SUCCESS [  7.406 s]
[INFO] arphandler ......................................... SUCCESS [  3.113 s]
[INFO] bundlescanner ...................................... SUCCESS [  2.138 s]
[INFO] bundlescanner.implementation ....................... SUCCESS [  5.797 s]
[INFO] commons.logback_settings ........................... SUCCESS [  0.555 s]
[INFO] clustering.services-implementation ................. SUCCESS [ 28.061 s]
[INFO] clustering.test .................................... SUCCESS [  3.128 s]
[INFO] commons.httpclient ................................. SUCCESS [  3.409 s]
[INFO] commons.northbound ................................. SUCCESS [  4.284 s]
[INFO] configuration.implementation ....................... SUCCESS [  2.741 s]
[INFO] connectionmanager.implementation ................... SUCCESS [  2.118 s]
[INFO] connectionmanager.northbound ....................... SUCCESS [ 28.574 s]
[INFO] containermanager.implementation .................... SUCCESS [  1.938 s]
[INFO] web ................................................ SUCCESS [  4.529 s]
[INFO] containermanager.northbound ........................ SUCCESS [ 32.440 s]
[INFO] controllermanager.northbound ....................... SUCCESS [ 15.554 s]
[INFO] forwarding.staticrouting ........................... SUCCESS [  3.485 s]
[INFO] forwardingrulesmanager ............................. SUCCESS [ 19.376 s]
[INFO] devices.web ........................................ SUCCESS [  3.486 s]
[INFO] flowprogrammer.northbound .......................... SUCCESS [ 14.038 s]
[INFO] flows.web .......................................... SUCCESS [  1.861 s]
[INFO] forwarding.staticrouting.northbound ................ SUCCESS [  8.540 s]
[INFO] forwardingrulesmanager.implementation .............. SUCCESS [  2.892 s]
[INFO] hosttracker.implementation ......................... SUCCESS [  6.346 s]
[INFO] hosttracker.northbound ............................. SUCCESS [  8.275 s]
[INFO] httpservice-bridge ................................. SUCCESS [  8.785 s]
[INFO] jolokia-bridge ..................................... SUCCESS [  1.013 s]
[INFO] logging.bridge ..................................... FAILURE [  3.491 s]
[INFO] sal.networkconfiguration ........................... SKIPPED
[INFO] networkconfig.bridgedomain.northbound .............. SKIPPED
[INFO] networkconfig.neutron .............................. SKIPPED
[INFO] networkconfig.neutron.implementation ............... SKIPPED
[INFO] networkconfig.neutron.northbound ................... SKIPPED
[INFO] osgi-brandfragment.web ............................. SKIPPED
[INFO] protocol_plugins.openflow .......................... SKIPPED
[INFO] routing.dijkstra_implementation .................... SKIPPED
[INFO] sal.connection.implementation ...................... SKIPPED
[INFO] sal.implementation ................................. SKIPPED
[INFO] sal.networkconfiguration.implementation ............ SKIPPED
[INFO] samples.loadbalancer ............................... SKIPPED
[INFO] samples.loadbalancer.northbound .................... SKIPPED
[INFO] samples.simpleforwarding ........................... SKIPPED
[INFO] security ........................................... SKIPPED
[INFO] statisticsmanager .................................. SKIPPED
[INFO] statistics.northbound .............................. SKIPPED
[INFO] statisticsmanager.implementation ................... SKIPPED
[INFO] subnets.northbound ................................. SKIPPED
[INFO] switchmanager.implementation ....................... SKIPPED
[INFO] switchmanager.northbound ........................... SKIPPED
[INFO] topology.northbound ................................ SKIPPED
[INFO] topology.web ....................................... SKIPPED
[INFO] troubleshoot.web ................................... SKIPPED
[INFO] usermanager.implementation ......................... SKIPPED
[INFO] usermanager.northbound ............................. SKIPPED
[INFO] netconf-subsystem .................................. SKIPPED
[INFO] ietf-netconf-monitoring ............................ SKIPPED
[INFO] ietf-netconf-monitoring-extension .................. SKIPPED
[INFO] concepts ........................................... SKIPPED
[INFO] config-subsystem ................................... SKIPPED
[INFO] config-api ......................................... SKIPPED
[INFO] config-util ........................................ SKIPPED
[INFO] config-manager ..................................... SKIPPED
[INFO] config-plugin-parent ............................... SKIPPED
[INFO] yang-jmx-generator ................................. SKIPPED
[INFO] yang-jmx-generator-plugin .......................... SKIPPED
[INFO] netty-config-api ................................... SKIPPED
[INFO] netty-event-executor-config ........................ SKIPPED
[INFO] protocol-framework ................................. SKIPPED
[INFO] netconf-api ........................................ SKIPPED
[INFO] netconf-mapping-api ................................ SKIPPED
[INFO] commons.thirdparty ................................. SKIPPED
[INFO] ganymed ............................................ SKIPPED
[INFO] netconf-util ....................................... SKIPPED
[INFO] netconf-client ..................................... SKIPPED
[INFO] netconf-impl ....................................... SKIPPED
[INFO] yang-test-plugin ................................... SKIPPED
[INFO] yang-test .......................................... SKIPPED
[INFO] config-netconf-connector ........................... SKIPPED
[INFO] config-persister-api ............................... SKIPPED
[INFO] config-persister-file-xml-adapter .................. SKIPPED
[INFO] config-persister-directory-xml-adapter ............. SKIPPED
[INFO] config-persister-impl .............................. SKIPPED
[INFO] logback-config ..................................... SKIPPED
[INFO] netconf-config-dispatcher .......................... SKIPPED
[INFO] netconf-monitoring ................................. SKIPPED
[INFO] netconf-ssh ........................................ SKIPPED
[INFO] netty-threadgroup-config ........................... SKIPPED
[INFO] threadpool-config-api .............................. SKIPPED
[INFO] threadpool-config-impl ............................. SKIPPED
[INFO] netty-timer-config ................................. SKIPPED
[INFO] sal-parent ......................................... SKIPPED
[INFO] sal-common-api ..................................... SKIPPED
[INFO] sal-binding-api .................................... SKIPPED
[INFO] sal-binding-config ................................. SKIPPED
[INFO] sal-binding-util ................................... SKIPPED
[INFO] sal-common-util .................................... SKIPPED
[INFO] sal-common-impl .................................... SKIPPED
[INFO] sal-common ......................................... SKIPPED
[INFO] sal-core-api ....................................... SKIPPED
[INFO] sal-core-spi ....................................... SKIPPED
[INFO] sal-broker-impl .................................... SKIPPED
[INFO] model-parent ....................................... SKIPPED
[INFO] model-inventory .................................... SKIPPED
[INFO] model-flow-base .................................... SKIPPED
[INFO] model-flow-service ................................. SKIPPED
[INFO] model-flow-statistics .............................. SKIPPED
[INFO] sal-binding-broker-impl ............................ SKIPPED
[INFO] model-topology ..................................... SKIPPED
[INFO] MD-SAL to AD-SAL Adaptation Parent ................. SKIPPED
[INFO] MD-SAL to AD-SAL Adaptation ........................ SKIPPED
[INFO] sal-connector-api .................................. SKIPPED
[INFO] sal-netconf-connector .............................. SKIPPED
[INFO] sal-remote ......................................... SKIPPED
[INFO] sal-rest-connector ................................. SKIPPED
[INFO] sal-restconf-broker ................................ SKIPPED
[INFO] shutdown-api ....................................... SKIPPED
[INFO] shutdown-impl ...................................... SKIPPED
[INFO] model-flow-management .............................. SKIPPED
[INFO] flow-management-compatibility ...................... SKIPPED
[INFO] forwardingrules-manager ............................ SKIPPED
[INFO] inventory-manager .................................. SKIPPED
[INFO] statistics-manager ................................. SKIPPED
[INFO] topology-lldp-discovery ............................ SKIPPED
[INFO] topology-manager ................................... SKIPPED
[INFO] sal-samples ........................................ SKIPPED
[INFO] sample-toaster ..................................... SKIPPED
[INFO] sample-toaster-consumer ............................ SKIPPED
[INFO] sample-toaster-provider ............................ SKIPPED
[INFO] distribution.opendaylight .......................... SKIPPED
[INFO] clustering.stub .................................... SKIPPED
[INFO] hosttracker_new .................................... SKIPPED
[INFO] hosttracker_new.implementation ..................... SKIPPED
[INFO] inventory-topology-compatibility ................... SKIPPED
[INFO] config-module-archetype ............................ SKIPPED
[INFO] protocol_plugins.stub .............................. SKIPPED
[INFO] releasepom ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:10 min
[INFO] Finished at: 2018-12-15T11:33:05+03:30
[INFO] Final Memory: 194M/357M
[INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project logging.bridge: Could not resolve dependencies for project org.opendaylight.controller:logging.bridge:bundle:0.4.1-1-SNAPSHOT: Failure to find org.opendaylight.yangtools:mockito-configuration:jar:0.6.1-1-SNAPSHOT in https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-snapshot has elapsed or updates are forced -> [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/DependencyResolutionException
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :logging.bridge

我的父pom.xml和settings.xml是此链接: https://askubuntu.com/questions/1100920/failed-to-execute-goal-on-project-logging-bridge-could-not-resolve-dependencies

我使用以下代码解决了问题,但再次出现错误:

cp -n ~/.m2/settings.xml{,.orig} ; \
wget -q -O https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml

2 个答案:

答案 0 :(得分:0)

您正在使用的仓库中正在寻找一个依赖项,which does not exist,正如错误消息中所述。更正<dependecy>中的pom.xml版本,如果未直接引用,则使用Dependecy Management强制执行。

答案 1 :(得分:0)

作为briadeus的回答,您的问题是由于SSL。

除了使用JVM参数,您还有其他解决方案:

  1. 使用Java 8 ++运行maven并使用Java 7和toolchain进行编译:这需要进行一些修改,可能无法在所有情况下都有效,但是您应该尝试一下,因为它在maven-compiler-上可以很好地工作-插件,maven-failsafe-plugin和maven-surefire-plugin(我正在使用它来使用Java 8构建Java 11项目)。
  2. 使用更新的JVM(Java 8、11等)和本地非https存储库,例如Sonatype Nexus OSS

案例2背后的想法很简单:

  1. 由于各种原因您不能使用Java 8,并且使用工具链失败。
  2. 您告诉Maven使用http://localhost:8081/repository/[...];
  3. 您将Nexus配置为镜像/代理您尝试访问的存储库。由于它使用的是较新的版本,因此不会由于SSL而失败。

请注意,您也可以与团队共享此存储库。