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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With