To install the application server, IDE, and client, Java version 8 or later must first be installed on the computer.
For the application server to work, it must have access to the PostgreSQL database management server of at least version 9.6. The PostgreSQL server must accept connections using password authentication by the md5 or trust method. You can configure authorization by editing the pg_hba.conf file, as described in the PostgreSQL documentation.
To install the plug-in, Intellij IDEA version 2020.1 or higher must be installed on the computer.
When creating a new lsFusion project click the Download button opposed to the lsFusion library: IDEA automatically downloads the JAR file of the latest (non-beta) version of the lsFusion server from the central server and installs this file as a dependency of this project (or rather, as its only module: File → Project Structure → Modules → project name → Dependencies tab). Also, if necessary, you can download another version of the server (different from the latest) or select a previously downloaded server JAR file on the local disk.
Note that IDEA remembers the downloaded/specified application server file in its settings and automatically sets it when creating other lsFusion projects.
For an existing maven project, server installation and loading can (and should) be done differently (see below).
Register in pom.xml or as parent lsfusion.platform.build:logics, or as dependency lsfusion.platform:server (at present these artifacts are not in the central repository, and so the path to the lsFusion repository must be specified additionally). For example:
<repositories> <repository> <id>lsfusion</id> <name>lsFusion Public Repository</name> <url>http://repo.lsfusion.org</url> </repository> </repositories> <parent> <groupId>lsfusion.platform.build</groupId> <artifactId>logics</artifactId> <version>2.0</version> </parent>
The first option (with parent) is good in that:
Maven will automatically configure an uber-jar assembly (i.e., a single file containing all the project files). You can start this assembly using maven profile "assemble" - when this profile is activated, a JAR file with an "assembly" postfix is additionally generated in the package phase, containing not only the project files, but also the files of all the project dependencies, including files of the application server itself. However, in cases where the application server is installed separately from the application itself (for example, using automatic installation), including the application server in the resulting uber-jar is undesirable. Therefore, in addition to "assemble," the platform also supports the "noserver" maven profile, which when activated (along with "assemble"), at creation of a JAR file with the "assembly" postfix the application server files will not be included (example command: mvn package assemble noserver).
In the second case, all of the above must be manually configured directly by the developer.
As for other projects not created using the operation for creating a new lsFusion project, for a maven project you must manually create a settings file and a startup configuration (or, if the platform needs to be loaded as a library, use a special Spring bean)
If working with a large project, and metacodes are actively being used in it (such as ERP), it is recommended that in the IDEA startup parameters (idea.exe.vmoptions or idea64.exe.vmoptions) the Xmx be increased to at least 2gb.