in initializer-generator/src/main/java/com/alibaba/initializer/generation/extension/build/maven/MulitModuleMavenBuildWriter.java [490:517]
private void writeDistributionManagement(IndentingWriter writer,
MavenDistributionManagement distributionManagement) {
if (distributionManagement.isEmpty()) {
return;
}
writeElement(writer, "distributionManagement", () -> {
writeSingleElement(writer, "downloadUrl", distributionManagement.getDownloadUrl());
writeDeploymentRepository(writer, "repository", distributionManagement.getRepository());
writeDeploymentRepository(writer, "snapshotRepository", distributionManagement.getSnapshotRepository());
MavenDistributionManagement.Site site = distributionManagement.getSite();
if (!site.isEmpty()) {
writeElement(writer, "site", () -> {
writeSingleElement(writer, "id", site.getId());
writeSingleElement(writer, "name", site.getName());
writeSingleElement(writer, "url", site.getUrl());
});
}
MavenDistributionManagement.Relocation relocation = distributionManagement.getRelocation();
if (!relocation.isEmpty()) {
writeElement(writer, "relocation", () -> {
writeSingleElement(writer, "groupId", relocation.getGroupId());
writeSingleElement(writer, "artifactId", relocation.getArtifactId());
writeSingleElement(writer, "version", relocation.getVersion());
writeSingleElement(writer, "message", relocation.getMessage());
});
}
});
}