[英]How to run tests without passing local relative path in Action class for the IE/Chrome WebDriver and run using only maven dependencies in pom file
[英]How to add local jars folder in class path using POM
我的Java应用程序中几乎有10个本地jar(构建我的应用程序需要这些jar)。 我希望它们使用POM添加到类路径中。 我怎样才能做到这一点?
您可以将依赖项添加为系统范围,并通过其完整路径进行引用。 考虑一下JAR位于/ lib中。 然后在您的pom.xml文件中添加依赖项,如下所示:
<dependency>
<groupId>com.abc.pqr</groupId>
<artifactId>sample-app</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/your_jar.jar</systemPath>
</dependency>
${basedir}
表示包含pom.xml的目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.