Setup the production environment for Openflexo

In this article, you will learn how to get started in setting up a development environment for openflexo infrastructure, using eclipse IDE.

Configure your enviroment

As a preliminary phase, you should:

Optionaly and as an alternative to eclipse egit and m2e plugins, you should:

Import Openflexo Production Component

Get the openflexo-production tools first so that you can get the maven settings from the repository. On your Eclipse package explorer right click and select import in order to launch the import wizard.

ImportProject

The project can be imported from Openflexo team Git repository (https://github.com/openflexo-team/). In the wizard open Git folder and select Project from git, then click on next and select Clone URI. Again continue to the next step with next.

ImportFromGit CloneGitRepository

At this step you must to fill the URI of the openflexo-production repository which is https://github.com/openflexo-team/openflexo-production When you have filled the URI, the Host and Repository path are automatically setup, so just click on next.

OpenflexoGitProduction

The next wizard presents the different branches associated with openflexo-production project, select all branches and continue with next.

GitBranch

Now you have to set your local git directory as well as the initial branch. Select branch 0.2 and next.

OpenflexoGitProductionDest

Select import as general project and next and finish.

ImportAsGeneralProject

The corresponding project should be now visible on your Eclipse workspace.

Right click on it and select convert to maven project. Your project should have a “M” icon now.

ConvertToMavenProject

Right click again on your project and import -> Maven/Import Existing Maven Projects

ImportExistingMavenProject

Select all project and terminate with finish button.

SelectAllProjectsAndFinish

Contained projects should be visible in your workspace.

Import other components

In the same way you can import any other openflexo projects from the openflexo git repository. Project URIs are :

Branches to use are those (for 1.8.x infrastructure) :

Components Branch
OpenflexoProduction 0.4
Connie 1.3
Pamela 1.3
Gina 2.0
Diana 1.3
OpenflexoUtils 1.3
OpenflexoCore 1.8.0
TechnologyAdapters 1.8.0
OpenflexoModules 1.8.0
OpenflexoPackaging 1.8.0
Modellers (optional) 1.8.0

As an example with Connie which contains several branches, clone all branches.

OpenflexoGitConnie

Select the 1.3 as initial branch (1.3 is now the branch to use with 1.8.0 infrastructure).

OpenflexoGitConnieBranch OpenflexoGitConnieDest OpenflexoGitConnieImportProject OpenflexoGitConnieProjects

Finnaly your workspace should contains your set of imported projects.

AfterConnieImport

Updating the maven setting file

Depending on your setup environment, your maven project might requires some artifacts that cannot be found in your local repository. Openflexo provides an Artifactory which maintains all openflexo required artifacts. However Maven natively checks in his known repositories, so you have to update Maven’s settings.xml file to link to Openflexo Artifactory.

This can be done in different ways:

  • copy the settings.xml file presents in openflexo-production project to your home .m2 directory,
  • or merge it with your existing one.
  • or through Eclipse : Windows->Preference->Maven->User Settings.

Settings

If some projects contains errors, try to update maven dependencies, in Eclipse right click on your project and select Maven->Update Project:

UpdateProjectDependencies

Then confirm the project you want to invoke, select force update of snapshots release and validate.

UpdateProjectDependencies2

Run Openflexo packaging

To run from Eclipse an Openflexo packaging from openflexo-packaging project, create a new Eclise Run Configuration. Set the project to one of the existing packagings(flexomaintainer, flexosemantics, flexosemanticsplus…) And the main class org.openflexo.Flexo (depending on eclipse version, searching feature does not find org.openflexo.Flexo class, so you have to enter it manually)

RunFlexoMaintainer

Configure Push to Upstream

Open the git perspective, and right click on the project for which you want to push your commits, and select properties.

  • Set the autocrlf property to true
  • Set the push properties
  • Check the github url(should be ssh).

GitPushConfiguration

Notes