There are several examples of similar Jenkinsfiles for projects based on https://github.com/jenkinsci/pom.
I suggest to generalize them in a single lib method (e.g. buildJenkinsLibrary() or so). Requirements:
- Support of multi-module repositories
- Support of linux/windows builds
- Support of FindBugs, which is not a part of parent POM so far