-# imstall ssl and java certificates
-COPY AAF_RootCA.cer $SSL_CERTS_DIR
-COPY truststoreONAPall.jks $JAVA_SECURITY_DIR
-COPY AAF_RootCA.cer $SDNC_STORE_DIR
+# Copy deliverables to opt
+COPY opt /opt
+RUN test -L /opt/sdnc || ln -s /opt/onap/sdnc /opt/sdnc
+RUN mkdir $ODL_HOME/current/certs
+
+# Copy SDNC mvn artifacts to ODL repository
+COPY system /tmp/system
+RUN rsync -a /tmp/system $ODL_HOME
+
+# Backing up existing karaf cfg and updating features boot and features repositories defined in pom.xml
+RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.sdnc.orig
+RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${sdnc.features.boot}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
+RUN sed -i -e "\|featuresRepositories|s|$|,${sdnr.features.repo},${sdnc.features.repo}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
+
+# Add odl-netconf-topology to boot repositories
+RUN sed -i "s/odl-restconf-all/odl-restconf-all,odl-netconf-topology/g" $ODL_HOME/etc/org.apache.karaf.features.cfg
+
+# Add aaa-app-config.xml Only if AAF is set to true (being passed as an argument in docker-maven-plugin configuration)
+COPY aaa-app-config.xml /tmp/aaa-app-config.xml
+RUN if "${AAF}" ; then \
+ mkdir -p $ODL_HOME/etc/opendaylight/datastore/initial/config ;\
+ mv /tmp/aaa-app-config.xml $ODL_HOME/etc/opendaylight/datastore/initial/config/. ;\
+ echo "cadi_prop_files=$SDNC_CONFIG_DIR/org.onap.sdnc.props" >> $ODL_HOME/etc/system.properties ;\
+ fi
+
+# Install ssl and java certificates