Maven hosting

There are a few posts about maven on the forums (this one probably the most useful one maven-jme).

With maven providing a lot of things people need for bigger projects wouldn’t it be a good idea to provide maven-repos?

Sonatype provides free maven repos (which also push things to the main maven-repos) for open source projects.

If you would like to use them I would volunteer to get the account and prepare everything.

It might also be a good idea to add the poms from the link above to svn to allow a very quick start with jmonkey.

And if you are getting really wild you could even at automatic deployment to your nightly builds :wink:





P.S.: Haven’t been here in quite a while as I switched companies. I just returned for some tinkering and was completely blown away by the progress you guys made :slight_smile:

pflanzenmoerder said:
Uh, and any help is appreciated ;)
If you need access to the git ask erlend_sh or post the problems here.

So even though you're a "collaborator" you can't give others access? Well anyways, yeh just ask :)

There were some other posts about this, nobody in the team uses Maven so we wont supply a POM thats becoming outdated every other week, sorry. And yes, I know its all easy and stuff but somebody has to do it :stuck_out_tongue:

Actually that POM file looks fairly complete, just putting it into the jME3 root might do it. We still need to make it go on the server and I dunno how to do that.

I am currently working on a Maven-archetype for jme. With the set of poms and a public repo we should get things going.

There is also a couple of tutorials available to get artifacts generated by ant published to a nexus (didn’t take a look at the current ant-files jme is using so I have no idea how complicated that would be).

If the jme-devs don’t want that stuff to part of their svn/build we could also just create a project at git-hub and convert the python-skript provided in the link above to a maven pom (shouldn’t be a big problem with a few plugins).

I am trying to get my archetype done by next week and I will try to get free maven hosting for the jme-artifacts if people in here are ok with it.

Hi folks,



the usage of maven would have some benefits :smiley: The pom I posted this week is only a “hack” … at the moment all needed jar’s are part of the rvs. For most of them it’s impossible to find the current version (i.e. android.jar ?!). The maven way can only work if all needed dependencies are available from repositories.



