Eclipse.settings / org.eclipse.wst.common.component file specification

Note. I asked this same question on the Eclipse Web Tools Project (WTP) forum , but unfortunately I didn’t get any answers. I hope someone from SO will have some idea.

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

I know there is an XSD, but I need more information, in particular, should the paths have a leading slash or not.

eg. 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 the Maven Eclipse plugin) generates a file, it will look like this (note the absence of a leading slash for the source-path attribute):

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

The latest version causes me problems when deploying to the WebSphere Liberty profile, and I want to find out where it should be fixed?

Should the Gradle plugin soon add a slash?

Or is a leading slash optional, and should WebSphere Liberty be more tolerant of differences in configuration?

Or both?

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

+8
eclipse eclipse-wtp gradle websphere-liberty gradle-eclipse
source share
1 answer

I also could not find a specific specification for this property, but I want to offer an observation / opinion.

It is reasonable to assume that the authors of server adapters are testing their implementation against the main manufacturer of these files (Eclipse). If Eclipse cannot omit the leading slash, it is reasonable to assume that providing a leading slash is a safe change.

In the same lines, it is reasonable to say that dropping the leading slash is potentially dangerous. Without a specification, to determine the correct behavior when working with a relative path, the server adapter will have to make an assumption about the base directory when calculating the absolute path. Obviously, the Tomcat adapter made a good guess, and the Liberty adapter either doesn't make a guess or a bad one.

0
source share

All Articles