maven


How can I use the Jinput library in my maven project when it needs the binaries?


I want to use Jinput in my Maven project. So what I've done is to add the dependency to the projects POM. But when I try to run the application, I get an error since it cannot find the binaries it needs to use the library.
How should I solve this? Should I browse the web for the binaries and download them manually, and put the in java.library.path? Or is there some way to tell maven where the binaries are located?
Here's my POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>ProjectA</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies><!-- https://mvnrepository.com/artifact/net.java.jinput/jinput -->
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput</artifactId>
<version>2.0.7</version>
</dependency>
</dependencies>
</project>
Edit: I should add that I'm trying to run the project from the NetBeans IDE, using the "run project" action
Edit2: When building the project, I get a subfolder in the project root named "target". This folder contains the following files/folders
classes/
generated-sources/
maven-archiver/
maven-status/
test-classes/
ProjectA-1.0-SNAPSHOT.jar
UPDATE
I just realized the jinput library has "platform" artifacts aswell (https://mvnrepository.com/artifact/net.java.jinput/jinput/2.0.7). Do I need to add these as dependencies, too?
Use copy goal of maven-dependency-plugin to copy the libraries in any folder, e.g lib/.
Then, make sure to put these libraries in java classpath while running the application.
For example, if you have a jar file of your application, you can add lib folder in classpath as ,
java -jar myapp.jar -cp "lib/*"

Related Links

Selenium tests failing in Unix
Maven - How to build a dependency project
How to make maven consider JavaFX as a part of JRE
Maven plugin prefix resolution doesn't seem to work as expected
Javascript and CSS files combining in Maven build WITHOUT compression, minification etc
Run TestNG single test from one Group
TinyRadius maven repository
Dependency downloaded from Maven Central is free from Malware?
How to use the same target platform multiple sub-projects in Tycho
Maven Grails web.xml
Can I make a Maven profile add webResources to a war and still add non-profiled webResources?
HTTP Status 409 - The target deployment path […] does not match the POM's expected path prefix
Maven command to go back to previous day snapshot
Maven site on multi module project could not resolve dependency
Glassfish Maven Deploy Plugin - Deployment Failure
zmq failed when running unit test in Intellij IDEA with Maven

Categories

HOME
pandas
wso2-am
date
coq
pypi
dictionary
relative-path
view
electron
getelementsbytagname
acquia
django-imagekit
directx
pheatmap
amazon-cloudformation
communication
leiningen
plunker
extjs5
microsoft-sync-framework
poltergeist
xacml
compatibility
sql-server-2012-express
stormpath
galsim
oracle-fusion-middleware
phpfreechat
gammu
mapbox-gl
html5-fullscreen
jmonkeyengine
adobe-premiere
hot-module-replacement
starteam
c11
angularjs-factory
password-encryption
outlook-api
http-redirect
fault
dandelion
return-value
rdfs
worker-thread
flutterwave
thrust
impresspages
storekit
contact-list
holder.js
flash-cs5
nsviewcontroller
lua-5.1
bluemix-app-scan
pagerank
system.management
phpcas
jms2
fouc
tableau-online
ios9.1
sankey-diagram
sortedlist
directoryservices
android-nested-fragment
java.util.concurrent
xcode-6.2
article
monomac
gnu-smalltalk
oam
listings
ruby-datamapper
padarn
nsnetservice
venn-diagram
cascalog
punbb
bigcouch
window-management
doh
deobfuscation
subgurim-maps
xtype
locationlistener
servicehost
pyinotify
oncheckedchanged
lpeg
google-friend-connect
asp.net-mvc-areas
dentrix
gin
forums
mirah
castle-monorail
webkit.net
iweb
exchange-server-2003
.net-1.0

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App