Generate source jars for tests

Closes #6125
I'll see what I can do.