As you are already creating a String Substitution variable, through Run Debug->String Substitution in Eclipse Preferences, to deal with separate paths, you could either:
- Create a variable, e.g.
branch_loc
, with a value of ${workspace_loc:/my-project-dev-branch}
- If the paths only differ slightly, e.g. by branch name, then you could create a variable
branch
with a value, e.g. dev
, and then create branch_loc
with ${workspace_loc}\${branch}
Then use ${branch_loc}
for you Maven base directory.
It would be better to have all branches use the same path, which git and mercurial allow you to do. Then you could use ${project_loc}
for your Maven base directory. For project_loc
if you specify the project name of your project, e.g. ${project_loc:MY_PROJECT_NAME}
, then it doesn't require you to select the project in order to work.
If you right click on the project and then select Properties, you can see what ${project_path}
will resolve to by looking at path and what ${project_loc}
will resolve to by looking at location.