我无法让 LYO OSLC 研讨会运行。在 Lab1 中,我无法通过 maven 运行项目。请给我一些意见。
软件:
Windows 8.1 64bit
Java 8
Eclipse Luna Service Release 1a (4.4.1)
M2E - Maven 集成 fer Eclipse 1.5.0.20140606-0033
EGit 3.6.2.201501210735-r
这些应该是最重要的。
我一直关注 ..\org.eclipse.lyo.docs\Lab1\Lyo_OSLC_Workshop.pdf 研讨会 [您可以在 OSLCWorkshop 的 Lyo Eclipse 网站上的“研讨会入门”下找到它],直到第 10 页。单击“运行”时我收到以下错误:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.eclipse.lyo.oslc4j.rio:oslc4j-bugzilla-sample-lab1:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:jetty-maven-plugin is missing. @ line 91, column 11
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building oslc4j-bugzilla-sample-lab1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jetty-maven-plugin:8.1.16.v20140903:run (default-cli) @ oslc4j-bugzilla-sample-lab1 >>>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.517 s
[INFO] Finished at: 2015-01-25T17:44:24+01:00
[INFO] Final Memory: 7M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project oslc4j-bugzilla-sample-lab1: Could not resolve dependencies for project org.eclipse.lyo.oslc4j.rio:oslc4j-bugzilla-sample-lab1:war:0.0.1-SNAPSHOT: Failed to collect dependencies at org.eclipse.lyo.server:oauth-webapp:war:[0.0.1-SNAPSHOT,): No versions available for org.eclipse.lyo.server:oauth-webapp:war:[0.0.1-SNAPSHOT,) within specified range -> [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] cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我在这里阅读 stackoverflow.com/questions/10426557/missing-maven-plugin-jetty 必须更改 pom.xml。原来的设置是:
<build>
<finalName>oslc4j-bugzilla-sample</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<!-- <version>7.3.0.v20110203</version> -->
现在我有这种方式:
<build>
<finalName>oslc4j-bugzilla-sample</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>mvn org.mortbay.jetty:jetty-maven-plugin:run</artifactId>
<version>9.2.7.v20150116</version>
该版本对应于 C:\Users\munk\Downloads\jetty-distribution-9.2.7.v20150116\jetty-distribution-9.2.7.v20150116\demo-base,我可以从中启动 Web 服务器。
当我再次“运行”时,我得到这个输出:
[INFO] Scanning for projects...
[WARNING] Failed to normalize pathname for lock on C:\Users\munk\.m2\repository\.locks\org.mortbay.jetty~mvn org.mortbay.jetty:jetty-maven-plugin:run~9.2.7.v20150116: java.io.IOException: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch
[WARNING] Failed to lock file C:\Users\munk\.m2\repository\.locks\org.mortbay.jetty~mvn org.mortbay.jetty:jetty-maven-plugin:run~9.2.7.v20150116: java.io.FileNotFoundException: C:\Users\munk\.m2\repository\.locks\org.mortbay.jetty~mvn org.mortbay.jetty:jetty-maven-plugin:run~9.2.7.v20150116.aetherlock (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
[WARNING] Failed to canonicalize path C:\Users\munk\.m2\repository\org\mortbay\jetty\mvn org.mortbay.jetty:jetty-maven-plugin:run\9.2.7.v20150116\mvn org.mortbay.jetty:jetty-maven-plugin:run-9.2.7.v20150116.pom.lastUpdated: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch
[INFO] Downloading: repo.maven.apache.org/maven2/org/mortbay/jetty/mvn org.mortbay.jetty:jetty-maven-plugin:run/9.2.7.v20150116/mvn org.mortbay.jetty:jetty-maven-plugin:run-9.2.7.v20150116.pom
[WARNING] Failed to canonicalize path C:\Users\munk\.m2\repository\org\mortbay\jetty\mvn org.mortbay.jetty:jetty-maven-plugin:run\9.2.7.v20150116\mvn org.mortbay.jetty:jetty-maven-plugin:run-9.2.7.v20150116.pom.lastUpdated: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch
[WARNING] Failed to create parent directories for tracking file C:\Users\munk\.m2\repository\org\mortbay\jetty\mvn org.mortbay.jetty:jetty-maven-plugin:run\9.2.7.v20150116\mvn org.mortbay.jetty:jetty-maven-plugin:run-9.2.7.v20150116.pom.lastUpdated
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:mvn org.mortbay.jetty:jetty-maven-plugin:run:9.2.7.v20150116: Plugin org.mortbay.jetty:mvn org.mortbay.jetty:jetty-maven-plugin:run:9.2.7.v20150116 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:mvn org.mortbay.jetty:jetty-maven-plugin:run:jar:9.2.7.v20150116
[INFO] Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading: repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloaded: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 47.1 KB/sec)
[INFO] Downloaded: repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 72.5 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.733 s
[INFO] Finished at: 2015-01-25T17:09:15+01:00
[INFO] Final Memory: 10M/307M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\munk\.m2\repository), central (repo.maven.apache.org/maven2)] -> [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] cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
最后的 URL 不存在,我无法正确构建这个 Lab1。据我了解,“码头”插件是 Maven 的一部分,但我在 Maven 中找不到它,那该怎么办?
我想现在我必须在 Eclipse 运行时配置“运行配置”中告诉 Eclipse 在哪里可以找到这个码头目录,但我不知道确切的位置和方式。PDF文件中没有提到它,到目前为止我发现的其他指南中也没有提到它。所以请告诉我我在这里的错误是什么,我该如何做对?
由于这里对新手的严格规定不能发布超过 2 个链接,我不得不从代码中删除所有 http 前导码。如果您需要点击链接,请自行添加。谢谢你。