Maven是否构建“线程安全"的线程?对于快照项目? [英] Does Maven build "thread safe" for snapshot projects?

查看:106
本文介绍了Maven是否构建“线程安全"的线程?对于快照项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对并行Maven构建有疑问.如果几个Maven构建同时在同一台机器上运行,并且某些构建结果被具有快照版本依赖性的其他构建使用,那么会发生什么? Maven可以处理这种情况并获得正确的快照版本吗?

I have a question regarding parallel maven build. If several maven builds are running in same machine at the same time, and some build results are used by other builds with snapshot version dependency, what will happen? Can maven handle such situation and get correct snapshot version?

推荐答案

在此处查看说明:

在CI服务器上进行Maven并发构建

换句话说.在这种情况下的行为未定义,因为对本地存储库的访问是 not 线程安全的.

In other words. The behaviour in such cases is not defined, cause the access to the local repository is not thread safe.

所以我会避免这样的事情.

So i would avoid such things.

这篇关于Maven是否构建“线程安全"的线程?对于快照项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