m2Eclipse plugin: What does ‘Resolve Workspace Artifacts’ do?

Assume you have two or more projects in your workspace e.g. project1, project2 and so on. If project1 is dependent on project2 and project3, you just need to define the dependency of project1 on project2 and project3. By enabling Resolve Workspace Artifacts, m2Eclipse will auto-build the SNAPSHOT JAR of project2 and project3 and add in … Read more

Eclipse JRE System Library [J2SE-1.5]

The problem is not with Eclipse, but with the projects you’re importing. m2e will set the project’s JRE to match the maven project. The POM specifies the JRE version, and this is defaulted to 1.5 if not present. You need this in the POM: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> … Read more

How to eliminate the “maven-enforcer-plugin (goal “enforce”) is ignored by m2e” warning by eclipse?

The eclipse maven plugin runs a projects pom.xml file in order figure out how the maven project is configured and translate the maven pom.xml configuration into an eclipse configuration. A pom.xml can reference an arbitrary number of maven plugins and each of those plugins has the potential to leak memory, or do things that are … Read more

Cleaning Maven m2e .cache directory

In contrast to the other answers, make sure to keep .m2/*.xml (your settings) and .m2/repository (not strictly necessary to keep, but Maven will have to download half the Internet again). Now, as for that .cache folder: if you open Eclipse, M2Eclipse will sometimes run a job akin to “Downloading repository indexes”. These indexes allow you … Read more

What is Eclipse doing when it says that it’s updating indexes?

This is a general step that happens when m2e/m2eclipse (Maven integration for Eclipse) is installed, whether projects are actively using it or not. This step can be disabled through the Eclipse preferences: Window / Preferences / Maven / “Download repository index updates on startup”. This option is on the main “Maven” preference page (not a … Read more

m2e lifecycle-mapping not found

The org.eclipse.m2e:lifecycle-mapping plugin doesn’t exist actually. It should be used from the <build><pluginManagement> section of your pom.xml. That way, it’s not resolved by Maven but can be read by m2e. But a more practical solution to your problem would be to install the m2e build-helper connector in eclipse. You can install it from the Window … Read more

get rid of POM not found warning for org.eclipse.m2e:lifecycle-mapping

My team works around this problem by wrapping the relevant configuration in a profile: <profile> <id>only-eclipse</id> <activation> <property> <name>m2e.version</name> </property> </activation> <build> <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> … </configuration> </plugin> </plugins> </pluginManagement> </build> </profile>

m2e-wtp error: /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF (No such file or directory)

Eclipse versions earlier than Luna I’m not certain if this is the best thing to do but I followed the instructions mentioned here with regards to getting rid of the auto generated web resources folder and this seems to also resolve the issue with the missing MANIFEST.MF: on your project only : right-click on the … Read more

Compiler error “archive for required library could not be read” – Spring Tool Suite

Indeed IDEs often cache the local repository (Eclipse does something similar, and I have to relaunch Eclipse). One ugly maven behavior you might encounter is that if you declare a dependency before you actually install it, maven will create an empty version of the missing dependency (folder with metadata but no jar), and you will … Read more