[英]What are the jars provided by an application server?
I am switching my build chain from the one provided by Eclipse to Gradle. 我正在将构建链从Eclipse提供的链切换到Gradle。 When I develop a web application in Eclipse, I used to add a particular server runtime, so to have the jars provided by the application server already in the classpath. 当我在Eclipse中开发Web应用程序时,我曾经添加一个特定的服务器运行时,以使应用程序服务器提供的jar已存在于类路径中。
Now that I am swtiching to Gradle, how do I know what are the jars provided from the application server and which must consequently indicated as providedCompile instead of compile ? 现在,我要swtiching摇篮,我怎么知道什么是从应用服务器提供的罐子以及必须因此表示为providedCompile而不是编译 ?
This might help you. 这可能对您有帮助。 in essence, you'll need the 'war' gradle plugin: https://gesellix.net/providedcompile-and-compile-dependencies-with-gradle/ 本质上,您将需要“战争” gradle插件: https ://gesellix.net/providedcompile-and-compile-dependencies-with-gradle/
It would depend on your app server: they all come with different JARs (obviously stuff like Servlet etc being provided by all) 这将取决于您的应用服务器:它们都带有不同的JAR(显然,所有人都提供Servlet等之类的东西)
You could remove the Server Runtime from your Eclipse classpath and see what breaks? 您可以从Eclipse类路径中删除服务器运行时,看看有什么坏处?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.