简体   繁体   English

将项目 JAR 添加到部署程序集,但不在 Eclipse 中构建路径

[英]Add project JAR to deployment assembly but not build path in Eclipse

Eclipse automatically adds everything in WEB-INF/lib (specified in deployment assembly) to the project's build path. Eclipse 自动将 WEB-INF/lib 中的所有内容(在部署程序集中指定)添加到项目的构建路径中。 Is there a way to override this behavior?有没有办法覆盖这种行为? I need for another project jar to be deployed and available at run time but not have a forced compile-time dependency on it.我需要部署另一个项目 jar 并在运行时可用,但没有强制编译时依赖它。 Thanks!谢谢!

Go to the properties window of the project.转到项目的属性窗口。 Then go to java build path tab and remove the relevant other project from libraries there.然后转到 java build path 选项卡并从那里的库中删除相关的其他项目。 Then go to projects in the same tab and select the required project by using the add option and add it.然后转到同一选项卡中的项目并使用添加选项选择所需的项目并添加它。 Then restart Eclipse.然后重新启动 Eclipse。

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

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