Could a modern warship carry factories that manufacture its own weapons?
Short answerIt is possible in theory, but complete weapons production would require a very large ship and carried supplies; even missile assembly uses substantial space.
NotesLimited 3D printing aboard a ship is considered feasible, while complete weapons manufacture would require a much larger vessel. Raw materials, explosives, and other necessary supplies would still have to be carried. USS Little Rock provides the comparison: a substantial part of the cruiser is devoted to assembling its missiles. Manufacturing the weapons themselves would require still more space.