Brittle and quasi-brittle solids, when subject to compression, fail by the development of microcracks that originate from heterogeneity. Lateral confinement has been shown to affect the failure pattern of the testing specimen, from splitting type of cracking with no confinement, to failure by shear banding with moderate confinement, to plasticitylike ductile failure when subject to high confining pressure. Even in the case of simple uni-axial compression, near local heterogeneity, e.g., pore or a small crack, the nonuniform stress state will introduce local confinement. As a result, different types of failure can occur simultaneously. In the present study, we investigate the process of damage initiation, accumulation, and cracking in a specimen of plastic bonded explosive (PBX), PBX 9502, containing a cavity and subject to compression. Due to the nonuniform deformation near the cavity, both tensile cracks and shear-dominated widespread material damage are generated. Detailed variation of quantities that characterize the process of crack initiation and growth will be presented and discussed.