开发者

Packaging precompiled binaries for Maven?

开发者 https://www.devze.com 2023-03-26 09:23 出处:网络
My Java library depends on Boost C++. I\'ve generated the following artifact: boost-maven-project:boost-thread:jar:windows-i386-vs10:1.47.0-b1

My Java library depends on Boost C++. I've generated the following artifact:

boost-maven-project:boost-thread:jar:windows-i386-vs10:1.47.0-b1

wher开发者_如何学Goe windows-i386-vs10 denotes: "Windows platform, 32-bit architecture, Visual Studio 2010 linker".

I've attempted to upload this to Maven Central but the Sonatype staff dislikes the fact that the artifact does not contain a main JAR (only attachment JARs, one per platform).

I don't think that "bundle" packaging is any more appropriate than JAR. Nor do I want to depend on the NAR project (which seems to be inactive). Is there a precedence in the Maven world? What is the best way to package precompiled binaries (without a corresponding Java component)?


I am not so familiar with Maven Central and what the guidelines are to upload artifacts, but we have a local Nexus repository and we upload binaries like dlls as a dll package. Why should you use a jar package? I think the Sonatype staff is right. Required header files are attached as a zip file.

Maven has also a C++ plugin, see http://mojo.codehaus.org/maven-native/native-maven-plugin/. Have a look at it. The thoughts of the plugin are really good and should answer a lot of your questions.

By the way I tried to upload myself the Boost libraries into our repository, but I failed. I think the problem was to divide all the Boost headers into different zip files. But I am not sure and I had not the time to find a good solution. If you would make it and the Boost Libraries would be available at Maven Central, I would appreciate this.


I ended up packaging binaries in JAR files without a main-jar.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号