addResource now handles repositories