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

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

“Faceted Project Problem (Java Version Mismatch)” error message

Did you check your Project Properties -> Project Facets panel? (From that post) A WTP project is composed of multiple units of functionality (known as facets). The Java facet version needs to always match the java compiler compliance level. The best way to change java level is to use the Project Facets properties panel as … Read more

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

Maven2: Missing artifact but jars are in place

There are a few other options apart from Project->Clean, some of which are more along the lines of turning it off and on again. Try right-clicking on the project and selecting Maven->Update Project Configuration. Disable then re-enable dependency management (right-click Maven->Disable Dependency Management then Maven->Enable Dependency Management Close the project and reopen it. Check that … Read more