There are several threads about this topic already. With various points from both sides of the fence.
Me personally, if the enclosure is build strong enough there is typically no issues from it. There are some amplifiers that are more prone to those kinds of damage, but they will likely fail just the same if you build something rather large with a good amount of output. The largest issue I have seen over the years are one of two things.
1. Enclosure flexes to much causing damage to the board of the amplifier by typically do to the "twisting" action that could happen.
2. Poor solder points and/or glue points on the amplifier simply break off. This was some what common of cheaper amps for several years. However, from what I have seen with the most basic Korean amplifier(what most run) that has been resolved.
If you can keep from mounting the amp on the enclosure then I would do so...however, if you have no other area to place it..then you really have no choice. Just take all precautions you can and go from there.