Skip to content

Commit

Permalink
Start off with a minimize public API
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 6, 2024
1 parent 576f8d5 commit 6c62959
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void customizeExecutionContext(ExecutionContext ctx) {
MavenExecutionContextView mctx = MavenExecutionContextView.view(ctx);
MavenSettings settings = MavenSettings.readMavenSettingsFromDisk(mctx);
if (settings != null) {
settings.updatePasswords(mctx);
settings.maybeDecryptPasswords(mctx);
}
mctx.setMavenSettings(settings);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class MavenSecuritySettings {
@Nullable
String master;

public static @Nullable MavenSecuritySettings parse(Parser.Input source, ExecutionContext ctx) {
private static @Nullable MavenSecuritySettings parse(Parser.Input source, ExecutionContext ctx) {
try {
return new Interpolator().interpolate(
MavenXmlMapper.readMapper().readValue(source.getSource(ctx), MavenSecuritySettings.class));
Expand All @@ -54,7 +54,7 @@ public class MavenSecuritySettings {
}
}

public static @Nullable MavenSecuritySettings parse(Path settingsPath, ExecutionContext ctx) {
private static @Nullable MavenSecuritySettings parse(Path settingsPath, ExecutionContext ctx) {
return parse(new Parser.Input(settingsPath, () -> {
try {
return Files.newInputStream(settingsPath);
Expand Down Expand Up @@ -98,7 +98,7 @@ private static boolean exists(Path path) {
}
}

public MavenSecuritySettings merge(@Nullable MavenSecuritySettings installSettings) {
private MavenSecuritySettings merge(@Nullable MavenSecuritySettings installSettings) {
return installSettings == null ? this : new MavenSecuritySettings(
master == null ? installSettings.master : master
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public MavenSettings(@Nullable String localRepository, @Nullable Profiles profil
.orElse(installSettings);
}

void updatePasswords(ExecutionContext ctx) {
void maybeDecryptPasswords(ExecutionContext ctx) {
MavenSecuritySettings security = MavenSecuritySettings.readMavenSecuritySettingsFromDisk(ctx);
if (security == null) {
return;
Expand Down

0 comments on commit 6c62959

Please sign in to comment.