Fix resource-assignment dependencies 53/10653/1
authorDan Timoney <dtimoney@att.com>
Wed, 6 Sep 2017 23:14:51 +0000 (19:14 -0400)
committerDan Timoney <dtimoney@att.com>
Wed, 6 Sep 2017 23:14:51 +0000 (19:14 -0400)
Resource-assignment was not loading due to unresolved dependencies.  This
turned out to be due to a few issues, addressed by this change:

- commons-lang had to be added as a bundle in features.xml
- package name for DbLibService in spring config was wrong, preventing
spring from initializing properly
- DbLibService's package (org.onap.ccsdk.sli.core.dblib) was not detected
properly by felix maven plugin and was missing from Import-Package in
MANIFEST. Resolved by explicitly adding that package in felix plugin
config in provider pom.xml

Change-Id: I6ebb82ebae0e96b4ab9592e29f6a7a1d2276aa69
Issue-ID: CCSDK-79
Signed-off-by: Dan Timoney <dtimoney@att.com>
resource-assignment/features/src/main/resources/features.xml
resource-assignment/installer/pom.xml
resource-assignment/provider/pom.xml
resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-osgi-context.xml

index d3362fb..f419129 100644 (file)
@@ -9,9 +9,9 @@
   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.
@@ -35,6 +35,7 @@
         <feature>spring-dm</feature>
         <bundle start-level="88">mvn:org.onap.ccsdk.sli.adaptors/resource-assignment-provider/${project.version}</bundle>
         <bundle>mvn:mysql/mysql-connector-java/${mysql.connector.version}</bundle>
+        <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
     </feature>
 
 </features>
index 8915b8d..8367b03 100755 (executable)
@@ -15,6 +15,7 @@
         <features.boot>sdnc-resource-assignment</features.boot>
         <features.repositories>mvn:org.onap.ccsdk.sli.adaptors/resource-assignment-features/${project.version}/xml/features</features.repositories>
         <include.transitive.dependencies>false</include.transitive.dependencies>
+        <commons.lang.version>2.6</commons.lang.version>
     </properties>
 
     <dependencies>
@@ -39,6 +40,7 @@
             <version>${project.version}</version>
         </dependency>
 
+
     </dependencies>
 
     <build>
index 1b98c62..8913428 100755 (executable)
                     <instructions>
                         <Bundle-SymbolicName>org.onap.ccsdk.sli.adaptors.ra</Bundle-SymbolicName>
                         <Export-Package>org.onap.ccsdk.sli.adaptors.ra</Export-Package>
+                        <!--
                         <Import-Package>*,org.onap.ccsdk.sli.adaptors.resource.dblib,org.onap.ccsdk.sli.adaptors.*,org.osgi.framework.*,org.slf4j.*,com.mysql.jdbc.*</Import-Package>
-                        <!--Import-Package>*</Import-Package-->
                         <Embed-Transitive>true</Embed-Transitive>
+                        -->
+                        <Import-Package>*,org.onap.ccsdk.sli.core.dblib</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
index 7fe5443..be22d87 100644 (file)
@@ -9,9 +9,9 @@
   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.
@@ -30,7 +30,7 @@
     <reference id="dblib.dataSource">
         <interfaces>
             <beans:value>javax.sql.DataSource</beans:value>
-            <beans:value>org.onap.ccsdk.sli.adaptors.resource.dblib.DbLibService</beans:value>
+            <beans:value>org.onap.ccsdk.sli.core.dblib.DbLibService</beans:value>
         </interfaces>
     </reference>