有没有办法将 Netbeans 项目的 JAR 依赖项自动提供给另一个(依赖的)项目?
假设 Netbeans 中的以下项目设置
项目 A 根据 项目B 根据 lib/projectBLib.jar
在我当前的设置中,我必须告诉项目 A 它依赖于 projectBLib.jar,否则它不会加载。 我希望 Netbeans 能够为我处理依赖链(就像其他 IDE 一样)。那么我是否做错了什么,或者我真的必须为每个项目手动配置它?
感谢您的任何建议, 彼得:)
Assume the following project setup in Netbeans
Project A
depending on
Project B
depending on
lib/projectBLib.jar
In my current setup, I have to tell Project A that it depends on projectBLib.jar, otherwise it is not loaded.
I would have expected Netbeans to handle dependency chains for me (as other IDEs do). So am I doing something wrong, or do I really have to configure this manually for each project?
Thanks for any suggestions,
Peter :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还可以使用 Maven 和 Maven NB 插件来实现此目的。 (如果插件没有 bug),当你在 Maven pom.xml 文件中指定 A 依赖于 B 时,它会自动为你完成剩下的工作。
You can also use Maven and the Maven NB plug-in for this. (If the plug-in is not buggy), when you specify in your Maven pom.xml file that A depends on B, it will do the rest automatically for you.
你没有做错任何事。您必须显式添加该库。
有一个增强请求听起来与您提出的问题非常相似:http:// netbeans.org/bugzilla/show_bug.cgi?id=47507。
You are not doing anything wrong. You must add the lib explicitly.
There is an enhancement request that sounds very similar to the question you have raised: http://netbeans.org/bugzilla/show_bug.cgi?id=47507.