Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a generic launch configuration with Eclipse?

I have a run configuration in my eclipse. In my project we have two branches : DEV and STABLE. I would like to create one run configuration for building my project whatever branch it is on.

For now, when I set Base directory with one of those two variables : ${project_path}, ${build_project}, I face this error :

Base directory doesn't exist or can't be read.

This works : ${workspace_loc:/my-project-dev-branch} but is tied to a particular branch. I must duplicate this configuration for building the stable branch.

  • So, how can I view the actual content of ${project_path}, ${build_project} ?
  • Or which variable should I use to get this result : ${workspace_loc:/${eclipse_variable_with_project_name}} ?
like image 280
Stephan Avatar asked Apr 02 '13 11:04

Stephan


People also ask

What is a launch configuration file in Eclipse?

In Eclipse, a launch configuration contains all the information to run or debug a program. A DS-5 debug launch configuration typically describes the target to connect to, the communication protocol or probe to use, the application to load on the target, and debug information to load in the debugger.

Where does Eclipse store launch configurations?

These configrations are located in . metadata/. plugins/org. eclipse.


1 Answers

I'm not sure I follow how your branches are represented within the workspace, but

  • ${project_path} represents a path relative to your workspace
  • ${build_project} will only be set during an actual build (not during an execution of your program)

Based on your description you want to be using ${project_loc} instead.

Nota: The project MUST be selected in the perspective project before launching the run configuration. Otherwise, you will get a message like in the screenshot below :

picture of Alert box popup with the text 'Launching MY RUN CONFIGURATION' has encountered a problem.  Variable references empty selection: ${project_loc}'

like image 109
Perception Avatar answered Oct 15 '22 10:10

Perception