Using Arena in Xtend and other languages

Arena is built in a JDK environment, so you can use it in a wide variety of languages:

  • Java 8 or higher
  • Xtend
  • Scala
  • Groovy
  • Kotlin

Maven Repositories

Arena is released in Maven Central, so you don't have to configure any repository in your maven's settings file.

Arena Artifacts for common languages

Your UI project must depend on one of the Arena implementations. Currently the stable implementation is arena-jface, based on eclipse swt+jface:

<dependency>
        <groupId>org.uqbar-project</groupId>
        <artifactId>arena-jface</artifactId>
        <version>3.6.3</version>
</dependency>

Your domain project must depend on uqbar-domain:

<dependency>
        <groupId>org.uqbar-project</groupId>
        <artifactId>uqbar-domain</artifactId>
        <version>3.6.3</version>
</dependency>

You can check here available versions of these components.

If you have a single project which contains the ui along with the domain, then you just need to include the dependency to arena-jface only.

This is not the recommended way to do it since you'll be coupling model with UI in terms of artifacts.

Using Arena with Xtend

If you are in Xtend, there is a parent pom you can use:

<parent>
  <groupId>org.uqbar-project</groupId>
  <artifactId>arena-xtend-parent</artifactId>
  <version>3.6.3</version>
</parent>

In order to use <=> (spaceship operator) to define bindings you must add this import to your class definition:

import static extension org.uqbar.arena.xtend.ArenaXtendExtensions.*

Launcher configuration

You must define a launcher configuration to run Arena applications.

Run > Run Configurations... > Java Application > New launch configuration, Arguments tab... and fill VM Arguments with

-Djava.system.class.loader=org.uqbar.apo.APOClassLoader