Reputation: 7024
I a am trying to use World Wind Java into a Maven project.
First method would be to take their SDK here and all dependencies in build path. But I want to make it more maven compliant.
First dependency: jogl-all.jar. SDK v2.0.0 seems to use v2.1.5 of JOGL (from manifest). Hence I put this in my pom file:
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.1.5</version>
</dependency>
Here is my issue: two jar files are very different in size, and moreover, with JOGL jar from SDK, I can import com.jogamp.opengl.awt.GLCanvas
, while with maven retrieved JAR, I can't.
I don't understand how I can get two different behaviors/JARs while using exact same version.
Any clue? Any other experience using World Wind Java within Maven project?
Upvotes: 5
Views: 2038
Reputation: 611
If you want to use a library in Maven you should add the dependency to your project, there is no need to hunt for all transitive dependencies (unless the docs say otherwise). For the world wind I found the dependency on this site: https://mvnrepository.com/artifact/gov.nasa/worldwind/2.0.0-986
<dependency>
<groupId>gov.nasa</groupId>
<artifactId>worldwind</artifactId>
<version>2.0.0-986</version>
</dependency>
It should work.
One of the advantages of using Maven is that there is no need to know every jar needed to use every library, Maven will manage this. In this case, the World Wind Maven dependency has it's own POM that declares all needed dependencies. Maven will scan all POMs from all dependencies and will download all required JARs when needed.
Upvotes: 2
Reputation: 434
Some digging into the World Wind Java readme files seems to have turned up the issue:
The JOGL library provides World Wind Java with (1) a Java binding to the OpenGL API, and (2) OpenGL contexts compatible with Java's AWT and Swing windowing toolkits: http://jogamp.org/jogl/www/
World Wind Java uses JOGL v2.1.5, released on 11 March 2014 and downloaded from: http://jogamp.org/deployment/v2.1.5/archive/jogamp-all-platforms.7z
The JOGL library compiled JAR files and README files are checked into the World Wind Java source, distributed with all World Wind Java builds and included in the World Wind Java Web Start deployment. This is necessary in order ensure correct operation of World Wind Java, as changes in JOGL are occasionally unstable or incompatible with previous versions. Additionally, World Wind Java's copy of the JOGL JAR files are modified to enable Web Start deployment outside of the jogamp.org domain.
Whoever put World Wind Java in the central repository should therefore have packaged and deployed the very specific JOGL/Gluegen Jars necessary to make it work. In the mean time I'm going to extract and deploy these version to my own private repository.
Upvotes: 4
Reputation: 4076
Please rather use 2.1.5-01 instead of 2.1.5 because the latter had a big problem, something went wrong during its deployment:
http://jogamp.org/deployment/maven/org/jogamp/jogl/jogl-all/2.1.5-01/
Upvotes: 0
Reputation: 14762
There is no technical restriction having two files with the same name on different locations with different content. Though I'd not recommend this - especially with library artifacts. This confuses people, like you, and drives them crazy sooner or later.
Why WorldWind Java team did that? Ask Responsible NASA Official: Patrick Hogan.
Upvotes: 1