gradle的repository 的设置问题

时间:2025-03-30 09:52:42

gradle maven

repositories { 
    //Maven中心库(/maven2) 
    mavenCentral() 

 //本地库
 mavenLocal() 

//指定库 
maven { 
    url "XXX" 
} 

//指定库 
mavenRepo name: reponame', url: "/maven2" 

//指定库 
maven { 
    // Look for POMs and artifacts, such as JARs, here 
    url "/maven2" 
    // Look for artifacts here if not found at the above location 
    artifactUrls "/jars" 
    artifactUrls "/jars2" 
} 

//带认证的库 
maven { 
    credentials { 
        username 'user' 
        password 'password' 
    } 
    url "/maven2" 
} 

}