withMaven(mavenLocalRepo: '.repository') {
// Run the maven build
sh "mvn clean package" }
withMaven(mavenLocalRepo: "/tmp/${env.BRANCH_NAME}/.repository") {
// Run the maven build sh "mvn clean package"
}Since we're "mvn install"-ing snapshots, we cannot reuse the same .m2 repo for different branches...
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5970854a-5e55-4475-bf75-5da0227202d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think that multibranch have a workspace for each branch (I'm away from my computer and can't check it) if that is the case it is safe to just use .repository, if not you can use what you propose or .reposotory_${env.BRANCH_NAME} which will make it relative and it should be persistent between executions.
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/6NCL_RTSRDY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABwQARtxFg8f82BxxM_aToua8Q3hG_qUsZqjrQt871cVkQOEtA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5970854a-5e55-4475-bf75-5da0227202d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/6NCL_RTSRDY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/30b35a77-a958-40b5-91e3-b87bf54b280d%40googlegroups.com.