What can I do for you is that: I can create simple maven-wrapper-projects for each lib/**.

The project hierarchie could then look like this:



jme-parent/
+--- jme-thirdparty/
+
jme-thirdparty-android/
+
...
+--- jme3/


jme3 depends on the thirdparty-artifacts .. at the end we can go into jme3 and run mvn clean install and that's it :D

Then step by step we can remove the jme-thirdparty-artifacts (if these projects become available in the maven universe).

This could be done parallel to the current ant solution.

And then later all ant based tasks could be transformed to the maven style ... + a lot of more (i.e. a project site with nice reports *g*)

What do you think?

Regards
Andreas

No, actually this “hack” is good. Because if we have to also maintain a bunch of lib jars it won’t be good.

There are two options to use Maven with JME

  • build JME yourself with Maven so that it can be installed / deployed
  • download the nightly builds (or releases or whatever) and use Maven’s stuff to install / deploy them without recompiling



    The first involves a lot of work



    The second requires a few tricks but “works smarter not harder” for anyone who wants to use JME3 (90% of users) rather than change it





    Are the JME3 nightly snapshots built & uploaded automatically at some time of day? I’ve got a script that’s updating my repository but I can’t find any pattern to schedule it by





    PS:

    @ahoehma / Momoko_Fan - that hack uses “system” scope for some of the dependency jars. That breaks a bunch of Maven features under common circumstances

I know … scope “system” is EVIL :slight_smile:

I think this (new) maven way is not a critical task … it could be done with low priority … next weekend I will try to create a little maven distro :smiley:

I agree that pulling the pre-built binaries from the jme3-servers and generate the maven-repo from them would be the best way.



Would the JME-Team consider to add maven-style-version information to all the jar-names they generate?



That would instantly kill all problems we would have in maven and might be a good thing for jme-users to easily track what version they got (and for the real ant-fans: it would also make things easier to work with ivy).

I would also suggest to run the jme-unit-tests in the maven-test-phase to see if something has changed (new dependencies …) to prevent broken builds to reach the repo.

UPDATE This is out of date following JME3’s Nifty 1.3 / jheora / JOGL / ISO DATE changes which happened at the beginning of March 2011. I’ll post the updated material before March 14th



I have a repository



[xml]

<repository>



<id>dropBox</id>



<name>Repository added from install.py</name>



<url>http://dl.dropbox.com/u/15094498/dropbox-mvn-public</url>



<layout>default</layout>



</repository>

[/xml]

It is scraped from GoogleCode by a script. I’ve been trying to get it to run as a cron but am now fed up with silently failing under Ubuntu. I usually update it ever few days, if anyone wants the script to whack at it I can post it later when I’ve removed all the swearing

UPDATE This is out of date following JME3’s Nifty 1.3 / jheora / JOGL / ISO DATE changes which happened at the beginning of March 2011. I’ll post the updated material before March 14th



Whoops … I made an archetype

mvn archetype:create -DgroupId=your.proj.gid -DartifactId=your-proj-aid -DarchetypeGroupId=org.jmonkeyengine.archetypes -DarchetypeArtifactId=beginner02 -DarchetypeVersion=3.0-NIGHTLY -DremoteRepositories=http://dl.dropbox.com/u/15094498/dropbox-mvn-public



... or you can create and launch it with this ...
mvn archetype:create -DgroupId=your.proj.gid -DartifactId=your-proj-aid -DarchetypeGroupId=org.jmonkeyengine.archetypes -DarchetypeArtifactId=beginner02 -DarchetypeVersion=3.0-NIGHTLY -DremoteRepositories=http://dl.dropbox.com/u/15094498/dropbox-mvn-public && cd your-proj-aid && mvn package && mvn exec:java -Dexec.mainClass=your.proj.gid.HelloNode && cd ..


‎(yes, I know archetype:create is depreciated ... but archetype:generate doesn't support remote repositories)

I just applied for a free maven repo at sonatype.

Should take around 2 days to be made available.

With all the things we are doing (build-scripts, pom, archetype, …) we should also look for some version control space.

What are your preferences?

I would suggest Google-code (svn) or git-hub.

Cool … I would prefer github … why? it’s a good reason to play with git :smiley:

ahoehma said:
Cool ... I would prefer github ... why? it's a good reason to play with git :D

Not speaking for the team as a whole here, but that's exactly what I was gonna say too, he he. This is a good excuse for jME to have a presence on GIT. It'd be healthy exposure, at least if the branch is kept properly up to date.

…but please give us the killswitch for this because people will come to us with their problems when its not maintained anymore…

normen said:
..but please give us the killswitch for this because people will come to us with their problems when its not maintained anymore..

But I thought the script will maintain it?

There will be changes that the script cannot account for, trust me :wink:

Here we go:

I got the repo, the group id is com.jme3 .

I added a new repo to my git-account:

git@github.com:pflanzenmoerder/jme3-maven.git



If there are objections to the git being in my account one of the jme-core-members could open a git-account for this, it’s easy enough to move the contents of a git-repo to another repo.



I added an empty README and the BSD-License. I was unable to find the license file in the jmonkey-repo (I didn’t look that hard :)) so I set the owner to JMonkey in the License. If someone could provide me with the name of a real person for this or whatever the jme-coreteam uses feel free to contact me.



People needing access to either the git or nexus should contact me via pm.

It would be great to also have at least one person from the core-team being part of these users, even if they don’t commit things as they would then have the kill switch (sorry, this term causes shivers to me since Egypt :wink: )in hand.



Next step:

How and where are we going to run the skripts for updating the maven-repos?

Add the code we have so far to the git.

A question to the jme-core-members:

Would it be possible to run our skript for pushing the jme-artifacts to the repo on the machine that is doing your builds?

Doing this you would give you direct control over the maven-process if we all ran away.