Update to pom files and package organization of bng-app

Also, update maven repo to HTTPS.

Change-Id: I664f819b2a671a5e85dcfd3e87e333f1163366d5
diff --git a/api/pom.xml b/api/pom.xml
index 6ebbe67..c6387da 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -22,12 +22,11 @@
     <parent>
         <groupId>org.opencord</groupId>
         <artifactId>bng</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>bng-api</artifactId>
-
     <packaging>bundle</packaging>
 
     <dependencies>
diff --git a/app/app.xml b/app/app.xml
new file mode 100644
index 0000000..49b019c
--- /dev/null
+++ b/app/app.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2020-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<app name="org.opencord.bng" origin="Open Networking Foundation"
+     version="${project.version}"
+     category="default" url="http://onosproject.org" title="BNG"
+     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
+     features="${project.artifactId}" apps="org.opencord.sadis,org.opencord.olt">
+    <description>${project.description}</description>
+    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/bng-api/${project.version}</artifact>
+</app>
diff --git a/app/features.xml b/app/features.xml
new file mode 100644
index 0000000..2f6fb93
--- /dev/null
+++ b/app/features.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  ~ Copyright 2020-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+    <feature name="${project.artifactId}" version="${project.version}"
+             description="${project.description}">
+        <feature>onos-api</feature>
+        <bundle>mvn:${project.groupId}/bng-api/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+    </feature>
+</features>
diff --git a/app/pom.xml b/app/pom.xml
index 9bf4f15..c517813 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.opencord</groupId>
         <artifactId>bng</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -46,12 +46,6 @@
     </properties>
 
     <dependencies>
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-api</artifactId>
-            <version>${onos.version}</version>
-            <scope>provided</scope>
-        </dependency>
 
         <dependency>
             <groupId>org.opencord</groupId>
@@ -62,6 +56,13 @@
 
         <dependency>
             <groupId>org.opencord</groupId>
