Dav*_*vid 18 maven-2 jar classpath
我正在使用maven-compile插件来编译类.现在我想在当前的类路径中添加一个jar文件.该文件保留在另一个位置(假设c:/jars/abc.jar.我更喜欢将此文件保留在此处).我怎样才能做到这一点?
如果我在参数中使用classpath:
<configuration>
<compilerArguments>
<classpath>c:/jars/abc.jar</classpath>
</compilerArguments>
</configuration>
Run Code Online (Sandbox Code Playgroud)
它将无法工作,因为它将覆盖当前的类路径(包括所有依赖项)
请帮我.
这可能是之前被问过的.请参阅我可以将jar添加到maven 2构建类路径而不安装它们吗?
简而言之:将jar包含为系统范围的依赖项.这需要指定jar的绝对路径.
另见http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
| 归档时间: |
|
| 查看次数: |
118000 次 |
| 最近记录: |