gradle的repository 的设置问题

gradle maven

repositories { 
    //Maven中心库(http://repo1.maven.org/maven2) 
    mavenCentral() 

 //本地库
 mavenLocal() 

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

//指定库 
mavenRepo name: reponame', url: "http://repo.mycompany.com/maven2" 

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

//带认证的库 
maven { 
    credentials { 
        username 'user' 
        password 'password' 
    } 
    url "http://repo.mycompany.com/maven2" 
} 

}

发布了91 篇原创文章 · 获赞 42 · 访问量 22万+

猜你喜欢

转载自blog.csdn.net/cjhxydream/article/details/90632204