Hello iforce! What IDE are you used for JSON loader on JAVA. When I compile source code in NetBeanse, I get error:
Failed to execute goal on project jbox2d-testbed: Could not resolve dependencies for project org.jbox2d:jbox2d-testbed:jar:2.3.0-SNAPSHOT: The following artifacts could not be resolved: org.jbox2d:jbox2d-library:jar:2.3.0-SNAPSHOT, org.jbox2d:jbox2d-serialization:jar:1.0.0-SNAPSHOT, org.jbox2d:b2dJson:jar:1.0.0: Could not find artifact org.jbox2d:jbox2d-library:jar:2.3.0-SNAPSHOT -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Compilation JAVA json loader
Re: Compilation JAVA json loader
I was using Eclipse for that. I'm not all that experienced with it, and even more confusing was maven... I ended up making the downloads by editing the contents of the jar directly using a zip program because I could not for the life of me figure out how to do it with mvn
I used some maven plugin for Eclipse, I forget the exact name and I am away from home for a while so I can't check right now, but I did all the compiling with that instead of using the command line.

I used some maven plugin for Eclipse, I forget the exact name and I am away from home for a while so I can't check right now, but I did all the compiling with that instead of using the command line.
Re: Compilation JAVA json loader
Oh, thanks! I realized what the problem was)
-
- Posts: 2
- Joined: Sun Jul 28, 2013 5:23 pm
Re: Compilation JAVA json loader
Daboog,
What did you do to resolve this? It looks like the pom.xml file for the java project may be incorrect.
Thank you,
Barry
What did you do to resolve this? It looks like the pom.xml file for the java project may be incorrect.
Thank you,
Barry
-
- Posts: 2
- Joined: Sun Jul 28, 2013 5:23 pm
Re: Compilation JAVA json loader
I figured it out. I got this building with all maven managed dependencies. I updated the pom to look like:
Really we're just dependent on the jbox2d-library and org.json libraries. I pointed to the latest org.jbox2d library and the latest org.json as dependencies, and removed the parent pom declaration. Then running at the command line worked like a charm.
I'm going to try and submit a pull request to update the git repo so the pom is correct if you'll accept it!
Code: Select all
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>b2dJson</artifactId>
<groupId>com.iforce2d</groupId>
<name>b2dJson</name>
<packaging>jar</packaging>
<description>Support for loading R.U.B.E scenes into JBox2D.</description>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>org.jbox2d</groupId>
<artifactId>jbox2d-library</artifactId>
<version>2.2.1.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
</dependencies>
</project>
Code: Select all
mvn clean install
I'm going to try and submit a pull request to update the git repo so the pom is correct if you'll accept it!
Re: Compilation JAVA json loader
Done, thankyou!