Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Netbeans(7.3.1 和 7.4)中打开的 maven 项目有问题。
假设我有一个 maven 项目 A,它基于 A 的 pom.xml 中定义的依赖关系依赖于 maven 项目 B。两个项目都在我的 Netbeans 中打开/加载。当我构建项目 A 时,它会自动在本地引用项目 B,而不是从 nexus 下载依赖项。
如何强制 maven 不使用本地项目作为依赖项?我保持打开项目 B 的唯一原因是参考代码。
要解决此问题,我必须卸载项目 B,有时在构建项目 A 之前将其删除。
mvn clean install -U
-U 表示强制更新依赖项。