In either case, one may conjecture that the words and the melody were joined in 1916 or later.
The Clancy Bros. & Tommy Makem popularized the song everywhere with their self-titled 1960 LP. In 1964 the Dubliners and The Kingston Trio both covered it.