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:
<profiles> <profile> <id>m2e</id> <!-- this profile is only activated when building in eclipse with m2e --> <activation> <property> <name>m2e.version</name> </property> </activation> <build> <pluginmanagement> <plugins> <!--this plugin's configuration is used to store eclipse m2e settings only. it has no influence on the maven build itself. --> <plugin> <groupid>org.eclipse.m2e</groupid> <artifactid>lifecycle-mapping</artifactid> <version>1.0.0</version> <configuration> <lifecyclemappingmetadata> <pluginexecutions> <pluginexecution> <pluginexecutionfilter> <groupid> org.apache.maven.plugins </groupid> <artifactid> maven-resources-plugin </artifactid> <versionrange> [1.0,) </versionrange> <goals> <goal>resources</goal> <goal>testresources</goal> </goals> </pluginexecutionfilter> <action> <ignore></ignore> </action> </pluginexecution> </pluginexecutions> </lifecyclemappingmetadata> </configuration> </plugin> </plugins> </pluginmanagement> </build> </profile> </profiles>
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 https://bugs.eclipse.org/bugs/enter_bug.cgi?product=m2e
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).
- Maven Incremental Compilation under Eclipse
- Maven compilation failes (but compilation under Eclipse is successful)
- how to work with maven under eclipse ("This compilation unit is not on the build path of a java project")
- Maven for Eclipse 1.5.0 plugin cannot be installed under Kepler
- Running JUnit tests with Maven under Eclipse
- GWT Maven Eclipse Plugin - Compilation Fails Due to Duplicate Class
- Maven compilation fails while eclipse is successful
- Multiple versions of the same multi-modules maven project under eclipse
- Debug Maven plugin under Eclipse
- Lines numbers inside the .class file differs from eclipse compilation and maven compilation
- Compilation differences between Intellij, Maven and Eclipse
- Hot deployment / incremental Java deployment using Maven & Eclipse & Glassfish 4?
- Debugging with Jetty Maven Plugin in Eclipse on multi module project: Compilation unit not on the build path
- Eclipse Maven build succeeds, but project still reports compilation errors
- GWT CodeServer incremental compilation issue with maven and the new packaging gwt-app and gwt-lib
- Eclipse Maven Local repository setup under %USERPROFILE%
- Maven runs JUnit tests in Eclipse but compilation fails from the command line
- Maven build shows compilation error but Eclipse doesn't
- Maven compilation fails when class becomes inner class (although Eclipse is good)?
- Maven Eclipse Plugin automatically creates maven folder under META-INF
- Eclipse Maven - Code Completion fails "This compilation unit is not on the build path of a Java project" and "Failed to Download Index" Error
- Error Updating Maven Project under eclipse
- Installed Eclipse 2020-06, but didn't get Maven Project under File->New Section
- How do I fix Eclipse project where maven dependencies are listed right under project but also under 'Maven Dependencies' folder?
- Different compilation behavior with type cast between eclipse and maven
- eclipse maven dependencies moved under classpath after maven update project
- GWT+ Maven and Eclipse compilation for more than one module
- Project build error with Maven under Eclipse : must specify an absolute path
- Compilation error in Eclipse in Kotlin + Java project, but project builds with Maven
More Query from same tag
- JRE Oracle Corporation/13 is not supported, advanced source lookup disabled on Eclipse 06-2019 and Java 13
- Two different Eclipse instances working in same path
- How can I change the package when using sdo-compiler of Eclipse MOXy
- Hibernate error reading data from database
- How can I add JDT as a Maven dependency?
- Pivotal tc Server v.3.1 won't start
- Eclipse 3.7 (indigo SR2) m2e (1.1) import Maven will not add source folders of generated sources
- Z3 and Eclipse IDE
- how to hide the [ "java.util.LinkedList", [
- Difference between simple PDE plugin dev and a RCP plugin dev
- pep8- conituation line under indented for visual indent
- I'm trying to find the highest number in a text file on my desktop using Java
- Supplied javaHome is not a valid folder in eclipse
- java.io.FileNotFoundException: Acess Denied using jexcel
- How to get a control on eclipse workspace or project through java program
- Messed up encoding in in Excel File by compiled maven program
- Returning a variable in a public void
- Eclipse live error checking disabled
- No response in Eclipse: File ->Import->Existing Projects into Workspace
- Java compiler error with generics
- SDK Manager unable to fetch content - Connection to https://dl-ssl.google.com refused
- Eclipse won't save because i have used alt code characters?
- selenium declared package doesn't match expected package
- Implement page scrolling (like hand tool in Acrobato Reader) in my Eclipse Plugin Editor
- Struggling to compile android apps in Eclipse with a min-sdk that is smaller than the target-sdk
- Configuring Blackberry Eclipse plugin for 4.70 or 5.0 components
- How to set the width of a master's section in MasterDetailsBlock
- Java Graphics Not Displaying In OS X
- How to connect to a database in Perl
- What is the best practice to transfer a class or an interface to another project or computer?