class DuplicateArtifactAttachmentException extends RuntimeException {

    private static final String DEFAULT_MESSAGE = "Duplicate artifact attachment detected.";

    private Artifact artifact;

    private final MavenProject project;

    public DuplicateArtifactAttachmentException(MavenProject project, Artifact artifact) {
        super(constructMessage(project, artifact));
        this.project = project;
        this.artifact = artifact;
    }

    private static String constructMessage(MavenProject project, Artifact artifact) {<FILL_FUNCTION_BODY>}

    public MavenProject getProject() {
        return project;
    }

    public Artifact getArtifact() {
        return artifact;
    }
}

        return DEFAULT_MESSAGE + " (project: " + project.getId() + "; illegal attachment: " + artifact.getId() + ")";
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID