- java extension pack
- language support for java(TM) by Red Hat
- Maven for Java
- Java Test Runner
- Project Manager for Java
- Debugger for Java
Create the folder avi-msgconverter
, that is the base folder. In folder avi-msgconverter
, clone the following projects:
- [email protected]:opengeoweb/avi-msgconverter/fmi-avi-messageconverter.git
- [email protected]:opengeoweb/avi-msgconverter/fmi-avi-messageconverter-tac.git
So your folder structure looks like:
avi-msgconverter
- fmi-avi-messageconverter
- fmi-avi-messageconverter-tac
It is very important that you set the right runtime in vscode, otherwise java versions get mixed up. It should be set to 1.8, and it should generate class files with version 52.
To set the right JRE in vscode: bring up the Command Palette (Ctrl+Shift+P)
and use the command Java: Configure Java Runtime. Follow the instructions (download and install OpenJDK 8). The file has to be unpacked, preferably into the main folder avi-msgconverter.
Your folder structure should look like:
├── ~/code/gitlab/opengeoweb/avi-msgconverter
├── fmi-avi-messageconverter
├── fmi-avi-messageconverter-tac
├── jdk8u275-b01
From the avi-msgconverter you can do:
export JAVA_HOME=`pwd`/jdk8u275-b01
export PATH=${JAVA_HOME}/bin:${PATH}
Check with mvn --version
to see if indeed java 1.8 is listed.
- Stop vscode, and start vscode with this correct JAVA_HOME environmnet.
- Open the fmi-avi-messageconverter
- Click on maven, and press refresh.
- Then bring up the Command Palette
(Ctrl+Shift+P)
, selectJava: Configure Java Runtime
and set the Java Runtime to 1.8 under theMaven/Gradle Projects
section - In vscode, save the workspace and close vscode again. Next is to install dependencies using mvn, without the maven plugin from vscode interfering.
cd fmi-avi-messageconverter
rm -rf ~/.m2/
rm -rf target
mvn clean install -U -P fmidev -s ./fmidev-settings.xml
Start vscode in avi-msgconverter and add both subfolders to your workspace. Thats it! You can now start developing and run the tests from vscode.