Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing DLL dependencies with Maven

I have a Java program with Maven managing its dependencies. One of those dependency is a JNI wrapper for another program. Maven takes care of the reference to the relevant JAR file, but I'm left messing around with the DLL file myself.

Is there a good way of having Maven handle the DLL as well? Ideally I would like to have the DLL loaded into our local repository like the JAR file.

like image 986
Kris Avatar asked Jun 16 '09 14:06

Kris


People also ask

Does Maven support transitive dependencies?

Maven avoids the need to discover and specify the libraries that your own dependencies require by including transitive dependencies automatically. This feature is facilitated by reading the project files of your dependencies from the remote repositories specified.

Can Maven be used for .NET projects?

NPanday is an Apache Incubator project "to integrate Apache Maven into . NET development environments." Maven is more of a build-automation and dependency-management tool, and also developed more specifically for Java-based development, but developers have figured out how to Maven build for . NET applications.


1 Answers

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.

like image 71
sal Avatar answered Sep 25 '22 11:09

sal