[英]Should maven compile time dependency be necessarily packaged for access during runtime?
Should maven compile time dependency be necessarily packaged for access during runtime? maven 编译时依赖项是否必须打包以便在运行时访问?
Let's assume that there is a maven pom file for a library A. On that, maven dependency tree command is run.假设库 A 有一个 maven pom 文件。在此之上,运行 maven 依赖树命令。
And in the output, we see the following line:在 output 中,我们看到以下行:
[INFO] +- commons-pool:commons-pool:jar:1.3:compile
This means that, commons-pool.jar should be available during compilation.这意味着,commons-pool.jar 在编译期间应该可用。 Does this imply that, necessarily, commons-pool.jar should be packaged alongside library A, inorder for access during runtime?
这是否意味着,commons-pool.jar 必须与库 A 一起打包,以便在运行时访问?
So the answer is yes, as Alanpatchi said.所以答案是肯定的,正如 Alanpatchi 所说。
In Maven compile dependencies are also runtime dependencies.在 Maven 中,编译依赖也是运行时依赖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.