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

Can not find the tag library descriptor for "http://www.day.com/taglibs/cq/personalization/1.0
Access a file other than jar in local maven repository
Annotation processor is not being invoked by the maven compiler plugin
Setting JMeter properties from Maven plugin
Maven, exclude dependency with condition
when call projects poms using maven-invoker-plugin it throws OutOfMemoryException
How do I remove comments from CSS files when using with minify-maven-plugin?
Maven Central versions with a red background
Publishing a private artifact to AWS S3 private repository
Set a global custom build directory in Maven
maven 3.3.9: default folder structure not created when setting up maven project with eclipse neon/luna
Maven Properties List
Maven build in Jenkins writes the output of execution to a file
Not able to run Maven project in Eclipse
How to include maven executable to uber jar to run maven commands in AWS Lambda
How can I use the maven rpm plugin to deploy a patch?

Categories

HOME
testing
jdo
wso2
isabelle
fluentd
alfresco
getelementsbytagname
amazon-ecs
django-imagekit
autotools
basic
gorm
metatrader4
offline
floating-action-button
jsdoc
connection-string
code-review
nhibernate-envers
textfield
lldb
emgucv
tdd
assistant
google-cloud-nl
newline
delicious-api
http-get
html5-fullscreen
suricata
hot-module-replacement
android-browser
hilbert-curve
webdriver-manager
ensembles
sfdc
midl
slick-3.0
wptoolkit
avconv
taffy
outlook-2013
theming
sybase-asa
namecoin
bind9
redundancy
medium.com
visual-c++-2008
angular-cache
mongocsharpdriver
fputcsv
bgp
bluegiga
phpcas
iad
prerequisites
endeca-workbench
python-3.2
simple-framework
wordml
cakephp-3.1
method-parameters
cisco-ios
clipperlib
apache-commons-net
geonetwork
ng-animate
pick
google-style-guide
angularjs-ng-click
wordpress-theme-customize
onactivityresult
cloud-connect
c18
xsockets.net
blending
interface-orientation
tinn-r
hamiltonian-cycle
reddot
stage
xdomainrequest
appender
routedevent
nhibernate.search
asp.net-profiles
rescale
perfect-hash
eqatec
premature-optimization

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