+            <artifactId>olt-api</artifactId>
+            <version>${olt.api.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.opencord</groupId>
             <artifactId>bng-api</artifactId>
             <version>${project.version}</version>
             <scope>compile</scope>
@@ -103,12 +104,6 @@
             <scope>provided</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.opencord</groupId>
-            <artifactId>olt-api</artifactId>
-            <version>${olt.api.version}</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/app/src/main/java/org/opencord/bng/cli/AddAttachment.java b/app/src/main/java/org/opencord/bng/cli/AddAttachment.java
index bea0c1f..cdd9fb7 100644
--- a/app/src/main/java/org/opencord/bng/cli/AddAttachment.java
+++ b/app/src/main/java/org/opencord/bng/cli/AddAttachment.java
@@ -31,9 +31,9 @@
 import org.onosproject.core.CoreService;
 import org.onosproject.net.ConnectPoint;
 import org.opencord.bng.BngAttachment;
-import org.opencord.bng.BngManager;
+import org.opencord.bng.impl.BngManager;
 import org.opencord.bng.BngService;
-import org.opencord.bng.BngUtils;
+import org.opencord.bng.impl.BngUtils;
 import org.opencord.bng.PppoeBngAttachment;
 
 @Service
diff --git a/app/src/main/java/org/opencord/bng/config/netcfg.json b/app/src/main/java/org/opencord/bng/config/netcfg.json
index be62c34..ecd0ae4 100644
--- a/app/src/main/java/org/opencord/bng/config/netcfg.json
+++ b/app/src/main/java/org/opencord/bng/config/netcfg.json
@@ -3,7 +3,7 @@
     "org.opencord.bng": {
       "pppoerelay": {
         "oltConnectPoint": "device:asg1/128",
-        "pppoeServerConnectPoint": "device:asg1/140",
+        "pppoeServerConnectPoint": "device:asg1/140"
       },
       "bng": {
         "bnguDeviceId": "device:asg1"
diff --git a/app/src/main/java/org/opencord/bng/BngManager.java b/app/src/main/java/org/opencord/bng/impl/BngManager.java
similarity index 98%
rename from app/src/main/java/org/opencord/bng/BngManager.java
rename to app/src/main/java/org/opencord/bng/impl/BngManager.java
index 4cdd558..1f399e1 100644
--- a/app/src/main/java/org/opencord/bng/BngManager.java
+++ b/app/src/main/java/org/opencord/bng/impl/BngManager.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
@@ -48,6 +48,9 @@
 import org.onosproject.net.host.HostProviderService;
 import org.onosproject.net.link.LinkService;
 import org.onosproject.net.provider.ProviderId;
+import org.opencord.bng.BngAttachment;
+import org.opencord.bng.BngService;
+import org.opencord.bng.PppoeBngAttachment;
 import org.opencord.bng.config.BngConfig;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -68,7 +71,7 @@
 /**
  * Implements the network level BNG service API to manage attachments.
  */
-@Component(immediate = true, service = BngService.class)
+@Component(immediate = true)
 public class BngManager implements HostProvider, BngService {
     public static final String BNG_APP = "org.opencord.bng";
 
@@ -188,7 +191,7 @@
             // If the BNG user plane is not available, or the attachment is not connected to
             // the correct BNG user planee, accept anyway the attachment.
             // Check if the attachment is correctly connected to the BNG device when that device will show up.
-            log.info("BNG user planee not available, attachment accepted but not programmed");
+            log.info("BNG user plane not available, attachment accepted but not programmed");
         }
         log.info("PPPoE Attachment created/updated: {}", pppoeAttachment);
         registeredAttachment.put(attachmentKey, Pair.of(pppoeAttachment, hostId));
diff --git a/app/src/main/java/org/opencord/bng/BngStatsManager.java b/app/src/main/java/org/opencord/bng/impl/BngStatsManager.java
similarity index 93%
rename from app/src/main/java/org/opencord/bng/BngStatsManager.java
rename to app/src/main/java/org/opencord/bng/impl/BngStatsManager.java
index 827b552..6a2a716 100644
--- a/app/src/main/java/org/opencord/bng/BngStatsManager.java
+++ b/app/src/main/java/org/opencord/bng/impl/BngStatsManager.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 import com.google.common.collect.Maps;
 import org.onlab.util.SharedScheduledExecutors;
@@ -27,6 +27,12 @@
 import org.onosproject.net.behaviour.BngProgrammable;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.pi.runtime.PiCounterCellData;
+import org.opencord.bng.BngAttachment;
+import org.opencord.bng.BngService;
+import org.opencord.bng.BngStatsEvent;
+import org.opencord.bng.BngStatsEventListener;
+import org.opencord.bng.BngStatsEventSubject;
+import org.opencord.bng.BngStatsService;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -43,11 +49,10 @@
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
 
-import static org.opencord.bng.OsgiPropertyConstants.BNG_STATISTICS_PROBE_RATE;
-import static org.opencord.bng.OsgiPropertyConstants.BNG_STATISTICS_PROBE_RATE_DEFAULT;
+import static org.opencord.bng.impl.OsgiPropertyConstants.BNG_STATISTICS_PROBE_RATE;
+import static org.opencord.bng.impl.OsgiPropertyConstants.BNG_STATISTICS_PROBE_RATE_DEFAULT;
 
 @Component(immediate = true,
-        service = BngStatsService.class,
         property = {
                 BNG_STATISTICS_PROBE_RATE + ":Long=" + BNG_STATISTICS_PROBE_RATE_DEFAULT,
         }
diff --git a/app/src/main/java/org/opencord/bng/BngUtils.java b/app/src/main/java/org/opencord/bng/impl/BngUtils.java
similarity index 96%
rename from app/src/main/java/org/opencord/bng/BngUtils.java
rename to app/src/main/java/org/opencord/bng/impl/BngUtils.java
index c4cbe64..17c04dc 100644
--- a/app/src/main/java/org/opencord/bng/BngUtils.java
+++ b/app/src/main/java/org/opencord/bng/impl/BngUtils.java
@@ -14,12 +14,13 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onosproject.net.ConnectPoint;
+import org.opencord.bng.PppoeEventSubject;
 
 public final class BngUtils {
 
diff --git a/app/src/main/java/org/opencord/bng/OsgiPropertyConstants.java b/app/src/main/java/org/opencord/bng/impl/OsgiPropertyConstants.java
similarity index 96%
rename from app/src/main/java/org/opencord/bng/OsgiPropertyConstants.java
rename to app/src/main/java/org/opencord/bng/impl/OsgiPropertyConstants.java
index 962d1e1..1bd86a0 100644
--- a/app/src/main/java/org/opencord/bng/OsgiPropertyConstants.java
+++ b/app/src/main/java/org/opencord/bng/impl/OsgiPropertyConstants.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 public final class OsgiPropertyConstants {
 
diff --git a/app/src/main/java/org/opencord/bng/PppoeHandlerRelay.java b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
similarity index 98%
rename from app/src/main/java/org/opencord/bng/PppoeHandlerRelay.java
rename to app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
index da77299..56566c3 100644
--- a/app/src/main/java/org/opencord/bng/PppoeHandlerRelay.java
+++ b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 import com.google.common.collect.Maps;
 import org.onlab.packet.Data;
@@ -44,6 +44,12 @@
 import org.onosproject.net.packet.PacketContext;
 import org.onosproject.net.packet.PacketProcessor;
 import org.onosproject.net.packet.PacketService;
+import org.opencord.bng.BngAttachment;
+import org.opencord.bng.PppoeBngAttachment;
+import org.opencord.bng.PppoeBngControlHandler;
+import org.opencord.bng.PppoeEvent;
+import org.opencord.bng.PppoeEventListener;
+import org.opencord.bng.PppoeEventSubject;
 import org.opencord.bng.config.PppoeRelayConfig;
 import org.opencord.bng.packets.GenericPpp;
 import org.opencord.bng.packets.Ipcp;
@@ -67,7 +73,7 @@
 
 import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FACTORY;
 
-@Component(immediate = true, service = PppoeBngControlHandler.class)
+@Component(immediate = true)
 public class PppoeHandlerRelay
         extends AbstractListenerManager<PppoeEvent, PppoeEventListener>
         implements PppoeBngControlHandler {
diff --git a/app/src/main/java/org/opencord/bng/SimpleAttachmentEventHandler.java b/app/src/main/java/org/opencord/bng/impl/SimpleAttachmentEventHandler.java
similarity index 93%
rename from app/src/main/java/org/opencord/bng/SimpleAttachmentEventHandler.java
rename to app/src/main/java/org/opencord/bng/impl/SimpleAttachmentEventHandler.java
index eb4ecd6..eb14ecb 100644
--- a/app/src/main/java/org/opencord/bng/SimpleAttachmentEventHandler.java
+++ b/app/src/main/java/org/opencord/bng/impl/SimpleAttachmentEventHandler.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.opencord.bng;
+package org.opencord.bng.impl;
 
 import org.glassfish.jersey.internal.guava.Sets;
 import org.onlab.util.Tools;
@@ -22,6 +22,13 @@
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.store.service.StorageService;
+import org.opencord.bng.BngAttachment;
+import org.opencord.bng.BngService;
+import org.opencord.bng.PppoeBngAttachment;
+import org.opencord.bng.PppoeBngControlHandler;
+import org.opencord.bng.PppoeEvent;
+import org.opencord.bng.PppoeEventListener;
+import org.opencord.bng.PppoeEventSubject;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -36,15 +43,14 @@
 import java.util.Properties;
 import java.util.Set;
 
-import static org.opencord.bng.OsgiPropertyConstants.ENABLE_LOCAL_EVENT_HANDLER;
-import static org.opencord.bng.OsgiPropertyConstants.ENABLE_LOCAL_EVENT_HANDLER_DEFAULT;
+import static org.opencord.bng.impl.OsgiPropertyConstants.ENABLE_LOCAL_EVENT_HANDLER;
+import static org.opencord.bng.impl.OsgiPropertyConstants.ENABLE_LOCAL_EVENT_HANDLER_DEFAULT;
 
 /**
  * Service to intercept the PPPoE Handler events and trigger the creation of a
  * new attachment in BNG service.
  */
 @Component(immediate = true,
-        service = SimpleAttachmentEventHandler.class,
         property = {
                 ENABLE_LOCAL_EVENT_HANDLER + ":Boolean=" + ENABLE_LOCAL_EVENT_HANDLER_DEFAULT,
         }
diff --git a/app/src/main/java/org/opencord/bng/package-info.java b/app/src/main/java/org/opencord/bng/impl/package-info.java
similarity index 95%
rename from app/src/main/java/org/opencord/bng/package-info.java
rename to app/src/main/java/org/opencord/bng/impl/package-info.java
index 170eb9c..c8954f0 100644
--- a/app/src/main/java/org/opencord/bng/package-info.java
+++ b/app/src/main/java/org/opencord/bng/impl/package-info.java
@@ -17,4 +17,4 @@
 /**
  * BNG application.
  */
-package org.opencord.bng;
+package org.opencord.bng.impl;
diff --git a/pom.xml b/pom.xml
index f5e604f..fbf6640 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,16 +27,15 @@
 
     <groupId>org.opencord</groupId>
     <artifactId>bng</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <description>BNG Control app</description>
     <url>http://opencord.org</url>
 
     <properties>
-<!--     TODO:   Update Sadis to 4.0.1-SNAPSHOT-->
-        <sadis.api.version>4.0.0-SNAPSHOT</sadis.api.version>
-        <olt.api.version>4.0.0-SNAPSHOT</olt.api.version>
+        <sadis.api.version>4.0.1</sadis.api.version>
+        <olt.api.version>4.0.0</olt.api.version>
     </properties>
 
     <modules>
@@ -48,7 +47,7 @@
         <repository>
             <id>central</id>
             <name>Central Repository</name>
-            <url>http://repo.maven.apache.org/maven2</url>
+            <url>https://repo.maven.apache.org/maven2</url>
             <layout>default</layout>
             <snapshots>
                 <enabled>false</enabled>
@@ -59,7 +58,6 @@
                 <checksumPolicy>fail</checksumPolicy>
             </releases>
         </repository>
-
         <repository>
             <id>snapshots</id>
             <url>https://oss.sonatype.org/content/repositories/snapshots</url>