We use the maven plugin to install our artifacts into a local .m2 repository. For some reason gradle (using 1.4) is starting to use a timestamp instead of the SNAPSHOT qualifier when installing the artifacts to the local .m2 repo. Eg:
As a result one of our jenkins build nodes now have a .m2 repository containing 58 GB of data (only counting our own projects). What has caused this change in behavior and how do we fix it.
I can’t reproduce the behaviour you’re describing. Can you provide some more details about you’re environment? Which gradle version are you using? Did you add any customizations to the install task? Do you have custom settings in your settings.xml?
Hm seems to be a problem with the uploadArchives task.
I use gradle 1.4. I am building on windows/linux/ubuntu. I don’t have any settings.xml file (only used when building with maven I assume). No modification of the install task. I build with
Is there any workaround besides deleting each local .m2 on all slave each night? This is pretty much a breaking bug in our case since we rely 100% on integration with artifactory.
Any chance you can check if this is a regression from earlier behaviour, and in which version it broke? That information can be useful to other users, and may help track down a fix. Thanks.
If it works for you, the new ‘maven-publish’ plugin does not automatically install to ‘.m2’ when publishing. Although it is an incubating feature, it has good test coverage and works very well for many use cases.