Version 11 (modified by welberge, 7 years ago) (diff)


Using AsapRealizer in an Eclipse project

STEP 1: Setting up project structure

First, you need to set up projects in Eclipse for the various modules that you want to compile. If you use the source releases from AsapRealizer, you need to set up git in Eclipse, check out the modules from the repository, and make them into an Eclipse project.

  1. Install  Python and make sure the python binary is on your path
  2. (Optional, if you'd like to use git within eclipse) Get the git plugin from and install it
  3. Check out the source repository by hand (using commandline git SmartGit, TortoiseGit, or any tool of your choice). Typical directory setup when you have checked out the Git:

STEP 2: Set build paths to include dependent libraries

you need the right versions (for your machine and operating system) of all dependent libraries in the project classpath; AsapRealizer contains ant scripts to take care of this.

  1. First, collect right versions of libraries using our ant scripts
    1. command prompt in HmiDemo/MyFirstProject
    2. now use resolve the libraries for your project, using ant resolve, ant compile list, etc (see also
    3. Now, all required libraries, in the version for your OS and machine, are in HmiDemo/MyFirstProject/lib

STEP 3: Generate eclipse project files

  1. Second, create the eclipse project files, again using an ant script
    1. Sane people: ant eclipseproject
    2. Herwin: ant eclipsesourceproject

The first will create an independent eclipse project file with dependencies on the jar files that were resolved in the lib directory. The second will create an eclipse project file in which the rebuild.list is linked to other eclipse projects. This option is only useful if you are very deeply involved in the development of AsapRealizer.

STEP 4: Opening the project in eclipse

The generated project file can now be opened in eclipse, using "file->import->general->existing projects" into workspace. Alternatively, if you'd like to use git in eclipse, open the Git Repositories view, right-click on the working directory of the git repository of your project, select import project, select the directory of your project and click finish.

STEP 5: Adding/changing library dependencies, resources, etc.

It is strongly recommended that you do not manually edit your project configuration in eclipse, but instead regenerate the project using step 2 whenever library dependencies change and/or new resource dependencies are added. This way your project will also work compile and run in ant and others can easily reconstruct eclipse project files for it. After recreating the project file, you can simply refresh the project in eclipse. You can also easily switch between resolved alpha dependencies and release dependencies in this way. ant eclipseproject/eclipsesourceproject will automatically put resources specified in resource.path and test.resource.path in the project's on the project's classpath.

STEP 6: set a few virtual machine variables

For running your project, you need to set a few additional settings in "run configuration" dialog for your main class

  1. tab "arguments", VM arguments, add
  2. add -Dlogback.configurationFile=LogbackConfigs/warnlogstdout.xml or any other config file to specify your logging (see ProgrammingGuidelines)
  3. Add a relative path from you project directory to the proejct root: -Dshared.project.root="../.."

User contributions


If you need more details, have additional suggestions or find any errors in this documentation: post a reply to this message.