public void addArtifact()

in src/main/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReader.java [61:86]


    public void addArtifact(org.apache.maven.resolver.internal.ant.types.Artifact artifact) {
        if (artifact.getPom() != null) {
            Pom pom = artifact.getPom();
            Artifact aetherArtifact;
            if (pom.getFile() != null) {
                Model model = pom.getModel(pom);
                aetherArtifact = new DefaultArtifact(
                        model.getGroupId(),
                        model.getArtifactId(),
                        artifact.getClassifier(),
                        artifact.getType(),
                        model.getVersion());
            } else {
                aetherArtifact = new DefaultArtifact(
                        pom.getGroupId(),
                        pom.getArtifactId(),
                        artifact.getClassifier(),
                        artifact.getType(),
                        pom.getVersion());
            }
            aetherArtifact = aetherArtifact.setFile(artifact.getFile());

            String coords = coords(aetherArtifact);
            artifacts.put(coords, aetherArtifact);
        }
    }