@@ -7,7 +7,7 @@ import retrofit2.converter.moshi.MoshiConverterFactory
7
7
8
8
internal class Nexus (
9
9
baseUrl : String ,
10
- username : String ,
10
+ private val username : String ,
11
11
password : String ,
12
12
private val stagingRepository : String?
13
13
) {
@@ -28,7 +28,7 @@ internal class Nexus(
28
28
val profileRepositoriesResponse = service.getProfileRepositories().execute()
29
29
30
30
if (! profileRepositoriesResponse.isSuccessful) {
31
- throw IOException (" Cannot get profileRepositories: ${profileRepositoriesResponse.errorBody()?.string()} " )
31
+ throw IOException (" Cannot get profileRepositories for account $username : ${profileRepositoriesResponse.errorBody()?.string()} " )
32
32
}
33
33
34
34
return profileRepositoriesResponse.body()?.data
@@ -38,7 +38,7 @@ internal class Nexus(
38
38
val allRepositories = getProfileRepositories() ? : emptyList()
39
39
40
40
if (allRepositories.isEmpty()) {
41
- throw IllegalArgumentException (" No staging repository prefixed with . Make sure you called \" ./gradlew publish\" ." )
41
+ throw IllegalArgumentException (" No staging repositories found in account $username . Make sure you called \" ./gradlew publish\" ." )
42
42
}
43
43
44
44
val candidateRepositories = if (stagingRepository != null ) {
@@ -49,15 +49,15 @@ internal class Nexus(
49
49
50
50
if (candidateRepositories.isEmpty()) {
51
51
throw IllegalArgumentException (
52
- " No matching staging repository found. You can can explicitly choose one by " +
52
+ " No matching staging repository found in account $username . You can can explicitly choose one by " +
53
53
" passing it as an option like this \" ./gradlew closeAndReleaseRepository --repository=comexample-123\" . " +
54
54
" Available repositories are: ${allRepositories.joinToString(separator = " , " ) { it.repositoryId }} "
55
55
)
56
56
}
57
57
58
58
if (candidateRepositories.size > 1 ) {
59
59
throw IllegalArgumentException (
60
- " More than 1 matching staging repository found. You can can explicitly choose " +
60
+ " More than 1 matching staging repository found in account $username . You can can explicitly choose " +
61
61
" one by passing it as an option like this \" ./gradlew closeAndReleaseRepository --repository comexample-123\" . " +
62
62
" Available repositories are: ${allRepositories.joinToString(separator = " , " ) { it.repositoryId }} "
63
63
)
0 commit comments