fix build/repo issues, build as a jenkins plugin