Whats creating MM/caches/1.9/scripts/ in project directory?


(Warren Muller) #1

I’ve noticed sometimes I get a bunch of script directories in a directory named MM/caches/1.9/scripts/ in my project root. This doesn’t occur during a normal clean build cycle but this interferes with my source control, etc. I’m not sure if this is something new or misplaced but maybe only occurs on initial builds or gradle version switching, and I also notice directories for each applied build script, so I’m sure it must be gradle doing this?

Currently using gradle 1.9

Contents of directory : drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_18jtmi8enu42obuoqm246mo4td drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_2cs43le5i0hln7uu396n91al77 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_2fo3fh7fsa2q9r95rvbpuum151 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_2t3rfsqg2t64nifa824a0s7jnn drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_2tignokk23fgbmqoquhb7r761b drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_30u6c2jnttjj3rireecnq1g3qg drwxrwxr-x 3 vagrant games 102 Dec 18 04:14 build_3a4mpisu44400n3bjncl1g319m drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3dlmk5or7gtoq7ri3coq46phft drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3fedkpmmjl5g22m3h0rvqmvqgg drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3jd4ajaqgqsdklfenflq94lqk9 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3pri3517mobfe5ijf7ipej2k80 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3q885d64ure93q48tsr32ua9r1 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3toqmcnfo07k4g1hl8lg6lu1qk drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_3v8d9ugg54m1adhblm686ka1fv drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_43kdi99932c9gahda4vdbcndho drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_49ht1hmaj6a8m1skn13cnm0nje drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_4fpq324dfc72j504h07n1d199n drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_4vt7sus55tefdq5kj3klgkcs97 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_5oohf6fpc4ej2jaug0hgflm30k drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_5pok3shv4alsfj3e906215vsih drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_6b4dnp617gijl7q5688t4d3b25 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_6pcb414ce3k91h3tfgvdflr5s8 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_6r50e4kua9kt4bp6sargpui5om drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_6sfkc53r4lvi82f5lfoddsn3rc drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_6u85vh9lk9d7hd5iqcd75lraan drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_7046r4up89fak2n3ngpo6sinbv drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_72k6nluih4p5tk8tu4j3ikf3uv drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_7criffpj10lnvj75jj6kektblf drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_7tbm70tp9dcpqnvdt7kn9nfns6 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_e2gg15ki0cscgvu718gp05kb7 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_gtkp0ekscqe6vjaau7d8mdpun drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_oimeegd3ashie6pbjajap11b5 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_options_3v5s1hudhi4nc8vgpn149ermj9 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_tjr6duvqj2j4dfr6bann7p8b4 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 build_vf0tl2rj261if08pik7n9ajdo drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 common_752i882rs7lvj5udkmpeq2nqln drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 config_5fmlm5aap3c86smljngdptnh04 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 config_6fvcch0u5vl9ii8f3vcekb05jo drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 dust_66mm7m52q0fb88s51e4eq47ht4 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 icecat_7495iin70de42nk98l55r6f1s1 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 jboss_4thrq8mvoftkjo1r8k1nc16bjn drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 libraries_9qknqj6s80h0qkkrkqorhjptn drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 maven_4m6cslkq6siu4rf6dr71msu1n8 drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 momentum_7tjvhjgrqsgcrpqgurt35mbbca drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 package_2f6to3ss611bc1134gi0t9t56a drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 refresh_2mrskh8sttfq6siphmcgo3g2mk drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 reporting_3iv1rn8b0khjup48v0en2dpc8t drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 security_3k5015u8pta5ol14g9cs1880f4 drwxrwxr-x 3 vagrant games 102 Dec 18 04:14 settings_1oarf4br66c3s1lvbod5jlqr3s drwxrwxr-x 3 vagrant games 102 Dec 18 04:16 version_3msqpsgls7osjklu9vl45dl2vd


(Peter Niederwieser) #2

Sounds like you have set the Gradle user home (which defaults to ‘$userHome/.gradle’) to ‘$projectDir/MM’. What’s the meaning of the ‘MM’ name?


(Warren Muller) #3

Have no idea what MM is. Our project root is called Momentum and MM appears inside. There might be one complication. My current setup is that I checkout source code on my host, build a Vagrant VM and synchronise ~/.gradle caches and .m2 repos between the VM and the host, so that I can build in and outside of the VM at the same time, editing in Eclipse in the host and running servers in the VM. This has been going fine since about 1.6, but I’m sure I’ve only noticed this since 1.9 because the source code syncronisation never picked it up before, now suddenly I have loads of extra files that appear. So it could be something within all this switching but there is definitely nothing explicitly called MM that I know of anywhere. Other than what’s shown below there is no explicit setting of Gradle user home either. I’ll just have to watch under what conditions it occurs again if this has not been seen before. Thanks :slight_smile:

