尝试遵循 opendaylight developer tutorial获得在 Controller 上运行的初始 hello world 应用程序,但是运行命令
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype \ -DarchetypeRepository=https://nexus.opendaylight.org/content/repositories/public/ \ -DarchetypeCatalog=https://nexus.opendaylight.org/content/repositories/public/archetype-catalog.xml
导致错误
No plugin found for prefix ' -DarchetypeRepository=https' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/andrew/.m2/repository), opendaylight-snapshot (https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/), opendaylight-mirror (https://nexus.opendaylight.org/content/repositories/public/), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
我已经成功使用命令使其成功
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default) on project test-impl: You have 1 Checkstyle violation. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default) on project test-impl: You have 1 Checkstyle violation. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
有什么想法可以解决这个问题(或获得第一个应用程序的其他方法)吗?
最佳答案
从 this link 中,您可以使用以下命令:
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype \
-DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/<Snapshot-Type>/ \
-DarchetypeCatalog=remote -DarchetypeVersion=<Archetype-Version>
同时替换 Snapshot-Type
和 Archetype-Version
如下:
使用this search on ODL's Nexus repository:
- 对于
Oxygen 开发快照
,请使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.5.0-SNAPSHOT
- 对于
Nitrogen SR1 快照
,请使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.4.1-SNAPSHOT
- 对于
Nitrogen 版本
,请使用Snapshot-Type=opendaylight.release
和Archetype-Version=1.4.0
- 对于
Carbon
,请使用Snapshot-Type=opendaylight.release
和Archetype-Version=1.3.0-Carbon
- 对于
Boron SR0
,请使用Snapshot-Type=opendaylight.release
和Archetype-Version=1.2.0-Boron
- 对于
Boron SR1
,请使用Snapshot-Type=opendaylight.release
和Archetype-Version=1.2.1-Boron-SR1
>
- 对于
Boron SR2
,请使用Snapshot-Type=opendaylight.release
和Archetype-Version=1.2.2-Boron-SR2
>
- 对于
Boron 快照
,请使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.2.2-SNAPSHOT
您还可以看到 this answer 。
关于maven - 使用 OpenDaylight 入门原型(prototype)不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47054929/