V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
asp1111
V2EX  ›  Java

maven install 是不是线程安全的?

  •  
  •   asp1111 · Sep 30, 2021 · 3120 views
    This topic created in 1672 days ago, the information mentioned may be changed or developed.
    场景是这样的:目前用一个开源的打包平台发布应用,因为是多项目结构,所以会出现
    cd 父项目
    mvn clean install
    cd 子项目
    mvn clean install
    那么是不是说,如果不同分支的父项目同时打包发布,是不是有可能造成 A 分支的父项目打包到 B 分支的子项目里的情况
    4 replies    2021-09-30 14:12:16 +08:00
    yidinghe
        1
    yidinghe  
       Sep 30, 2021
    1 、试试不就知道了;
    2 、如果不想试,又担心风险,那就 clone 两个目录下,各自使用不同的分支来构建。
    ikas
        2
    ikas  
       Sep 30, 2021
    管他怎么打包...
    重点是你的项目的版本...你不同分支,要有不同的版本..如果版本都相同,那当然都是错乱了
    另外这与线程安全没有关系...
    chendy
        3
    chendy  
       Sep 30, 2021   ❤️ 1
    这已经不是线程是进程了,不安全是肯定的。。。
    不同分支在不同目录下跑各自的任务吧
    zifangsky
        4
    zifangsky  
       Sep 30, 2021
    这跟线程安全有啥关系。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5360 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 03:49 · PVG 11:49 · LAX 20:49 · JFK 23:49
    ♥ Do have faith in what you're doing.