All major commodity groups post gains amid Middle East conflict