lwjglgamedev / lwjglbook-leg

Source code of the chapters of the book 3D Game Development with LWJGL 3
https://ahbejarano.gitbook.io/lwjglgamedev/
Apache License 2.0
560 stars 202 forks source link

Problem with parent pom file #13

Closed Foobin closed 8 years ago

Foobin commented 8 years ago

This might be just me, but when I downloaded the source files for the first chapter of your book, maven refused to build the project with a NonResolveableParentPOM error. I then just copied and pasted most of the code from https://github.com/lwjglgamedev/lwjglbook/blob/master/pom.xml into my local POM, and it works now. I just wanted to make you aware of the matter.

lwjglgamedev commented 8 years ago

I'm afraid I'm not able to reproduce your problem. I'm able to build the project correctly. Can you post the full maven error log?

Thanks in advance.

Foobin commented 8 years ago

Here you go:

The build could not read 1 project -> [Help 1]

  The project org.lwjglb:game-c05-p2:1.0 (D:\Netbeans Projects\glproject\pom.xml) has 1 error
    Non-resolvable parent POM: Failure to find org.lwjglb:book:pom:1.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 13 -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

I'm very new to maven so it might well be just some stupid mistake I made.

Here is a paste bin of what does work on my machine: http://pastebin.com/F5GV1z8m

lwjglgamedev commented 8 years ago

Ok, some more questions.

Are you using latest maven version? (3.3.9)

How are you building the project. In the parent directory (the roor dir), you should execute something like this: mvn clean package.

Definitely is not able to resolve parent. But I don't know why.

httpdigest commented 8 years ago

According to the console output The project org.lwjglb:game-c05-p2:1.0 (D:\Netbeans Projects\glproject\pom.xml) @Foobin seems to have copied the chapter 05 sources into a different folder, without copying the parent directory structure, too. And because the parent pom itself is likely not deployed to Maven Central, and cannot be found in the direct parent folder (i.e. D:\Netbeans Projects\) Maven cannot find the parent pom.

Foobin commented 8 years ago

Yes that must be it. Sorry to waste your time :)