Reputation: 143
I'm trying to write a program that uses jnetpcap and fits both linux and windows. I compile my program using Maven.
Currently the dependency to jnetpcap is:
<!-- https://mvnrepository.com/artifact/jnetpcap/jnetpcap -->
<dependency>
<groupId>jnetpcap</groupId>
<artifactId>jnetpcap</artifactId>
<version>1.4.r1425-1f</version>
</dependency>
When looking at: http://jnetpcap.com/download It shows different binaries for windows/linux/mac/etc.
How does maven know which binary to download from this dependency when trying to compile to windows/linux/mac.
Is there a repository for jnetpcap 1.3 for maven?
Upvotes: 0
Views: 271
Reputation: 1036
Maven doesn't know which binary to include, so unlike the individual packages from the JnetPcap download page, the Maven JAR file contains binaries for both Windows and Linux in 32 and 64 bit versions. You can check for yourself by decompressing the JAR file - see the native
directory. As long as you deploy the JAR that came from Maven with your application, you will be able to run it on Windows and Linux clients.
There is no repository for version 1.3, so if you want to use that version, you'll have to download the JAR from the download site and then manually install to your local repository to be able to build your project.
Upvotes: 1