public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
logger.info("Publishing to repository {}", artifactRepository);
T deployTask = createDeployTask();
deployTask.setProject(AntUtil.createProject());
MavenSettingsSupplier mavenSettingsSupplier = new EmptyMavenSettingsSupplier();
mavenSettingsSupplier.supply(deployTask);
postConfigure(deployTask, artifactRepository);
addPomAndArtifacts(deployTask, publication);
execute(deployTask);
mavenSettingsSupplier.done();
}