You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: maven-release-manager/src/main/java/org/apache/maven/shared/release/scm/DefaultScmRepositoryConfigurator.java
+28-7
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,9 @@ public ScmRepository getConfiguredRepository(String url, ReleaseDescriptor relea
96
96
97
97
if (releaseDescriptor.getScmId() != null) {
98
98
server = settings.getServer(releaseDescriptor.getScmId());
99
+
if (server == null) {
100
+
logger.warn("No server with id '{}' found in Maven settings", releaseDescriptor.getScmId());
101
+
}
99
102
}
100
103
101
104
if (server == null && repository.getProviderRepository() instanceofScmProviderRepositoryWithHost) {
@@ -115,39 +118,57 @@ public ScmRepository getConfiguredRepository(String url, ReleaseDescriptor relea
115
118
}
116
119
117
120
if (server != null) {
118
-
if (username == null) {
121
+
if (username == null && server.getUsername() != null) {
122
+
logger.debug(
123
+
"Using username from server id '{}' found in Maven settings", releaseDescriptor.getScmId());
119
124
username = server.getUsername();
120
125
}
121
126
122
-
if (password == null) {
127
+
if (password == null && server.getPassword() != null) {
128
+
logger.debug(
129
+
"Using password from server id '{}' found in Maven settings", releaseDescriptor.getScmId());
0 commit comments