You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dietrich Schulten <sc...@escalon.de> on 2005/11/10 20:19:45 UTC

[M2] eclipse-plugin: whitespace in servlet container entry breaks eclipse configuration

Hi,

mvn eclipse:eclipse always killed my servlet container configuration in
Eclipse, now I know why.

For wtp you must set the following plugin configurations:

<classpathContainers>
<java.lang.String>
org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache
Tomcat v5.0
</java.lang.String>
<java.lang.String>
  org.eclipse.jst.j2ee.internal.web.container/${artifactId}
</java.lang.String>
</classpathContainers>

Note the org.eclipse.jst.server.core.container. It ends with "Apache
Tomcat v5.0", a string containing whitespace.
If you put this into the xml and indent it nicely, the whitespace causes
problems. In my case, JEdit inserted a lot of whitespace before "Tomcat
v5.0", which constantly caused the server classpath container to break
in Eclipse.
I solved it by using a property <tomcat5>Apache Tomcat v5.0</tomcat5>,
so I can avoid the whitespace in the super-long classpath entry like so:
<java.lang.String>
org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/${tomcat5}
</java.lang.String>

Is this known to the eclipse plugin crew?

Regards,
Dietrich