Here we will show you how to setup APPC build environment on Ubuntu 16.04
...
mkdir -p $HOME/ONAP-APPC
cd $HOME/ONAP-APPC
git clone clone "https://githubgerrit.onap.comorg/onapr/appc-/parent"
git clone https://gerrit.onap.org/r/appc
...
Build appc-parent
cd $HOME/ONAP-APPC/appc-parent
# Updated the CCSDK parent artifact "org.onap.ccsdk.parent" version should like the below one
# You need to manually edit CCSDK version from '1.2.1.3' to '1.2.4' in the following files.
...
#TODO: We will have to fix the below appc core project source files. We should change the package com.sun.jersey to use org.glassfish.jersey to resolve the Karaf OSGI bundle loading issue. And we should also change the OSGI import version in the META-INF.
appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/ConfigComponentAdaptor.java
appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java
appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/executorImpl/RestExecutorTest.java
appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/services/util/ArtifactHandlerClient.java
appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/services/util/ArtifactHandlerClientTest.java
appc-outbound/appc-network-inventory-client/provider/src/main/java/org/onap/appc/instar/dme2client/Dme2Client.java
appc-outbound/appc-network-inventory-client/provider/src/test/java/org/onap/appc/instar/node/TestDme2Client.java
#Now build the APPC project
...
Reference Git DIFF file : diff-out-001-07242019.txt , diff-out-002-08052019.txt
Reference Build Log File : appc-build-07242019.log, appc-unitest-build-failed-07242019.log
Build appc deployment project (This is responsible to build APPC docker images)
#First pull the ccsdk-odlsli-image for ODL Fluorine SR2 release. This will , appc-unitest-build-faild-08052019.log, appc-unitest-build-failed-08122019.log
I think the junit tests are failing because the mockito when method is not compatible with the double method calls of the Invocation.Builder class (the .accept().post()):
when(webResourceBuilder.accept(MediaType.APPLICATION_JSON_TYPE).post(Entity.json(String.class),Response.class)).thenReturn(clientResponse);
The way to fix this might be to create a custom mock class for the Invocation.Builder class instead of using a mockito mock for it.
Build appc deployment project (This is responsible to build APPC docker images)
#First pull the ccsdk-odlsli-image for ODL Fluorine SR2 release. This will take some time
docker pull nexus3.onap.org:10001/onap/ccsdk-odlsli-image:0.4.4
...
The docker image for CDT failed, you can refer the log file appc-deployment-docker-image-build.log to get more details.