I have recently switched a project build from ant to maven and m2e, this was working okay, now of all of sudden every time I save a file the building workspace is taking up a lot of time about 5 to 10 seconds, it used to be that it would take no time I never even noticed eclipse do anything when i just saved a file.
I am guessing that m2e is doing something during the incremental build that is slowing things, down. I have no idea what is causing the slowdown. I am looking for things I can try to figure the cause of this slowdown.
What options or steps I can take to help me track down the cause of this problem.
UPDATE: This is a multi module project with 17 modules 16 jars and one war. This is arranged in the standard maven hierarchy.
UPDATE: Project clean all takes about 30 to 85 seconds of wall clock time on very fast machine. the web project by itself takes about 1 second to build, I can't tell if the problem is in m2e or somewhere else.
UPDATE: Saving a .java file causes a workspace rebuild that can be anywhere from 0 to 15 seconds long, in an unpredictable way.
UPDATE: I am using the m2e-wtp extension with workspace artifact resolution.
UPDATE: Some output from the log file for m2e
2012-12-28 17:10:43,907 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-enforcer-plugin:1.2:enforce (execution: enforce-rules, phase: validate)
2012-12-28 17:10:43,907 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: ignore
2012-12-28 17:10:43,907 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: pl.project13.maven:git-commit-id-plugin:2.1.2:revision (execution: default, phase: initialize)
2012-12-28 17:10:43,907 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: ignore
2012-12-28 17:10:43,907 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-resources-plugin:2.6:resources (execution: default-resources, phase: process-resources)
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: execute
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile)
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.eclipse.m2e.jdt.javaConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.jdt.internal.JavaProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.webfragment.configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.WebFragmentProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.utility.configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.UtilityProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.java.unsupportedDependencyTypeConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.UnsupportedDependencyTypeProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: com.springsource.sts.ide.maven.core.springProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.springframework.ide.eclipse.maven.internal.core.SpringProjectConfigurator
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-resources-plugin:2.6:testResources (execution: default-testResources, phase: process-test-resources)
2012-12-28 17:10:43,908 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: execute
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile)
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.eclipse.m2e.jdt.javaConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.jdt.internal.JavaProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.webfragment.configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.WebFragmentProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.utility.configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.UtilityProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.java.unsupportedDependencyTypeConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.UnsupportedDependencyTypeProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: com.springsource.sts.ide.maven.core.springProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.springframework.ide.eclipse.maven.internal.core.SpringProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (execution: default-test, phase: test)
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-war-plugin:2.3:war (execution: default-war, phase: package)
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.configurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.WTPProjectConfigurator
2012-12-28 17:10:43,909 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Build participant: org.eclipse.m2e.wtp.internal.filtering.ResourceFilteringBuildParticipant
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.warmanifest.configurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.internal.mavenarchiver.WarMavenArchiverConfigurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Build participant: org.sonatype.m2e.mavenarchiver.internal.AbstractMavenArchiverConfigurator$1
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Action: configurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator id: org.maven.ide.eclipse.configuration.wtp.overlay.configurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Project configurator: org.eclipse.m2e.wtp.OverlayConfigurator
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-install-plugin:2.4:install (execution: default-install, phase: install)
2012-12-28 17:10:43,910 [Worker-3] DEBUG o.e.m.c.p.c.AbstractCustomizableLifecycleMapping - Mojo execution key: org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (execution: default-deploy, phase: deploy)
Update: This turned out to be the spring tooling in eclipse STS being buggy and slow, getting rid of the spring project natures fixed the problem. Seems that the spring source team is aware of these issues are working on fixes, see my answer below for some links.
After much head scratching it turned out Spring Tool Suite 3.1 was the problem, Once I removed the spring nature from the projects workspace build times went from 30 - 90 seconds down to less 3 seconds.
I found that .metadata/.plugins/org.eclipse.m2e.logback.configuration/
contains the configuration file for m2e logging logback.1.2.0.20120903-1050.xml
when I changed it to print out debug information
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
<logger name="com.ning.http.client" level="DEBUG" />
I could get output in the .metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log
this output has timestamps and it appears that m2e is running a more than once when .java file gets.
I have not been able to figure out how to use the info in the log file to solve my problem and I am pretty close on giving up on m2e. I am posting this info here in case it might be useful to some one else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With