File artifactFile = moduleArtifact.getFile();
// for pom projects take the file from the project if the artifact file is null
if (isPomProject(moduleArtifact) && moduleArtifact.equals(project.getArtifact())) {
artifactFile = project.getFile(); // project.getFile() returns the project pom file
}
org.jfrog.build.api.Artifact artifact = artifactBuilder.build();
String groupId = moduleArtifact.getGroupId();
String deploymentPath = getDeploymentPath(groupId, artifactId, artifactVersion, artifactClassifier, artifactExtension);
// If excludeArtifactsFromBuild and the PatternMatcher found conflict, add the excluded artifact to the excluded artifact set.
if (excludeArtifactsFromBuild && PatternMatcher.pathConflicts(deploymentPath, patterns)) {
module.addExcludedArtifact(artifact);