This one is not really a contribution to JME3 itself, but handy enough to mention.
I just finished setting up an ant task which downloads and extracts the latest nightly build. This makes it very easy to stay up to date, because it is now as simple as pressing a single button.:
[xml]
<tstamp>
<format property=“NIGHTLY_JME3” pattern=“yyyy-MM-dd”/>
</tstamp>
<property name=“lib.jme3” value=“lib/jme3” />
<property name=“zip.name” value=“jME3_${NIGHTLY_JME3}.zip”/>
<property name=“zip.local.name” value=“jME3_nightly_build.zip”/>
<property name=“zip.url” value=“http://jmonkeyengine.com/nightly/”/>
<target name=“download_nightly_build”>
<delete dir="${lib.jme3}" />
<mkdir dir="${lib.jme3}" />
<get src="${zip.url}${zip.name}" dest="./${zip.local.name}" usetimestamp=“true” />
<unzip src="./${zip.local.name}" dest="${lib.jme3}" overwrite=“true”/>
<delete dir="${lib.jme3}/source"></delete>
</target>
[/xml]
The ant script starts by setting up a custom timestamp which corresponds with the timestamp part of the nightly build. It then sets up all the properties needed. The custom timestamp is used to create the zip.name which now is exactly like the latest nightly build filename.
Now that everything is setup, we can start the actual target. First the old, extracted files are deleted. This is to make sure we don’t keep any files that are no longer in the nightly build. Then we download the new nightly biuld, but only if it has a timestamp newer then our local nightly build zip file. This is so it becomes possible to run this more then once per day without having to wait 5 minutes for the download. Finally we unzip and remove the unnecessary source folder. If you want to keep the source folder, just remove the last line in the target block.
I hope you guys find this as useful as I do, took more a few hours to get right.
Mark
I’d suggest setting up a jme3 checkout like described here and then just adding a call to svn update and the other build script instead.
Ah yes, I know what you mean.
But this one I can use when building my own distro. Seeing how I just can’t get the jme build script to play nice in eclipse.
just do ‘ant jar’? what is eclipses problem?
dunno, some times it works, some times it doesn’t. And this way I don’t really need the whole jme3 svn checkout. which is a lot simpler.