[英]How to run a spring-boot jar with external jars which compile with maven dependency system?
3rd party jars are not in the repo, may be updated from time to time.第 3 方 jars 不在回购中,可能会不时更新。
I use dependency in maven as我在 maven 中使用依赖项作为
<dependency>
<scope>system</scope>
<systemPath>$path/$name.jar</systemPath>
</dependency>
to compile and the jars are not in the bundle which is as I wish.编译和 jars 不在我希望的包中。
When spring-boot jar is deployed on the target machine, how to run it?当spring-boot jar部署到目标机上,如何运行?
For including a jar from a path into your Spring boot classpath see 有关将jar从路径添加到Spring引导类路径的信息,请参见
External library folder for Spring Boot . Spring Boot的外部库文件夹 。
This means that you can safely manage your dependency in your pom by a repo (avoiding sytemPath dependencies). 这意味着您可以通过回购协议安全地管理pom中的依赖性(避免sytemPath依赖性)。
With SpringBoot project using Maven build tool, you can use:使用 Maven 构建工具的 SpringBoot 项目,您可以使用:
mvn install:install-file "-DgroupId=org.apache.poi" "-DartifactId=poi-ooxml" "-Dpackaging=jar" "-Dfile={your_path_to_jar_file}"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.