尝试按照opendaylight developer tutorial获取在控制器上运行的初始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)
任何想法如何解决此问题(或其他获取第一个应用程序的方式)?
答案 0 :(得分:2)
从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 dev snapshot
使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.5.0-SNAPSHOT
Nitrogen SR1 snapshot
使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.4.1-SNAPSHOT
Nitrogen release
使用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
使用Snapshot-Type=opendaylight.snapshot
和Archetype-Version=1.2.2-SNAPSHOT
您还可以看到this answer。
答案 1 :(得分:0)
我在OpenDaylight forum找到了解决方案。
请删除
-DarchtypeCatlog=http://nexus.opendaylight.org/content/repositories/opendaylight.release/archetype-catalog.xml
并执行以下命令。
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.release -DarchetypeVersion=1.4.0