Accepted answer

the incremental compiler in eclipse (ecj, used by the jdt) totally overrides the compiler used by command line maven builds. any maven-compiler-plugin or javac issue should be discarded as irrelevant. i would expect m2e/maven to have no significant impact on a single project workspace, as big as it is. obviously since you're seeing the opposite behavior, something is apparently slowing down the maven builder.

since you use jsp and js files, my guess this is a war project. if you're using the eclipse java ee distribution, one thing you can try is to disable the m2e-wtp integration, see if it makes any difference. go to preferences > maven > java ee integration and uncheck enable java ee configuration.

if that doesn't help (or doesn't apply to your set up), another thing you could try would be to disable maven resource processing during incremental builds. in your pom.xml, try adding:

    <!-- this profile is only activated when building in eclipse with m2e -->
          <!--this plugin's configuration is used to store eclipse m2e settings 
            only. it has no influence on the maven build itself. -->

there's a chance it might break something else, but at least that should help determine whether resource processing is the culprit here.

anything else will require a deeper analysis, i suggest you open a ticket to


disable automatic build is the only option you have. just build when you are interested in the artifacts.

you did not say what goals you are calling maven with. maybe it would already be enough if you do not run all tests using -dskiptests (or even not compile them by using -dmaven.test.skip=true), or if not willing to skip those introduce profiles to run just the necessary tests.

since you are telling it's a legacy project i suspect that changing the project structure into a multi-module maven project is out of scope. you can then try if you can speed up using parallel builds (using -t 4 (4 threads) or -t 2c (2 threads per core).

Related Query

More Query from same tag