简体   繁体   English

Maven Classpath命令行参数

[英]Maven Classpath Command Line Arguments

I am currently using Intellij IDE and Maven. 我目前正在使用Intellij IDE和Maven。 I am having a bit of trouble adding a dependency to the classpath when using mvn exec. 使用mvn exec时,将麻烦添加到类路径时遇到了麻烦。

I would like to add two JAR files to the classpath that currently have the "provided" scope in my pom.xml. 我想将两个JAR文件添加到当前在pom.xml中具有“提供”范围的类路径。

I have tried using classpath scope but that introduces an additional problem whereby another dependency is not being included as expected. 我尝试使用类路径作用域,但这引入了另一个问题,即未按预期包含另一个依赖项。

Is there any way to do this using the mvn exec command line arguments? 有什么方法可以使用mvn exec命令行参数来做到这一点?

您可以使用AdditionalClasspathElements参数来包含JAR文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM