parentProject.getVersion() );
project.setParentArtifact( parentArtifact );
}
// Must validate before artifact construction to make sure dependencies are good
ModelValidationResult validationResult = validator.validate( model );
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
if ( validationResult.getMessageCount() > 0 )
{
throw new InvalidProjectModelException( projectId, pomLocation, "Failed to validate POM",
validationResult );
}