techblue / jmagick

GNU Lesser General Public License v2.1
187 stars 83 forks source link

Using either maven or gradle as a build system. #70

Open Waterpicker opened 1 year ago

Waterpicker commented 1 year ago

I understand that ImageMagick itself isn't a java program and this is just a fancy JNI wrapper but the lack of usage of one of build systems for java is driving me nuts looking at.

luca-vercelli commented 2 months ago

Please notice in Debian a Maven package was created for jmagick, its pom.xml is here

https://salsa.debian.org/java-team/jmagick/-/blob/master/debian/pom.xml?ref_type=heads

Of course Maven can only compile Java sources, not C native sources

nordfalk commented 2 months ago

If anyone wants to make a pull request where the build system is changed to maven or gradle, I'd hapilly review and merge it.

luca-vercelli commented 2 months ago

I tryed working on this subject. In branch luca-vercelli:topic-maven-build you can find a project that builds with "mvn package" with JDK 7+.

However the native library must be built with traditional make. Do you think is this useful? The makefile currently builds both C and Java classes.

nordfalk commented 2 months ago

What does @Waterpicker , @haowei93, @RickHeadle, and @rwperrott think. Is this useful ?

RickHeadle commented 2 months ago

What does @Waterpicker , @haowei93, @RickHeadle, and @rwperrott think. Is this useful ?

Well, Maven really is a useful tool. I personally use it in my every Java project. Makes my work a whole lot easier when it comes to dependencies and running project under different profiles and settings. Can't say much about the use case when the project has to build both C and Java classes though. Would suggest to run a few tests before merging, just in case. That's pretty much it. Good luck ;)