Resolve Dependencies in Workspace

When resolving the modules’ dependencies, if the project of a dependency is imported and opened in the same workspace as the module, the project is directly used for compilation and execution instead of using the dependency, provided that the dependency’s project has the same version as the one required by the module.

For example, suppose that the workspace contains a module myApp and its dependency mylib :

A module and its dependency opened in the same workspace

A module and its dependency opened in the same workspace

If the mylib project’s version is 1.0.0, it is used for compilation and execution. Otherwise the published artifact is downloaded from the artifact repository.

To avoid a dependency to be resolved in the workspace, you can close the corresponding project or remove it from the workspace.

Warning

If you open, close, import or remove a project, you must refresh the dependency resolution of other previously imported projects by clicking on the Resolve All button :

Resolve all the workspace projects

Resolve all the workspace projects

Resolve Foundation Libraries in Workspace

A Foundation Library is composed of :

  • An API project that contains Java classes, methods and fields used at compile time with their associated Javadoc,

  • An Implementation project that contains the runtime code executed by the Platform and Low Level C header files

Beside Foundation Library projects, there is usually a Mock project that contains the implementation of native methods for simulation.

Note

To learn how to setup a Foundation Library, please consult the How-to available on https://github.com/MicroEJ/How-To/tree/master/FoundationLibrary-Get-Started.

When the API is set as a dependency, the Implementation project is automatically used at runtime if it is opened in the workspace.

If a Mock project or a Front Panel project is also opened in the workspace, it is automatically used for execution on Simulator.

Note

When opened in the workspace, Foundation Library Implementation projects, Mock projects and Front Panel projects are loaded, regardless of their version, prior to the ones provided by the Platform (if any).

To avoid the use of an Implementation project, a Mock project or a Front Panel project, uncheck the Resolve Foundation Library in workspace option in Window > Preferences > MicroEJ > Settings.

Resolve Foundation Library in workspace

Resolve Foundation Library in workspace

Resolve Front Panel in Workspace

A Front Panel is a “mock” of the control panel of the device. The Front Panel generates a graphical representation of the device, and is displayed in a window on the user’s development machine when the application is executed in the Simulator.

Note

To learn more about Front Panels, consult the Front Panel section.

When a Front Panel project is opened in the workspace, it is automatically used at runtime when launching the Simulator.

Note

This feature requires SDK version 5.7.0 or higher and Architecture version 8.0 or higher.

If the workspace contains several Front Panel projects, they are all automatically used by the Simulator, which can very probably causes issues. You can select the Front Panel you want to use by closing all the other Front Panel projects.

Also, a Front Panel project can contain several Front Panel descriptor files. Refer to the Multiple Front Panel Files section to know how to select the file you want to use.