Specification for Eclipse .settings/org.eclipse.wst.common.component file
Asked Answered
H

1

8

Note: I asked this same question on the Eclipse Web Tools Project (WTP) forum but unfortunately haven't had any responses. I'm hoping someone on SO has some insight.

Is there a specification for the .settings/org.eclipse.wst.common.component Eclipse metadata file somewhere?

I know there is an XSD available but I want more information, specifically whether paths should have a leading slash or not.

E.g. when creating a new Dynamic Web Project in Eclipse, the org.eclipse.wst.common.component file will have an entry that looks something like this:

<wb-resource deploy-path="/" source-path="/src/main/webapp"/>

However if the Gradle Eclipse plugin (or Maven Eclipse plugin) generates the file it will look like this (notice the absence of the leading slash for the source-path attribute):

<wb-resource deploy-path="/" source-path="src/main/webapp"/>

The latter version causes trouble for me when deploying to WebSphere Liberty Profile and I want to figure out where it should be fixed?

Should the Gradle plugin rather add the leading slash?

Or is the leading slash optional and WebSphere Liberty must be more tolerant of configuration differences?

Or both?

For more information about my specific problem you can see the following posts:

Houseroom answered 22/7, 2014 at 19:50 Comment(0)
D
0

I was also unable to find a concrete specification for this property, but I want to offer an observation/opinion.

It is reasonable to assume that the server adapter authors are testing their implementation against the primary producer of these files (Eclipse). Unless there is some way for Eclipse to omit the leading slash, it should be reasonable to assume that providing the leading slash is a safe change.

Along the same lines, it is reasonable to say that omitting the leading slash is potentially unsafe. Without a specification to identify the proper behavior when dealing with a relative path, the server adapter would need to make an assumption about the base directory when computing the absolute path. Obviously the Tomcat adapter made a good assumption and the Liberty adapter either makes no assumption or a bad one.

Danby answered 29/7, 2014 at 22:30 Comment(1)
Thanks, I do agree. I'm still hoping someone can provide some official references though.Houseroom

© 2022 - 2024 — McMap. All rights reserved.