[vagrant@localhost Momentum]$ echo $HOME /home/vagrant [vagrant@localhost Momentum]$ ll /home/vagrant/.gradle/ total 4 drwxr-xr-x 1 vagrant vagrant 612 Dec 18 00:54 caches drwxr-xr-x 1 vagrant vagrant 306 Dec 14 05:18 daemon -rw-r–r-- 1 vagrant vagrant 264 Mar 12 2013 gradle.properties drwxr-xr-x 1 vagrant vagrant 102 Oct 10 13:20 jna drwxr-xr-x 1 vagrant vagrant 170 Mar 17 2013 native drwxr-xr-x 1 vagrant vagrant 102 Nov 15 09:21 wrapper [vagrant@localhost Momentum]$ ll /home/vagrant/.gradle/caches/ total 0 drwxr-xr-x 1 vagrant vagrant 136 Dec 18 02:10 1.10 drwxr-xr-x 1 vagrant vagrant 136 Dec 6 08:22 1.10-rc-1 drwxr-xr-x 1 vagrant vagrant 136 Feb 2 2013 1.4 drwxr-xr-x 1 vagrant vagrant 136 Mar 27 2013 1.5 drwxr-xr-x 1 vagrant vagrant 136 Oct 15 11:20 1.6 drwxr-xr-x 1 vagrant vagrant 136 Aug 8 10:31 1.7 drwxr-xr-x 1 vagrant vagrant 136 Oct 15 08:07 1.8 drwxr-xr-x 1 vagrant vagrant 136 Dec 14 05:20 1.9 drwxr-xr-x 1 vagrant vagrant 136 Nov 15 09:07 1.9-rc-3 drwxr-xr-x 1 vagrant vagrant 2108 Oct 10 13:41 artifacts drwxr-xr-x 1 vagrant vagrant 306 May 6 2013 artifacts-15 drwxr-xr-x 1 vagrant vagrant 306 Mar 13 2013 artifacts-23 drwxr-xr-x 1 vagrant vagrant 306 Feb 2 2013 artifacts-23-backup drwxr-xr-x 1 vagrant vagrant 306 Oct 15 11:15 artifacts-24 drwxr-xr-x 1 vagrant vagrant 306 Aug 8 10:30 artifacts-26 drwxr-xr-x 1 vagrant vagrant 170 Nov 15 09:05 modules-2 [vagrant@localhost Momentum]$ ll /home/vagrant/.gradle/caches/modules-2/ total 4 drwxr-xr-x 1 vagrant vagrant 3094 Dec 17 04:34 files-2.1 drwxr-xr-x 1 vagrant vagrant 238 Nov 15 09:05 metadata-2.1 -rw-r–r-- 1 vagrant vagrant

17 Dec 18 06:17 modules-2.lock [vagrant@localhost Momentum]$ ll /home/vagrant/.gradle/caches/modules-2/metadata-2.1/ total 952 -rw-r–r-- 1 vagrant vagrant 139659 Dec 18 06:16 artifact-at-repository.bin -rw-r–r-- 1 vagrant vagrant 727803 Dec 18 06:16 artifact-at-url.bin drwxr-xr-x 1 vagrant vagrant

3094 Dec 17 04:34 descriptors -rw-r–r-- 1 vagrant vagrant 18512 Nov 15 09:05 dynamic-revisions.bin -rw-r–r-- 1 vagrant vagrant 78364 Dec 18 03:02 module-metadata.bin


(Peter Niederwieser) #4

I don’t think that ‘MM’ is a name chosen by Gradle. Transferring the Gradle cache between machines is not supported and may not work correctly. I sugeest to keep the caches separate. The local Maven repository should only be used in cases where a Gradle build needs to consume the output of a Maven build (or the other way around). Otherwise, don’t declare ‘mavenLocal()’, and don’t sync ‘.m2’.


(Warren Muller) #5

Thanks for the updates Peter

We are running 3 or 4 projects all talking to each other via the .m2 repo - no problem or at least testing plugin updates installed into .m2 then used in the other projects. So that bit works fine without issues.

It doesn’t stop us - because we can just delete the MM directory and carry on when it appears. Its only rarely there so not a show stopper.

I understand its not supported thanks but will keep you posted if I can detect when it happens.

Many thanks for your help :slight_smile:


(Warren Muller) #6

I finally figured this out. I use a lot of -x exclusions when running a task repeatedly that has lots of dependencies to reduce the time. In this case I used the abbreviation of a task gMM and sometimes mistype ‘-x gMM’ as ‘-gMM’. This results in a new local gradle cache in the MM directory. I noticed whenever I mistype it starts downloading all the dependencies which gave a clue! Mystery solved :slight_smile: