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.
I generated the archetypes and am able to create the dukes-age project. However it has non-resolvable maven issues:
Could not find artifact org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT
Here is the full error:
[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]
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.
Any ideas?
How to Fix Maven Artifacts Could not be Resolved Error? Exclude jms, jmxri & jmxtools JAR Dependencies I remember long time ago, I faced the same error and I tried fixing it by manually adding .jar files to my maven repository locally. I executed below command to install it in my localhost maven repo and everything worked.
Maven artifacts are not limited to java resources. We can generate whatever resource we need like, documentation, project-site, zip-archives, native-libraries, etc. Each maven project has a unique identifier consisting of [groupId, artifactId, version].
The First Cup of Java EE Tutorial teaches and demonstrates Java EE basics and is intended for beginners. The latest build of the First Cup of Java EE Tutorial is automatically published to this site as HTML. The tutorial is authored in AsciiDoc.
Check if the jar is missing or not. If yes, place it manually in the .m2 repository. Sometimes the jar mentioned in the pom.xml is not downloaded and it gives error. You can also try deleting the entire .m2 repository folder and run the maven build. The jars get downloaded from scratch. It might resolve the problem as well.
Filed this issue as: https://java.net/jira/browse/FIRSTCUP-14
The workaround is to replace the parent definition:
<parent>
<artifactId>firstcup</artifactId>
<groupId>org.glassfish.javaeetutorial.firstcup</groupId>
<version>7.0.1</version>
I'm working on getting an updated package in the Update Center.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With