问题描述
我正在关注FirstCup的Java EE 7更新版本。我安装了glassfish 4并使用NetBeans 7.3。我正在研究第一个例子,我正在解决maven问题。
I'm following along with the Java EE 7 updated version of FirstCup. I have glassfish 4 installed and am using NetBeans 7.3. I'm working on the very first example and I'm getting maven issues.
我生成了原型,并且能够创建dukes-age项目。但它有不可解决的maven问题:
I generated the archetypes and am able to create the dukes-age project. However it has non-resolvable maven issues:
无法找到工件org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT
Could not find artifact org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT
以下是完整错误:
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.mycompany:dukes-age:1.0-SNAPSHOT (/Users/koblentz/NetBeansProjects/dukes-age/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 13 -> [Help 2]
[ERROR]
我不确定该做什么/如何解决这个问题。我在.m2 repo中删除了我的本地缓存,并尝试从命令行构建而不是使用NB来运行maven命令。
I'm not really sure what to do/how to fix this. I deleted my local cache in the .m2 repo and tried building from the commandline instead of using NB to run the maven commands.
任何想法?
推荐答案
修正了它。原型生成的pom正在寻找7.0.1-SNAPSHOT,m2 repo中的实际版本是7.0.1,最后没有SNAPSHOT。
Fixed it. The pom generated by the archetype is looking for 7.0.1-SNAPSHOT and the actual version in m2 repo is 7.0.1 without the SNAPSHOT on the end.
这篇关于Maven中的Java EE 7 First Cup Tutorial错误:无法找到工件org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!