Maven would be able to access this repository when it resolves artifacts too. Although it would probably be best to use a special maven repository manager like nexus http://nexus.sonatype.org/, it's possible to simply use a public accessible webserver directory for this purpose too.
For example in Nifty http://sourceforge.net/projects/nifty-gui/ we use a special repository http://nifty-gui.sourceforge.net/nifty-maven-repo/ to store lwjgl and slick artifacts as well as Nifty itself. The pom.xml contains a <repository> reference to this URL and when building Nifty from source all the required artifacts (that are not available in the central maven repository) are directly downloaded from this additional repo. There is no need to manually install the artifacts with mvn:install:install-file anymore :)
Something similar would be easily possible for JME too or is there anything why this wouldn't be possible with JME?
it's pretty easy to set up. you basically just need a webserver somewhere with some people able to upload the artifacts. the actual upload is done by maven with a command line similar to the ones already in mvn-lib-install.sh. it's just "mvn deploy:deploy-file" instead of "mvn install:install-file" with additional parameters like -DrepositoryUrl=… iirc and that's all
There is not that much of a setup necessary. One just needs a public available web server directory (read access) and scp access to the same directory for deploying maven artifacts to it (write access for some developers).
In the past somebody probably had that working with jme using the url from my post above:
http://www.jmonkeyengine.com/maven/
and maybe that somebody is already working on getting it back to work? I don't know. :)
In general I don't know yet a lot about the current jme + maven integration or plans about it. But judging from my experiences on trying pushing maven for some other projects (lwjgl and slick2d :D) opinions about maven differ quite a lot. 8) And for some folks out there the word "maven" really drives them crazy in an odd sense.
I'm perfectly fine with the way it works in jme2 now and when somebody will fix that URL it would work even better. And if somebody needs help, I can probably help but it's really not that hard to setup :)
PS: If something in this post makes no sense it might be because I have a cold and I'm still a bit dizzy 8)
Part 1: Deploy an artifact to a maven repository that is required for building a project but is not part of the project
To remotely deploy artifacts - the required artifacts to build jme2 with maven for example - you’ll just need to look at the “lib/mvn-lib-install.sh” file and replace “mvn install:install-file” with “mvn deploy:deploy-file” as well as add “-Durl= -DrepositoryId=[id]” where “[url]” and “[repositoryId]” corresponds to the values that someone already definied in the pom.xml of jme2:
This is all there is to deploy an artifact to the http://www.jmonkeyengine.com/maven/ repository. And because this repository is actually already part of the jme2 pom.xml NOBODY ever needs to execute "lib/mvn-lib-install.sh" EVER again. Maven will just automatically discover the libs now and download it from the given url. (when it is available - the directory is currently missing it seems).
Part 2: Deploy a project to a remote repository you have the source with ant
I don't know how to do that :) I know how this works with projects build with maven only. It's simply build and deployed with: "mvn deploy -Durl=<a href=" -DrepositoryId=[id]" similar to the lines above. But I don't know how to use this with ant. Which is probably possible but I've not yet used ant with a maven plugin or something like that.
<p>void" class=“bbcode_url”> -DrepositoryId=[id]" similar to the lines above. But I don’t know how to use this with ant. Which is probably possible but I’ve not yet used ant with a maven plugin or something like that.<br /><br>
<br /><br>
void</a></p>
Okay I can't get it to work. Something about return code 405.
Skye, I am counting on you man :D
Since you put the 'fro man I'm more than willing to help :D The maven folder in our www directory is empty... did you populate that and then delete it?
Ping me over google talk or email today and we'll sort this out..
I'm currently in the process of upgrading nifty to the current lwjgl version 2.4.2. And a part of the process is the deployment of the lwjgl jars in the special nifty maven repository I've set up at sf.net.
Well, and I've learnt something about me today … sometimes I'm a retard :lol:
In the "mvn deploy:deploy-file" command line I've posted above I wrote:
Well, that probably makes no sense at all because the -Durl parameter is used by maven to actual upload the artifact to the repository! And it's unlikely that you can directly upload a file using http :lol:
So the correct way would be to use scp or sftp to transfer the file. In my case (sf.net and nifty) the correct command line is for example: