Maven auto-installation doesn't work when shared between executions

39 views
Skip to first unread message

Виталий Ищенко

unread,
Jun 29, 2017, 10:08:53 AM6/29/17
to jenkins...@googlegroups.com
I have a windows slave node with 2 executors. And job that is bound to windows slave that allows to perform parallel builds. Jenkins automatically installs maven configured in Global Tools configuration by unpacking tar.gz archive.

The problem is that looks like every run re-fetches maven and tries to overwrite existing one. This approach fails almost every time because maven may be used at that time and Windows doesn't allow to overwrite running executable.

Is there a way to install maven into WORKSPACE instead of shared location or control where archive is unpacked, in this case we can use JOB_NAME and EXECUTOR_NUMBER to scope tool

Mark Waite

unread,
Jun 29, 2017, 10:17:09 AM6/29/17
to jenkins...@googlegroups.com
If the tool is being installed on every run of the job, then I think there is something else amiss with your installation.  I have several different automated installers (2 maven, 2 ant, cmake, etc.) which deploy to many different platforms successfully (including Windows).

I have a job that uses the elastic axis plugin to run a sample maven job on each of the agents using the specific maven version.  It works reliably, and once that job has run, other jobs do not unpack the maven installer for that maven version again.

Are there any unique or special settings you're using to configure your agents?

Mark Waite

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANYoZJ%3De6q4e0CDdZjvOQ%3D-HyLwcRtPX%2B5e9RiHT4OjnMSgeVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vitalii Ishchenko

unread,
Aug 7, 2017, 7:18:51 AM8/7/17
to Jenkins Users
Hi Mark

I found possible issue, we are installing maven from internal url and I've created test job that installs from apache
2nd option is different in fact that it creates .installedFrom file that is later used to verify if we are installing different version

Johnathan Law

unread,
May 4, 2018, 10:16:01 AM5/4/18
to Jenkins Users
I've just spent the day trying to get automatic tool installation to work. and it looks like this problem is still there. Did you manage to find any solution to this? It's incredibly frustrating, due to being in a corporate environment I'm seeing the JDK try to get installed nearly five times in a single job execution.
Reply all
Reply to author
Forward
0 new messages