I actually had a rather interesting experience with goblins being trained through the means of weapons traps.. by accident.
The first defense I threw up to keep my fort safe until I could improve on it was a pit of Upright Spike traps filled with wooden Menanacing Spikes with a drawbridge on top. When a lever was pulled, the baddies were dropped into said pitting, destroying my foes quite nicely if I do say so myself.
Until a pair of lashers defied all logic
An ambush came, and after I lured the gobbos over the bridge and dropped them into my pit of death, I thought I was done. Soon I started to get a bunch of job cancellation messages due to "Goblin Lasher" so I zoomed to the spot of trouble. The goblins had been transformed to Master Lashers. The fall had crippled them, but they were still very much alive, and almost marked the end of my fledgling fortress. That one dropped trained them up in almost all their skills because they were nigh impossible to kill afterwards, even with about a page of red texting recording their injuries.
For reference, I used +5 Legendary carpenters to craft 10 spikes for each trap inthe pit, and had the whole area covered.
I would imagine a ineffective gobbo trainer could be made from this, replacing the spikes with training spears. It'd probably be much less efficient than a danger room though.