Please consider making swIMP maven-compatible. It is a very good way to easily include it in other java projects.
In the meantime, for those reading this, here is what I did to add it to my local maven repository.
1) zipped the sources, i.e., the content of the folder "java" in the source distribution (swimp-0.9.5) with its subfolders, and named it swimp-0.9.5-bin-linux-x86/swimp-sources.jar.
2) typed in a terminal:
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/dist/swimp.jar" -DgroupId=swimp.sourceforge.net -DartifactId=swimp -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/swimp-sources.jar" -DgroupId=swimp.sourceforge.net -DartifactId=swimp -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar -Dclassifier=sources
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/dist/swimp-osicbc.jar" -DgroupId=swimp.sourceforge.net -DartifactId=swimp -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar -Dclassifier="osicbc"
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/swimp-sources.jar" -DgroupId=swimp.sourceforge.net -DartifactId=swimp -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar -Dclassifier="osicbc-sources"
Note that this uses the same source file for each swimp jar. If that causes a problem, manually separating the appropriate source files in different source jar files might be required.
Hello Olivier,
thanks for the suggestion. Perhaps you can comment a little bit on your requirements, since I am not sure whether I understood what you are aiming at:
In fact, I briefly thought about mavenizing swIMP a while ago. However, I came to the conclusion that this does not really help, since swIMP is a mixed native/Java project and the build process cannot rely on Maven only. Hence, I did not see a real benefit in making the Jars easily available as Maven dependencies if you cannot get the binary part as well. Did you aim at making the non-Java dependencies available through Maven as well or would you see significant added value by including only the Java-part of swIMP in a Maven repository?
Thanks for your comments. If there is value in mavenizing swIMP, I think I would invest that time, since ease of use is definitely one of the objectives of swIMP.
Cheers,
Combean
Hm, I think I was not quite up to date with what Maven can do with native stuff. Just had a look into http://www.jfrog.org/sites/jade-plugins/latest/jade-plugin-parent/jade-build-plugin-parent/jade-native-plugin/index.html and http://java.freehep.org/freehep-nar-plugin/intro.html. Seems that there is a chance to mavenize also the native build. Well, was that what you were aiming at? Looks like a small project, but interesting...
TBH I don't have a clear idea on what would be the best path to mavenize swIMP, but I'm sure it is possible to make it (even) easier to include in a java project by providing it in the maven repos. Even if only the java part, that would already help. Then the user could already start coding and looking at what the API looks like in seconds, only having to mess up with the .so files later on - and even that part is very easy supposing you already have some solver libs installed on your computer. If you can make it so that the native parts are included as well, that's great. Being used to Maven, I thought adding swIMP and starting to use it was a bit too long compared to what it could be. But admittedly as it involves native libraries it might be impossible to make it as easy as pure java projects...
You might want to take a look at http://lpsolve-java.googlecode.com/. The project seems abandoned (as far as I can tell), but it provides an apparently reasonably complex example of a mavenized project with native libs. Maybe more complex than what is needed here however, but I don't really know.
That said I won't use swIMP in the near future so my suggestion was not really for me but rather for helping others, or for the future. Thanks for your attention and for your project.
... and while we're at it, I made a mistake in my first post. osicbc shouldn't be added as a different classifier to the same artifactId but should really be a different artifactId, like swimp-osicbc. By convention, classifiers are better to distinguish flavours of the same code module, e.g. different target platforms. (Maven experienced users will now but I don't want to mislead anyone.)
So the last two lines should read:
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/dist/swimp-osicbc.jar" -DgroupId=net.sourceforge.swimp -DartifactId=swimp-osicbc -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar
mvn install:install-file -Dfile="swimp-0.9.5-bin-linux-x86/swimp-sources.jar" -DgroupId=net.sourceforge.swimp -DartifactId=swimp-osicbc -Dversion=0.9.5 -DgeneratePom=true -Dpackaging=jar -Dclassifier="sources"
Just a bump. I am now seriously considering using swIMP for my project (a java library) and a clean mavenized version would be a real plus. I want to make my library easy to install and use, and for this making swIMP easy to install and use is mandatory! Currently dealing with the native libraries and having to set up the ld library path is a bit cumbersome. Also, my project uses maven, thus the dependencies should ideally also exist in maven repository...
Are you still interested in working on this?