Artifact artifact = this.artifactFactory.createArtifactWithClassifier(groupId, artifactId, version, packaging, classifier);
// Upload the POM if requested, generating one if need be
if (generatePom) {
ArtifactMetadata metadata = new ProjectArtifactMetadata(artifact, generatePomFile(model));
artifact.addMetadata(metadata);
}
else {
ArtifactMetadata metadata = new ProjectArtifactMetadata(artifact, pomFile);
artifact.addMetadata(metadata);
}
try {
getDeployer().deploy(mainArtifact, artifact, repo, this.localRepository);