Development Environment Setup - universAAL/tools.eclipse-plugins GitHub Wiki

Table of Contents

Role and benefits of this tool

This tool aims at simplifying the setup of the development environment. It is shown automatically for every new Eclipse workspace and takes care of:

  • settings for maven
  • downloading source code
  • importing source code into Eclipse

Overview of functionality

The following screenshot shows the main screen of this tool:

The first option will adapt the maven settings file, that is usually located at C:\Users\myusername\.m2, to include the four universAAL repositories. If the settings.xml file exists, a backup is created (further backups will overwrite the old backup). If the file does not exist, a new one will be created. Most notably, the following content will be checked and added, if not existent:

<profiles>
   <profile>
      <activation>
         <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
         <repository>
            <id>uaal</id>
            <name>universAAL Repositories</name>
            <url>http://depot.universaal.org/maven-repo/releases/</url>
            <snapshots>
               <enabled>false</enabled>
            </snapshots>
         </repository>
         <repository>
            <id>uaal-snapshots</id>
            <name>universAAL Snapshot Repositories</name>
            <url>http://depot.universaal.org/maven-repo/snapshots/</url>
            <releases>
               <enabled>false</enabled>
            </releases>
         </repository>
         <repository>
            <id>uaal-thirdparty</id>
            <name>universAAL ThirdParty Repositories</name>
            <url>http://depot.universaal.org/maven-repo/thirdparty/</url>
         </repository>
         <repository>
            <id>uaal-thirdparty-snapshots</id>
            <name>universAAL ThirdParty Repositories</name>
            <url>http://depot.universaal.org/maven-repo/thirdparty-snapshots/</url>
            <releases>
               <enabled>false</enabled>
            </releases>
         </repository>
      </repositories>
   </profile>
</profiles>

If you want to do this step manually, you can find an example file to see how to do it (or copy it directly) in https://github.com/universAAL/maven/tree/master/maven-repo-settings/settings.xml.

The second option will download the universAAL source code and import it into Eclipse, creating appropriate working sets. The default directory is the current Eclipse workspace.

Note: If you select a folder different from the current Eclipse workspace and you intend to use the PaxRunner Distribution then you must manually copy (or move) the folder rundir into your workspace.

Depending on the way your are starting universAAL (Karaf or PaxRunner) you must download one of the distributions. If you choose to use a different container (like Android), these distributions are not needed, although they might help in getting used to universAAL. Additionally, we recommend to download the samples repository.

The last option lets you decide wether to use the platform aggregator directory structure. The universAAL code is separated into multiple git repositories. Each repository can either be downloaded (in git terms: cloned) as a separate repository, or you can download the platform aggregator, which contains all the other repositories as git submodules. The organisation as git submodules makes some things easier, but also some other things more difficult. If you do not wish to make changes to the base code and just want to take a look, there should not be much difference. The following screenshots show the result of downloading source repositories with (left) and without (right) using the platform aggregator project.

Known remaining limitations and problems

Dialog "Configure Working Sets"

During the import of the source code into Eclipse, the following dialog appears:

Just click "OK".

Errors in Package Explorer

When the sources are imported, there are some projects showing errors, as shown in the following image for the project "mw.broker.api.core".

Unfortunately, this is a general problem in Eclipse, that especially appears when multiple projects are imported at once. This can be fixed by a mixture of

  • Refresh (F5)
  • Right-click on the project and select "Maven -> Update Project..."
Until the errors are all gone. Please note, that for the latest revision (the master branch), there might even be real errors. In the rare case when this happens, the errors are typically fixed very soon and you can pull the fix from the git repository.

Most of the projects depend on other projects. When a project is refreshed/updated and the errors disappear, then all the projects that depend on it might be automatically rebuild (and this may also make their errors disappear). If this does not happen, the depending projects also need to be refreshed/updated. To speed up this process, it is recommended (but not required) that you refresh the projects in a certain order:

  • universAAL Maven
  • universAAL Integration Tests
  • universAAL Middleware Config
  • universAAL Middleware Core
  • universAAL Middleware OSGi
  • universAAL Ontology
  • universAAL Utility Libraries
  • universAAL Context
  • universAAL LDDI Common Components
  • universAAL LDDI *
  • universAAL Security
  • universAAL Remote Interoperability
  • universAAL Service
  • universAAL User Interaction
  • universAAL Samples
  • universAAL Runtime Tools

Plugin execution not covered by lifecycle configuration

The maven plugins may still show some errors, especially the following:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:2.5.1:descriptor (execution: default-descriptor, phase: process-classes)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:2.5.1:helpmojo (execution: generated-helpmojo, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:2.6:descriptor (execution: default-descriptor, phase: process-classes)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (execution: default-descriptor, phase: process-classes)

Open the "Problems" view, select all projects with this error, right-click, and select "Quick Fix":

A new dialog is shown. Select the propsed fix "Discover new m2e connectors" and click "Finish".

Eclipse will now show a list of connectors to fix this problem. Follow the instructions and restart Eclipse, when prompted.

⚠️ **GitHub.com Fallback** ⚠️