[BUILD] Generate source jars for tests

Closes #6125