The judge said that they were all "committed fundamentalists" who would have been prepared to kill.
Mahmood and Dart were both given extended sentences, meaning that they will serve two-thirds of their prison terms rather than half, and they will spend five years on licence.
He told Dart and Mahmood: "I'm satisfied to the required criminal standard that neither of you had ruled out an attack in the United Kingdom, and that you, Mahmood, were looking at arming yourself with a bomb."
After the sentencing, the Metropolitan Police said the convictions followed a painstaking investigation by the Met's counter-terrorism command and security services that had uncovered secret conversations about potential attacks in the UK and abroad.
Deputy Assistant Commissioner Stuart Osborne, head of the Met's counter-terrorism command, said the investigation had involved a "mixture of dedicated, diligent traditional detective work combined with the latest technology and computer techniques".
He said the trio were "dangerous men".
"This case serves as a classic example of how terrorists live in our midst while preparing their acts and their determination to travel overseas to train before returning to the UK," he said.
All three had been stopped at airports while travelling to and from Pakistan.
When Mahmood was stopped at Manchester in 2010, traces of explosives were found on two rucksacks that he had with him.
He later admitted that he had received rudimentary training in explosives while in Pakistan.
Dart, who changed his name to Salahuddin al-Britani, became involved in extremism after moving from his home town of Weymouth, Dorset, to east London and fraternising with radical Muslim Anjem Choudary.
His beliefs were brought into the spotlight as part of a BBC television documentary My Brother The Islamist, by his stepbrother Robb Leech.
Alom joined the Territorial Army in 2006 as part of the G Company 7th Battalion the Rifles, but did not complete his training due to medical reasons.
The following year he became a PCSO but left the job in September 2009.
Mr Justice Simon said that he and Dart were "the object of suspicion" for their fellow radicals, and may have felt the need to prove themselves.
Alom had his own contact with a fourth man, Mohammed Tariq Nasar, a Briton now living in Pakistan, to try to get terrorist training, it is claimed. Mr Nasar has not been charged with any offence.
The trio were arrested on 5 July last year just before the start of the Olympics, and were charged on 18 July.