Managing DLL dependencies with Maven
Did you try something like this:
<dependency>
<groupId>com.foo</groupId>
<artifactId>footron</artifactId>
<version>4.2</version>
<scope>runtime</scope>
<type>dll</type>
</dependency>
You can add them to maven's repository with something like this:
mvn install:install-file -Dfile=footron.dll -DgroupId=com.foo -DartifactId=footron -Dversion=4.2 -Dpackaging=dll -DgeneratePom=true
Haven't done this for DLLs but something like this should work.
Maven Dll Dependency Problem
This will depend on your assembly descriptor, but it seems like you have a <dependencySet>
under which <unpack>true</unpack>
is specified, that does not exclude the DLL from the set. Try adding this into that dependencySet
element:
<excludes>
<exclude>*:dll*</exclude>
</excludes>
If you intend to incorporate the DLL dependencies without unpacking them, then you might need an additional dependencySet
element that includes them and doesn't specify the unpack
flag. See http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_dependencySet for more information.
how to reference native DLL from Maven repo?
For a DLL, you will need to use the Copy Dependencies MOJO.
You can filter out all dependencies other than the DLL and specify anywhere in your project structure to copy them to, including your target/webapp/WEB-INF/lib.
DLL Files for Maven
The error you're getting means the dll cannot be found in the java.library.path
.
Unfortunately You cannot load DLL from the JAR directly. You can package it within the JAR and unpack it before loading it. Checkout the question Extract and load DLL from JAR.
Related Topics
Apache Httpclient 4.0.3 - How to Set Cookie with Sessionid for Post Request
Java Erasure with Generic Overloading (Not Overriding)
Java: Set Timeout on a Certain Block of Code
How to Stop the Task Scheduled in Java.Util.Timer Class
Differencebetween a Synchronized Method and Synchronized Block in Java
Hashcode and Equals for Hashset
Can Someone Please Explain Me @Mapsid in Hibernate
How to Change the Color of Specific Words in a Jtextpane
Import Com.Sun.Image.Codec.Jpeg.*
How to Include Test Classes into Maven Jar and Execute Them
Java String Array: Is There a Size of Method
Copy Entire Directory Contents to Another Directory
Difference Between an Unbound Wildcard and a Raw Type
Javac Error: Class Names Are Only Accepted If Annotation Processing Is Explicitly Requested
Problems with Local Variable Scope. How to Solve It