Source:
<code>public static MavenProjectInformation getProjectInformation(MavenSession session, MavenProject project, File projectBaseFolder, boolean testJar, List<Deployment> deployments, String classifier, List<String> customDomains) { DefaultProjectInformation.Builder builder = new DefaultProjectInformation.Builder(); boolean isDeployment = isDeploymentGoal(session); builder.withGroupId(project.getGroupId()) .withArtifactId(project.getArtifactId()) .withVersion(project.getVersion()) .withPackaging(project.getPackaging()) .withClassifier(classifier) .withProjectBaseFolder(Paths.get(projectBaseFolder.toURI())) .withBuildDirectory(Paths.get(project.getBuild().getDirectory())) .setTestProject(testJar) .isDeployment(isDeployment) .withResolvedPom(new ResolvedPom(project.getModel())); if (isDeployment) { DistributionManagement management = project.getDistributionManagement(); DeploymentRepository repository = management != null ? management.getRepository() : null; Settings settings = session.getSettings(); Optional<ExchangeRepositoryMetadata> metadata = getExchangeRepositoryMetadata(repository, settings, customDomains); if (metadata.isPresent()) { if (deployments != null && isPlatformDeployment(deployments)) { builder.withDeployments(deployments); } <START> new ExchangeHelper(customDomains).updateRepositoryUri(project, session.getRequest().getSystemProperties()); <END> } else { builder.withDeployments(deployments); } } builder.withDependencyProject(new DependencyProject(project)); mavenProjectInformation.projectInformation = builder.build(); return mavenProjectInformation; }</code><technical_language>destructure it, more readable? ExchangeHelper exchangeHelper = new ExchangeHelper(customDomains); var? systemProperties = session.getRequest().getSystemProperties(); just: exchangeHelper.updateRepositoryUri(project,systemProperties);</technical_language>

Target:
public static MavenProjectInformation getProjectInformation(MavenSession session, MavenProject project, File projectBaseFolder, boolean testJar, List<Deployment> deployments, String classifier, List<String> customDomains) { DefaultProjectInformation.Builder builder = new DefaultProjectInformation.Builder(); boolean isDeployment = isDeploymentGoal(session); builder.withGroupId(project.getGroupId()) .withArtifactId(project.getArtifactId()) .withVersion(project.getVersion()) .withPackaging(project.getPackaging()) .withClassifier(classifier) .withProjectBaseFolder(Paths.get(projectBaseFolder.toURI())) .withBuildDirectory(Paths.get(project.getBuild().getDirectory())) .setTestProject(testJar) .isDeployment(isDeployment) .withResolvedPom(new ResolvedPom(project.getModel())); if (isDeployment) { DistributionManagement management = project.getDistributionManagement(); DeploymentRepository repository = management != null ? management.getRepository() : null; Settings settings = session.getSettings(); Optional<ExchangeRepositoryMetadata> metadata = getExchangeRepositoryMetadata(repository, settings, customDomains); if (metadata.isPresent()) { if (deployments != null && isPlatformDeployment(deployments)) { builder.withDeployments(deployments); } } else { builder.withDeployments(deployments); } } builder.withDependencyProject(new DependencyProject(project)); mavenProjectInformation.projectInformation = builder.build(); return mavenProjectInformation; }