Using mavenLocal() is very slow in Milestone 7

My company has a large body of code that we currently build with maven. I’m trying to introduce Gradle for some new components. However, as others have noticed using existing artifacts from the local Maven repository very slow. My (already slow) integration tests take >13 minutes to run with localMaven() and just over 3 minutes without it (3 minutes is bad enough!). For now my work around is to copy .jar files built by maven into src/main/libs and add these to the classpath in Gradle. This is fine for right now but

What is the recommended approach here? Is there an easy work around that I’m not thinking of? Migrating everything to Gradle all at once could be a considerable amount of work and very much out of scope for what I’m doing right now - on the other hand my alternative right now is to go back to Maven (which I also don’t want to do). What are other people doing?

I should have said:

  • I’m using milestone 7

  • The difference in timing (10mn) is reproducible based on whether mavenLocal() is included or not.


This was a regression introduced in Milestone 7 that has now been fixed.

The problem was that we were not using our custom POM parsing code for local repositories: ivy default behaviour is to try to resolve javadoc and source jars for every module. So not finding javadoc/source jars locally, ivy proceeded to search all available resolvers for these. This was not helped by caching.

This was fixed in a recent refactoring that consolidated our local and remote caches somewhat: they now share the same descriptor parsing infrastructure, including our custom no-source-or-javadoc-downloading pom parser.

Check out the suggested workarounds in the Milestone 7 migration guide.

If you’re willing to try out a recent nightly build you should find the performance much improved.

OK, great, thanks for the info. I will try the nightly and report back if it works ok.

thanks again,