Java – how to build a jar for a specific operating system using Maven?

I am using Maven for eclipse to build a jar that can run on a remote server My system is running OS X and the server is running cestos

Tensorflow Java libraries for different platforms can be found here

Attachment: I have tried to add a dependency in POM, and the system scope points to jar

Solution

Try this in your POM:

<dependency>
    <groupId>org.bytedeco.javacpp-presets</groupId>
    <artifactId>tensorflow</artifactId>
    <version>0.9.0-1.2</version>
</dependency>
<dependency>
    <groupId>org.bytedeco.javacpp-presets</groupId>
    <artifactId>tensorflow</artifactId>
    <version>0.9.0-1.2</version>
    <classifier>linux-x86_64</classifier>
</dependency>

Or Linux - x86, if your server is 32 - bit

Of course, it would be nice to use a configuration file to define conditional dependencies

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>