There was one more email with the same problem.
We are talking about this problem, global repo:
'$COMPANY_JENKINS_HOME.m2/repository/executor_$EXECUTOR_NUMBER'

Our build creates pwd() + "/.m2" in the job, and the scm checkouts git repo
to "./build" directory.
No issue then!

The Jenkinsfile should use relative paths and then it is transferable to
any new machines and any time.

Cheers
Tibor17


On Tue, May 14, 2019 at 3:13 PM Francois MAROT <[email protected]>
wrote:

> Sorry, seems my previous message missed the copy pasted content ! Here it
> is:
>
>    pipeline {
>         agent { node { label paramsMap.agentParam } }    // the build will
> only run on nodes (ie slaves) indicated
>
>         environment {
>             // To prevent simultaneous job working in the same Maven local
> repo, we use per-executor local repo (more details here:
>
> http://maven.40175.n5.nabble.com/Not-able-to-read-jars-in-repo-intermittently-td5928990.html#a5928997
> )
>             MAVEN_CMD = "mvn -U --batch-mode
> ${paramsMap.activateParallelBuild ? '-T 1C' : ''} " +
>                 "-Dmaven.repo.local=${isUnix() ?
> '$COMPANY_JENKINS_HOME.m2/repository/executor_$EXECUTOR_NUMBER' :
> '%COMPANY_JENKINS_HOME%.m2\\repository\\executor_%EXECUTOR_NUMBER%'} " +
>                 "-s ${isUnix() ? '$MAVEN_SETTINGS_XML' :
> '%MAVEN_SETTINGS_XML%'} "
>             JAVA_TOOL_OPTIONS = "${env.JAVA_TOOL_OPTIONS == null ? '' :
> env.JAVA_TOOL_OPTIONS} -Djava.io.tmpdir=${env.WORKSPACE}/target/"
>         }
> ...
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to