From ee002e2685a02ef7638f53aac81b2771780f2c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kruli=C5=A1?= Date: Fri, 4 Feb 2022 02:55:20 +0100 Subject: [PATCH] Updated Installation (markdown) --- Installation.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Installation.md b/Installation.md index cf38be0..ba03c4f 100644 --- a/Installation.md +++ b/Installation.md @@ -554,10 +554,36 @@ Click on `Edit` button on the right, scroll down to *Supplementary files* box and upload the compiled `javarun.class`. +#### Java Maven (for larger projects) + +This environment requires OpenJDK to be installed (see Java environment), but +you do not have to have Java environment itself enabled in ReCodEx. + +Install Apache Maven manually by extracting `tar.gz` binaries into `/opt/maven`. +Most manuals will have you install Maven into something like `/opt/apache-maven-3.8.4`, +but the version in the path would make it difficult for upgrades (and the pipelines +are already configured for `/opt/maven`). + +Maven requires cache for dependencies pre-built, since the sandbox is not allowed +to modify it and it would be tedious to reload everything with every project. +Checkout/download [utility for building `.m2` cache](https://github.com/ReCodEx/utils/tree/master/maven-m2-builder). +There is a reference project (hello world), which is built and executed by the +`build.sh` script. It populates `.m2` directory and then moves it to `/opt/maven-repo` +(`sudo` is used for moving, so the current user must be a sudoer). The `pom.xml` of the reference +project contains some dependencies we find useful, feel free to add your own +(note that you need to edit the `pom.xml.template`). + +Finally, add the following variables to `environ-variable` list in the worker configuration: +``` +MAVEN_HOME: /opt/maven +M2_HOME: /opt/maven-repo +``` + + #### Kotlin -This environment requires Java runtime to be installed as well (please do before -venturing forth). +This environment requires OpenJDK to be installed (see Java environment), but +you do not have to have Java environment itself enabled in ReCodEx. Download latest Kotlin compiler release from [GitHub](https://github.com/JetBrains/kotlin) and unzip it to `/opt/kotlin`.