Maven Integration next round :)

Hi folks,



for all maven users check this out


1 Like

Little improvement … now jme3-thirdparty contains no more binary copies (jbullet, stack-alloc, noise, etc.).

With a maven plugin I can download the required jme thirdparty libs from there “real” location, i.e. jmonkey svn url.



Now the jme3-thirdparty module does these things for you:

  • download and install jme version of jbullet/stack-alloc
  • download and install jme noise lib
  • download and install j-ogg-oggd
  • download and install j-ogg-vorbisd
  • download native lwjgl libraries, create and install jme-lwjgl-natives.jar
  • provide dependency management



    With jme3-buildhelper/pom.xml you can use jme3 like any other maven project.



    Please try it :smiley:

I like that. It seems up-to-date (I’ve seen some changes dated 2013?) and is, of course, pure awesomium for maven users.

I, however, didn’t manage to use it. The third party works OK, but the maven helper gave me the following error: Non-resolvable import POM: Failure to find com.jme3:jme3-thirdparty:pom:3.0.0-SNAPSHOT in http://nifty-gui.sourceforge.net/nifty-maven-repo
How do those two project interact? Could you please, pretty please, provide a simple tutorial on how to use those projects?

I dont get this why all this fuss about the integration?

Build it locally, write a simple pom.xml with revision from svn as version
upload to your local nexus and be happy, it’s faster, you controll the version, and everyone on your projects uses the same.

I think most people are reluctant to install yet another piece of software. Server software, of all things.
Plus, you need to learn two new skill sets: Producer of Maven artifacts, and Maven repository administrator.
None of that is really hard, but it’s a list of details to take care of. For somebody with a pure consumer-of-Maven-artifacts experience, I’d reckon that setting up Nexus (or Artifactory or any other Maven repository manager) and uploading a binary-only jar could be anything between 2 and 4 hours.

Well i would say without knowing how ot do that, you probably should not use maven at all, as you are prone to skrew up the design of the projects.
Sometime knowing more is a good idea before attempting stuff, just saying

As a matter of fact, I do this as a learning exercise - I know Jme3, I want to learn more about maven and its ecosystem; it seemed like a perfect exercise.
I am not that much reluctant about installing nexus, even if, yeah, I reckon it’ll take about half a day to make it.

But what I’d like is to understand (Maven means “the one who has learned and now knows”, right? :D) the concept.

The third-party is built and installed in the local maven repos, I get it, but why is it not sufficient to build an app with it?
And secondly, the author states “copy pom.xml into jmonkey-engine”; I don’t get it. Into a maven project? Which one?

Any help appreciated - from anyone.

You devise a group/artifact/version for the jar you wish to use, and “upload” it into your local repo under these coordinates.
You’ll also need an associated pom.xml to make the jar digestible for Maven; most repository managers will autogenerate that pom for you if you use their specialized “upload a jar” service.

You don’t copy any pom. You reference the new jar artifact as a normal dependency from your program’s pom.xml.

One catch to look out for: there are different interpretations for “local maven repo”. Most Maven people use this as the name for the .m2 directory, which is NOT a real repository. The other interpretation would be a locally installed Maven repository manager (MRM).

If this is a learning experience, once you have your Maven setup running, you could try Gradle.

Thanks for your explanations, it really helped.
That worked, anyway until a point; seems like Index of /nifty-maven-repo has changed its structure meanwhile.
I think I’ll go without maven for my project, I think it’s more pain than pleasure if everyone doesn’t use it (And that too is a learning experience!).

Hmm… strange, I could import Nifty via Maven without a problem.
I can’t deliver anymore, unfortunately; I replaced both Nifty and Maven since.

@carpentier.ch said: Thanks for your explanations, it really helped. That worked, anyway until a point; seems like http://nifty-gui.sourceforge.net/nifty-maven-repo/ has changed its structure meanwhile. I think I'll go without maven for my project, I think it's more pain than pleasure if everyone doesn't use it (And that too is a learning experience!).

Since maven cannot really support incremenatl builds i totaly agree, the longer oyu are working ona project and the larger it gets, the longer you must wait for it.
I suggest to look at gradle if you want a build tool, its not exactly straigtforword at the beginnen as well, but seems to be way more friendly.

(Or just use the netbeans/eclipse internal builder, for normal projects they are quite good enough (mvn and gralde or ant really starts to make sense once you have a continuuos integration server, but before the gain is somewhat limited))

Thanks, I’ll look into it!