maven - 使用 OpenDaylight 入门原型(prototype)不起作用

标签 maven sdn opendaylight

尝试遵循 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-TypeArchetype-Version 如下:

使用this search on ODL's Nexus repository:

  • 对于 Oxygen 开发快照,请使用 Snapshot-Type=opendaylight.snapshotArchetype-Version=1.5.0-SNAPSHOT
  • 对于 Nitrogen SR1 快照,请使用 Snapshot-Type=opendaylight.snapshotArchetype-Version=1.4.1-SNAPSHOT
  • 对于 Nitrogen 版本,请使用 Snapshot-Type=opendaylight.releaseArchetype-Version=1.4.0
  • 对于 Carbon,请使用 Snapshot-Type=opendaylight.releaseArchetype-Version=1.3.0-Carbon
  • 对于 Boron SR0,请使用 Snapshot-Type=opendaylight.releaseArchetype-Version=1.2.0-Boron
  • 对于 Boron SR1,请使用 Snapshot-Type=opendaylight.releaseArchetype-Version=1.2.1-Boron-SR1
  • >
  • 对于 Boron SR2,请使用 Snapshot-Type=opendaylight.releaseArchetype-Version=1.2.2-Boron-SR2
  • >
  • 对于 Boron 快照,请使用 Snapshot-Type=opendaylight.snapshotArchetype-Version=1.2.2-SNAPSHOT

您还可以看到 this answer

关于maven - 使用 OpenDaylight 入门原型(prototype)不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47054929/

相关文章:

java - 使用maven执行jar包

maven - 无法使用ivy解决依赖关系

java - eclipse无法识别包

c++ - 在 OMNet 上实现 SDN Controller

linux - linux下karaf客户端连接服务器失败

osgi - 安装 org.fusesource.leveldbjni 时抛出 Karaf 异常

java - 打包后maven项目持久化不起作用

python - POX - 安装一条规则,当某个数据包与 ofp_match 匹配时发送一个虚拟数据包

java - 过滤器中的自定义 propertyConverter 在 Neo4j OGM 中被覆盖

java - 使用 Opendaylight 通过 NETCONF 检索列表时出现错误 "Duplicate namespace in XML input"