Missing Maven dependencies in Eclipse project

Well, I tried everything posted here, unfortunately nothings works in my case. So, trying different combinations I came out with this one that solved my problem. 1) Open the .classpath file at the root of your eclipse’s project. 2) Insert the following entry to the file: <classpathentry kind=”con” path=”org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER”> <attributes> <attribute name=”maven.pomderived” value=”true”/> <attribute name=”org.eclipse.jst.component.nondependency” … Read more

What causes imported Maven project in Eclipse to use Java 1.5 instead of Java 1.6 by default and how can I ensure it doesn’t?

The m2eclipse plugin doesn’t use Eclipse defaults, the m2eclipse plugin derives the settings from the POM. So if you want a Maven project to be configured to use Java 1.6 settings when imported under Eclipse, configure the maven-compiler-plugin appropriately, as I already suggested: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> If your project … Read more

M2E and having maven generated source folders as eclipse source folders

You need to attach the source directory with the build-helper-plugin. Like so: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/java/</source> </sources> </configuration> </execution> </executions> </plugin> You will also need to: Install the “Apt M2E Connector” from the Eclipse Marketplace. To do so click the error in the Overview tab of … Read more