Skip to content

Instantly share code, notes, and snippets.

@BenjaminHerbert
Last active October 12, 2016 07:41
Show Gist options
  • Save BenjaminHerbert/71aca1fe3a1fcdb6de7bc390453b317c to your computer and use it in GitHub Desktop.
Save BenjaminHerbert/71aca1fe3a1fcdb6de7bc390453b317c to your computer and use it in GitHub Desktop.
job('test') {
steps{
maven {
mavenInstallation('3.3.9')
goals('fuu:bar')
}
maven {
mavenInstallation('3.3.9')
goals('compile')
}
}
}
job('test') {
steps{
addMavenGoal delegate, 'maven-3.3.9', 'fuu:bar'
addMavenGoal delegate, 'maven-3.3.9', 'compile'
}
}
def addMavenGoal(context, mavenVersion, goal) {
context.with {
maven {
mavenInstallation(mavenVersion)
goals(goal)
}
}
}
def maven = 'maven-3.3.9'
job('test') {
steps{
addMavenGoal delegate, maven, 'fuu:bar'
addMavenGoal delegate, maven, 'compile'
}
}
def addMavenGoal(context, mavenVersion, goal) {
context.with {
maven {
mavenInstallation(mavenVersion)
goals(goal)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment