cancel
Showing results for 
Search instead for 
Did you mean: 

Re: relative reference to a project in the workspace xml

Highlighted
New Contributor

Re: relative reference to a project in the workspace xml

Hi right now my workspace.xml file lists the project file location with an absolute file path like:


 
  /Users/somepath/my-project.xml


is it possible to use relative path?
i tried ./something and file://./something but didn't work

thanks
8 REPLIES 8
Highlighted
Super Contributor

Re: relative reference to a project in the workspace xml

Hi!

soapUI 2.5 has a "WorkspaceDir" project at the bottom left (when selecting the Workspace node in the navigator), if you set its value to ${workspaceDir}, project paths should be saved related to path of workspace file..

regards!

/Ole
eviware.com
Highlighted
New Contributor

Re: relative reference to a project in the workspace xml

thanks a lot!
actually the specific "workspace property" is called "projectRoot" and should be set as you suggested: ${workspaceDir}
Highlighted
Occasional Contributor

Re: relative reference to a project in the workspace xml

My Problem is a bit beyond the one of the OP (as I did discover that setting on my own  )

But what I need is relative paths in the project files themselves.

When I manually change the following settings to relative paths

.

file:/../../PATHTOWADL

and all other references to the WADL (although I'm not sure this is required)

everything still works fine.

On shutdown of SoapUI it then overwrites at least the . with an absolute path again, which is a bit of a nuisance.

Is there an option that enforces relative paths within the project files for the above mentioned paths ?

Background: Project files are required to work on different machines where the structure is identical but just the location is different.

kind regards

René
Highlighted
Super Contributor

Re: relative reference to a project in the workspace xml

Hi!

the "Resource Root" property on the Project level is for this; set it to ${projectDir} and all paths in the project (property files, wadl/wsdls, etc..) should be relative to the project file directory.

regards!

/Ole
eviware.com
Highlighted
Occasional Contributor

Re: relative reference to a project in the workspace xml

I have this actually set to $(projectDir), but still have some absolute references in the project file.

ABSOLUTEPATH TO OLD LOCATION HERE



file:/ABSOLUETPATHTOWSDLHERE

That threw my off, but it seems it is working anyway.
Highlighted
Super Contributor

Re: relative reference to a project in the workspace xml

Hi,

these are "internal" and shouldn't pose any problems.. let me know otherwise!

regards,

/ole
eviware.com
Highlighted
Contributor

Re: relative reference to a project in the workspace xml

Will they be a problem if the project is put under source code control?
If I use a "composite project" and I check in (say) settings.xml, won't my
"internal" absolute pathnames conflict with others?

Likewise, if I select certain filenames using a file dialog, all the pathnames are absolute.
How can I get them to be relative.

Finally, all the property browsers (project, endpoint, request, etc) present the file paths
as absolute. How do I know if they've been specified as relative?
Highlighted
Contributor

Re: relative reference to a project in the workspace xml

If configured correctly, the file dialog will create relative paths.

If configured correctly, the variables like ${projectDir} will be preserved.

Absolute pathnames are really absolute.

I needed to save my project after making changes. That's why I got confused.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors