mvn eclipse:eclipse and m2e eclipse import – Errors in Web project – Richfaces showcase example – OutOfMemoryError

If you convert a maven project to eclipse using eclipse:eclipse, like richfaces showcase, and try to open it in eclipse, it might lead to ClassNotFound errors when you run the app in Tomcat. To fix that, delete the ‘.settings’ directory and install m2e plugin, and m2e webtools plugin (wtp). Then import the project into eclipse via maven. Then run the project in Tomcat server in Eclipse. If you run into “java.lang.OutOfMemoryError: PermGen space”, set permsize arguments for Tomcat as shown:
-XX:PermSize=64m -XX:MaxPermSize=128m

Advertisements

Could not calculate build plan – maven – m2e – eclipse – 2.4.3

M2e has a difficulty downloading the plugin shown in the error below:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3	pom.xml	/petclinic	line 1	Maven Build Problem

So, add this line to your pom.xml and build it through command line using ‘mvn install’. That will download the plugin and then try to build from eclipse. If you are still having issues, delete it from local repository and try again. The line to add is:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-resources-plugin</artifactId>
  <version>2.4.3</version>
</plugin>