Dodge-Em Traps are the latest fashion in Dwarven Self-Defense.
Dig a really big pit in the ground... like... REALLY BIG. Try seven tiles wide by nine tiles long by fifteen-or-twenty levels deep. Use a strip of constructed floors (do NOT use a drawbridge) to make a one-tile-wide path across the pit. Put a wall all around the top of it except for a one-tile-wide entry and a one-tile-wide exit. Wall it off so that anyone entering or leaving the fort must cross that narrow path over the wide and deep pit.
Now totally cover the path with weapon traps, each containing 10 weapons or trap components (Big Spikey Balls, Sharp Slicey things, whatever). It doesn't really matter what sort of weapons you use... even wooden training weapons will do, although deadly weapons are more Dwarfish.
The idea is to use your opponent's own strength against them... like in Judo.
An opponent starts to cross the path. He steps on the first weapon trap. Each weapon in the trap gets three attacks, and there are ten of them in the trap. That's thirty attacks. Per trap... you've likely got seven-to-nine traps on that path. In order to safely cross the path, your opponent needs to get lucky about two hundred and forty times in a row. You only need to get lucky once.
When a unit is attacked, they often dodge one-to-three tiles in a random direction. That will carry your opponent off the path, and out over the fifteen-to-twenty level deep pit. The wall around the pit will make sure that he has no safe place to dodge to... he ends up falling into the pit. A fifteen-to-twenty level fall will usually disassemble your opponents into their component organs.
Note that high-level opponents (Goblin Hammerlords, etc) have better dodging skills, and will dodge (and therefore die) more often.
Include a lever-controlled raising Drawbridge at entrance and exit, so that you can isolate the trap for necessary maintenance (prying corpses out of jammed weapon traps, etc), and another lever-controlled raising Drawbridge at the very bottom of the pit, so that you can send in the Haulers to cart off the splashed innards and the dropped weapons and armor. I also include lever-controlled retracting Drawbridges to cover the pit and turn the whole thing into a safe, walkable surface... in case my Army needs to fight an engagement there (I don't want them falling into my own pit trap).