File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,16 @@ uploadArchives {
65
65
mavenDeployer {
66
66
beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
67
67
68
- repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
69
- authentication(userName : ossrhUsername, password : ossrhPassword)
70
- }
68
+ if (hasProperty(' ossrhUsername' ) && hasProperty(' ossrhPassword' )) {
69
+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
70
+ authentication(userName : ossrhUsername, password : ossrhPassword)
71
+ }
71
72
72
- snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
73
- authentication(userName : ossrhUsername, password : ossrhPassword)
73
+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
74
+ authentication(userName : ossrhUsername, password : ossrhPassword)
75
+ }
74
76
}
75
-
77
+
76
78
pom. project {
77
79
name ' Java Hamcrest'
78
80
packaging ' jar'
You can’t perform that action at this time.
0 commit comments