class InvalidProjectVersionException extends ProjectBuildingException {

    private final String locationInPom;

    private final String offendingVersion;

    public InvalidProjectVersionException(
            String projectId,
            String locationInPom,
            String offendingVersion,
            File pomFile,
            InvalidVersionSpecificationException cause) {
        super(projectId, formatMessage(projectId, locationInPom, offendingVersion, cause), pomFile, cause);
        this.locationInPom = locationInPom;
        this.offendingVersion = offendingVersion;
    }

    private static String formatMessage(
            String projectId,
            String locationInPom,
            String offendingVersion,
            InvalidVersionSpecificationException cause) {<FILL_FUNCTION_BODY>}

    public String getOffendingVersion() {
        return offendingVersion;
    }

    public String getLocationInPom() {
        return locationInPom;
    }
}

        return "Invalid version: " + offendingVersion + " found for: " + locationInPom + " in project: " + projectId
                + ". Reason: " + cause.getMessage();
    
<methods>public void <init>(java.lang.String, java.lang.String, java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.String, java.io.File) ,public void <init>(List<org.apache.maven.project.ProjectBuildingResult>) ,public java.io.File getPomFile() ,public java.lang.String getPomLocation() ,public java.lang.String getProjectId() ,public List<org.apache.maven.project.ProjectBuildingResult> getResults() <variables>private java.io.File pomFile,private final non-sealed java.lang.String projectId,private List<org.apache.maven.project.ProjectBuildingResult> results