Cotton gin musket In 1798, Eli Whitney invented a way to manufacture muskets by machine so that the parts were interchangeable. Ironically, it was as a manufacturer of muskets that Whitney finally became rich.
Percussion caps were invented in the 1830's, with patents granted earlier in the 1800's. The first military application for percussion caps on muskets was in about 1842. By the Mexican War of 1846-1848, percussion cap firing muskets/rifles became general issue.