Platform Selection¶

Building or running a Test Suite on an application module requires a MicroEJ Platform.

There are 4 different ways to provide a MicroEJ Platform for a module project:

• Set the build option platform-loader.target.platform.file to the path of a MicroEJ Platform file (.zip, .jpf or .vde).

• Set the build option platform-loader.target.platform.dir to the path of the source folder of an already imported Source Platform.

• Declare a module dependency with the conf platform:

<dependency org="myorg" name="myname" rev="1.0.0" conf="platform->default" transitive="false"/>

• Copy a MicroEJ Platform file to the dropins folder. The default dropins folder location is [module_project_dir]/dropins. It can be changed using the build option platform-loader.target.platform.dropins.

At least 1 of these 4 ways is required to build an application with a platform. If several ways are used, the following rules are applied:

• If platform-loader.target.platform.file or platform-loader.target.platform.dir is set, the other options are ignored.
• If the the module project defined several platforms, the build fails. For example the following cases are not allowed:
• Setting a platform with the option platform-loader.target.platform.file and another one with the option platform-loader.target.platform.dir
• Declaring a platform as a dependency and adding a platform in the dropins folder
• Declaring 2 platforms as Dependencies
• Adding 2 platforms in the dropins folder

Refer to the Platform Loader section for a complete list of options.