Eclipse .classpath bug with mvn eclipse:eclipse and wtp tomcat server, lib not deployed
Par Quentin Ambard le dimanche, janvier 16 2011, 22:59 - Divers - Lien permanent
I recently had an issue with eclipse wtp server configuration.
My libs wasn't deployed, and the context wasn't corretly loaded.
(I used maven eclipse plugin to generate my configuration files :
- eclipse:configure-workspace => add the classpath variable M2_REPO to Eclipse which points to your local repository and optional to configure other workspace features.
- eclipse:eclipse => generates the Eclipse configuration files.
The solution was to manually update my .classpath file, which was wrong.
Here is a correct version of the file, ready for a very "classic" web app !
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry kind="src" output="target/classes" path="src/main/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> <classpathentry kind="output" path="target/classes"/> </classpath>
Commentaires
Thank you for the good writeup. It actually used to be a entertainment account it. Look complex to more added agreeable from you! However, how could we be in contact?