简体   繁体   English

Maven 3-使用本地仓库处理本地产生的工件

[英]Maven 3 - Use local repo for locally produced artifacts

Let's say I have an EAR that uses a 3rd party JAR from an online Maven repo, and a local JAR I produce myself, that needs to be pulled from my local repo. 假设我有一个EAR,它使用来自在线Maven存储库的第三方JAR,以及我自己生产的本地JAR,需要从本地存储库中提取。

If I build the EAR, it complains that it can't find the local JAR in the repo, because it's looking online. 如果我构建EAR,它会抱怨说它正在在线,因此它在存储库中找不到本地JAR。 However, that is the correct behaviour for the 3rd party JAR. 但是,这是第三方JAR的正确行为。

How do I get Maven to look locally for artifacts, AND online? 如何使Maven在本地查找工件并在线? I guess it would be best to look locally as a last resort. 我想最好是在本地将其作为最后的选择。 Is there a way to do this? 有没有办法做到这一点?

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

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