2017-04-06 51 views
0

我试图用gradle release plugin在私有连接库上部署我的工件,但实际上我在上传归档fase期间遇到问题。gradle release插件release-opinion

上传到达结束,即使有400,但发行版本库中承上启下的答案我找到的dev- * milestone- *

我希望只RC- *或最终发布的各种版本evene的发行库和dev亡*和* milestone-上的快照库

其实我的配置是

plugins { 
id 'org.ajoberstar.grgit' version '1.7.0' 
id 'org.ajoberstar.git-publish' version '0.2.0' 

id 'org.ajoberstar.release-opinion' version '1.7.0' 
} apply plugin: 'java' 
apply plugin: 'maven' 


group = 'social.picnik.backend' 
//version = '3.31.3-SNAPSHOT' 

description = " --backend-services-- " 

sourceCompatibility = 1.8 
targetCompatibility = 1.8 
tasks.withType(JavaCompile) { 
    options.encoding = 'UTF-8' 
} 

tasks.release.dependsOn 'build', 'uploadArchives' 


uploadArchives { 
    repositories { 
     mavenDeployer { 
      repository(url: "${nexusUrl}/content/repositories/releases") { 
       authentication(userName: nexusUsername, password: nexusPassword) 
      } 
      snapshotRepository(url: "${nexusUrl}/content/repositories/snapshots") { 
       authentication(userName: nexusUsername, password: nexusPassword) 
      } 
     } 
    } 
} 

wrapper { 
    gradleVersion = '3.4' 
} 

dependencies 
...... 

我启动命令是

gradle release 

但后来我在发布的Nexus仓库 这个版本中发现

3.31.3-dev.22.uncommitted + c6e4922

我本来希望看到它在快照库不释放

感谢您的时间

回答

0
tasks.afterReleaseBuild.dependsOn uploadArchives 

应该这样做。