[BZ-1021702] also build java sources in maven test folder
(cherry picked from commit b965248e3d0c6e157b309bfcb4c3849dd41ccd59)