4 `AAI-Common` is a collection of common utility modules used by the other AAI components (`AAI-Resources` and `AAI-Traversal`). These utilities include `aai-schema`, which contains the schema oxm and xsd files; `aai-annotations`, which enables the annotations on the schema files; and `aai-core`, which includes various java packages used by all AAI microservices. `AAI-Resources` and `AAI-Traversal` are already configured to pull these dependencies using maven. For more information on `AAI-Resources` and `AAI-Traversal`, please see the `README.md` files in their respective repositories. This readme only covers AAI-Common.
10 The AAI services have some prerequisite requirements that must be met before being able to compile and test the services.
11 As with any other ONAP service, you need the [ONAP `settings.xml` file](https://git.onap.org/oparent/plain/settings.xml) in your `~/.m2/` folder.
13 In addition, the AAI services are still based on Java 8. As such, you can either
15 - globally define java 8 to be the standard jdk for the system (i.e `echo -e '\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/' >> ~/.bashrc`)
16 - define it locally for each command (i.e `JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn install -DskipTests`)
17 - configure it in your IDE
20 A `mvn install` will build all modules make them locally available on your system:
22 mvn install -Dcheckstyle.skip
28 mvn test -Dcheckstyle.skip
32 mvn test -Dcheckstyle.skip -DfailIfNoTests=false -Dtest=PserverTest
36 mvn test -Dcheckstyle.skip -Dtest=PserverTest
41 mvn clean install -P docker -Dcheckstyle.skip -DskipTests
45 If your IDE supports it, then use the built-in way to debug run a single test. Should that not be possible, you can attach your IDE to the debug port opened by maven via:
47 mvn test -Dcheckstyle.skip -Dtest=PserverTest -Dmaven.surefire.debug
49 This will open up a debug connection on port `5005`.T
50 The process of connecting to this port is IDE-specific.
51 For VSCode for example you have to create a `.vscode/launch.json` in the project with the following content:
58 "name": "Debug (attach)",
60 "hostName": "localhost",
62 "internalConsoleOptions": "neverOpen",
63 "projectName": "aai-core"