<repository>
<id>ajkaandrej-oss</id>
<name>Ajka-Andrej server open source repository</name>
<url>http://www.ajka-andrej.com/maven-oss/repository</url>
<layout>default</layout>
</repository>
Superb thing to have, andriu. I'll have to have a look at this, i'm big fan of Maven. Now if it could be possible to build the assets jme3 supports with a Maven task…that would be a perfect choice.
jme3 guys it would be nice to make the steps Andriu did in the repository of jME3, or even add pom.xml's to the SVN. Do you plan to do that?
I was confused a little bit because there are libraries without the version number or trunk version.
Okay, so should the version number be appended to the library jars then? (e.g jogl-1.1.1.jar, etc)?
Fix source: move the
/jme3_core/src/main/java/com/jme3/app/Application.java
class to the directory
/jme3_desktop/src/main/java/com/jme3/app/
This isn't necessary. You can just combine the core and desktop modules into one module so it compiles. You will need a completely different project for android anyway.
Okay, so should the version number be appended to the library jars then? (e.g jogl-1.1.1.jar, etc)?
I think this is not necessary for the Ant build. But for maven build you need to know the version of the library. There are some libraries in JME3 SVn, where I can't find the version number of the library. For example jBullet (I think it's trunk version).
It could be helpful:
- when there is a list of libraries with the version
- or like you wrote <lib>-<version>.jar
I've already installed all libraries with source and javadoc in my repository.
It would be nice to have www.jmonkeyengine.com/maven repository.
There are two maven poms being made right now (see here), I think we need something final. Also, it should support all packages including jogg, joal, lwjgl-oal, etc. Then we can include it.
The two poms seem to accommodate one another. If they were merged I think we'd cover all our bases. If someone could please submit a merged version we'd have a wiki page for jME3 maven up in no time
Just for clarity there's two pom.xml files that would be useful:
A pom.xml inside JME3's structure to build the JME3 jar using maven
An example (template) pom.xml that game developers can copy to get started
The first is useful but not critical (it would just make it easier for JME3 contributors to build). You can get away with using ant files and just manually upload the resulting jars to a Maven repository if that is your preference.
The second is critical in order to support game developers who want to use Maven (like me). In order to make this we just need to get the JME3 jar and all it's dependent jars into a repository with the correct versions. The native files add a bit of a challenge, and we would probably want to bundle these differently to work with Maven but this is a solvable problem.
I have just been through the process of setting up my maven environment (taking yet another approach to the ones the guys have outlined above). I've documented my clunky steps here:
EDIT: I've fixed the way I was doing native files. I had thought that the extraction mechanism from the jar wasn't working with Maven, but it was. The result is much cleaner:
I don't think my solution is any better than the ones suggested but it also works.
To avoid people coming up with seperate (hacky) solutions to the Maven issue it would be great if we could get an 'official' maven repo that we could use with confidence, or even better get the JME3 jars into the Central Maven repo: http://maven.apache.org/guides/mini/guide-central-repository-upload.html
If the official JME3 release process could include deploying jars into the official repo then life would be pretty good and newbies starting out in JME3 could rapidly get into it.
I'd be happy to help setup a solution that works, however I would need some help from someone in the team. First thing we need to do is identify which versions of the 3rd party libraries JME3 is using (i.e. the versions of the jars in the lib directory) so we can work out if these are already in a Maven repository.
Ok so below is a list of all the Jars in the jMonkey3 'lib' directory. We need a version and a groupId (typically the producers website URL) for each of these. I've had a stab at these but I really need someone who's worked on it to provide the details:
JAR
ARTIFACT_ID
GROUP_ID
VERSION
gluegen-rt.jar
gluegen-rt?
com.sun.gluegen?
20100511?
j-ogg-oggd.jar
j-ogg-oggd?
de.jarnbjo?
?
j-ogg-vorbisd.jar
j-ogg-vorbisd?
de.jarnbjo?
?
jbullet.jar
jbullet
com.bulletphysics
20090628?
jheora-debug-0.6.0.jar
jheora-debug?
com.fluendo
?
jinput.jar
jinput
net.java.games
20100503?
joal.jar
joal
net.java.games
1.1.2?
jogl.jar
jogl
com.sun.opengl
b120-2010-05-16_19-21-22?
lwjgl.jar
lwgl
org.lwgl
2.4.2
nifty-1.2-SNAPSHOT-2.jar
nifty
de.lessvoid
1.2-SNAPSHOT
nifty-default-controls-1.1.jar
nifty-default-controls
de.lessvoid
1.1
nifty-style-black-1.1-sources.jar
nifty-style-black
de.lessvoid
1.1
stack-alloc.jar
stack-alloc
cz.advel
20080716
swing-layout-1.0.4.jar
swing-layout
org.swinglabs
1.0.4
vecmath.jar
vecmath
java3d
1.3.1
xmlpull-xpp3-1.1.4c.jar
xmlpull-xpp3
org.xmlpull
1.1.4c
Are either 'jme3testdata.jar' or 'nifty-examples-1.1.jar' needed to work with jMonkey? Looks like demo stuff, in which case we won't need it in our builds.
Once we get the above sorted we can sort out the Native libraries.
Ok, Maven plays best with 'released' libraries. Using modified code, etc is more problematic but we can find work-arounds. I guess that's the result of using cutting edge technologies.
In better news (for me anyway), I discovered that your technique of copying native files from the jar actually works fine through Maven (I had problems with it and just assumed it wouldn't work). So this has really simplified the Maven setup and I've updated my notes to match:
I'd still like to resolve the version issues and get this into a repo but this may take a while. I'm looking into repo options.
In the meantime I'd be keen to setup an example of a Maven project that builds a webstart deployment bundle for a simple jMonkey3 project.
Are there any (non-maven) examples of jme3 + webstart out there yet (i.e. jnlp files)?
If not, how do you see the native jar files working through webstart, should I be manually extracting and re-jarring them for different operating systems?