使用Maven管理DLL依赖关系 [英] Managing DLL dependencies with Maven

查看:1242
本文介绍了使用Maven管理DLL依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java程序与Maven管理它的依赖关系。其中一个依赖关系是另一个程序的JNI包装器。 Maven负责对相关的JAR文件的引用,但是我自己也不知所踪的DLL文件。



有没有一个很好的方式让Maven处理DLL呢?理想情况下,我想将DLL加载到本地存储库中,如JAR文件。

解决方案

您是否尝试过这样的操作:

 <依赖关系> 
< groupId> com.foo< / groupId>
< artifactId> footron< / artifactId>
< version> 4.2< / version>
< scope>运行时< / scope>
< type> dll< / type>
< / dependency>

您可以将它们添加到maven的存储库中,如下所示:

  mvn install:install-file -Dfile = footron.dll -DgroupId = com.foo -DartifactId = footron -Dversion = 4.2 -Dpackaging = dll -DgeneratePom = true 

没有为DLL执行此操作,但这样会有效。


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.

解决方案

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依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