We recognize that there are different ways to set up a workspace and different tools that may be chosen. This is just one way to set things up.
Suggested Directory Structure
NOTE: You may have different versions of eclipse and java.
onap
.m2
apache-maven-3.3.9
camunda-modeler
eclipse-java-neon-3-linux-gtk-x86_64
jdk1.8.0_131
workspace
SO
docker-config
libs
so
Java
Download the latest Java 8 SE Development Kit from Oracle. Select a Linux x64 package.
Unpack it.
Maven
Maven Setup
Download the Apache Maven 3.3.9 binary. NOTE: 3.3.9 is the recommended version, even though much higher versions are available.
Unpack it.
Create an .m2
directory for maven and put settings.xml in it. Edit the local repository path in settings.xml to make it correct for your environment. Everything else should be OK.
Maven Run JUnit Tests
# Run Tests mvn clean test # Run A Specific Test mvn clean -Dtest=MsoVnfPluginAdapterImplTest test -e # mvn clean -Dtest=<Java Class Name> test -e # #### '-e' turns on Error Stack Traces # Remote Debug A Specific Test - Setup IDE to connect to 5005 # #### Be sure to open port 5005 on your build system mvn -Dmaven.surefire.debug -Dtest=MsoVnfPluginAdapterImplTest test -e
See https://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html for more info.
Camunda Modeler
Download the Camunda Modeler. Select the Linux x64 package.
Unpack it.
Eclipse
Download Eclipse for Linux. Select the 64-bit Eclipse IDE for Java Developers. Oxygen seems to be the latest version. These instructions were written for Neon.
Unpack it.
In the eclipse directory, edit eclipse.ini
Add (or change) the -vm setting so that it points to your JDK.
Adjust the maximum heap space (2GB is recommended).
Example:
Eclipse Settings
Configure eclipse to use your external maven 3.3.9 installation:
Go to Window→Preferences→Maven→Installations
Click "Add" and browse to your apache-maven-3.3.9 directory. Click "OK" to select it.
Click "Finish"
Make sure the external installation is selected:
Configure eclipse to use your settings.xml
Go to Window→Preferences→Maven→User Settings
Type the full path to your settings.xml file into the "User Settings" box and click "OK".