Skip to content

Commit 38825eb

Browse files
committed
fix: remove nexus.bearerCreate, not needed for nexus api
Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
1 parent c4f0637 commit 38825eb

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ mvn central-staging-plugins:nexus-list \
673673
| `nexus.showDetails` | Boolean | `false` | Display detailed information including download URLs and asset details |
674674
| `nexus.bearerToken` | String | - | Authentication token for Nexus Repository Manager API |
675675
| `nexus.serverId` | String | `nexus` | Server ID for retrieving credentials from settings.xml |
676-
| `nexus.bearerCreate` | Boolean | `false` | Create bearer token from username:password in settings.xml |
677676
| `nexus.apiUrl` | String | `https://repo3.eclipse.org/service/rest/v1` | Nexus Repository Manager API base URL |
678677

679678
**Tips:**

src/main/java/org/eclipse/cbi/central/plugin/AbstractNexusMojo.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ public abstract class AbstractNexusMojo extends AbstractMojo {
4242
@Parameter(property = "nexus.serverId", defaultValue = "nexus")
4343
protected String serverId;
4444

45-
/**
46-
* Whether to automatically build the bearer token from username:password in
47-
* settings.xml.
48-
* When true, the bearer token is created by base64 encoding "username:password"
49-
* from the server entry.
50-
*/
51-
@Parameter(property = "nexus.bearerCreate", defaultValue = "false")
52-
protected boolean bearerCreate;
53-
5445
/**
5546
* The Nexus Repository Manager API URL. If not set, the default is used.
5647
*/
@@ -96,14 +87,7 @@ protected String getBearerToken() throws MojoFailureException {
9687
if (settings != null && serverId != null) {
9788
Server server = settings.getServer(serverId);
9889
if (server != null) {
99-
String password = decryptPassword(server);
100-
if (bearerCreate && server.getUsername() != null) {
101-
// Create token from username:password
102-
String credentials = server.getUsername() + ":" + password;
103-
return Base64.getEncoder().encodeToString(credentials.getBytes());
104-
} else if (password != null && !password.isEmpty()) {
105-
return password;
106-
}
90+
return decryptPassword(server);
10791
}
10892
}
10993

0 commit comments

Comments
 (0)