Are there tools that will profile the Maven build process itself so that I can see where the build is spending most time?
We're having issues at work with respect to Maven 3.0.3 and 3.0b1. Our project builds much faster under 3.0b1 (3m30s) compared to 3.0.3 (9m00s). With 3.0b1 the build is approximately 63% faster (if my math is right).
I tried searching for performance comparisons and performance issues regarding Maven 3, but was unable to find anything.
UPDATE
I did some more research by looking at the maven sources and this is what I found out:
While using jconsole, I saw that most of the time (in 3.0.3) is spent inside DefaultProjectDependenciesResolver.java. So I downloaded the source to both 3.0b1 and 3.0.3 to see what's happening. I noticed that in 3.0.3 there are two versions of the class. One is in org.apache.maven.project, while the other is in org.apache.maven. It also appears that in 3.0.3, the former is being used. While stepping through the code, I saw that bulk of the time is spent when it reaches this statement:
node = repoSystem.collectDependencies( session, collect ).getRoot();
In 3.0b1, the code does:
ArtifactResolutionResult result = repositorySystem.resolve( request );
I also noticed that respositorySystem is of the type RepositorySystem, and the concrete implementation is LegacyRepositorySystem. I'm assuming that this was being used while the Maven 3 was in beta until the new implementation was created? Going back to 3.0.3, the collectDependencies method lives in DefaultRepositorySystem.java which is part of org.sonatype.aether.impl.internal. This eventually calls collectDependencies inside DefaultDependencyCollector.java which is also part of org.sonatype.aether.impl.inte