Yes, provided that all the explosive materials in question are manufactured under a government contract. Any explosive materials manufactured in anticipation of receiving a government contract would not qualify for this exemption. If the contractor manufactures any explosive materials not pursuant to a U.S. military contract, the manufacture and the explosive materials are subject to all requirements of the law and regulations.
Some contracts may allow the contractor to retain excess or extracted explosive materials for their own use, for use in further manufacture, or for sale in commerce. In such a case, ownership of the explosive materials typically passes from military to the private company. ATF generally considers this acquisition and any further activities involving the explosive materials to be regulated by 27 CFR Part 555.