I would look at the NetconfClientPlugin and see how to re-use that mechanism.
Brian NetconfClientPlugin appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java From: [email protected] [mailto:[email protected]] On Behalf Of West, James Sent: Friday, May 26, 2017 4:32 PM To: [email protected] Subject: [onap-discuss] APPC bundles and dependencies Hi Everyone, I'm trying to build some prototype code that instantiates an instance of org.openecomp.appc.adapter.netconf.jsch.NetconfClientJsch and then uses that class for some simple netconf communication. I've implemented this as a separate OSGi bundle/karaf feature. My first issue was that the appc-netconf-adapter bundle. This didn't export the org.openecomp.appc.adapter.netconf.jsch package. It exported the org.openecomp.appc.adapter.netconf package, but not the the jsch package below. I had to change the pom.xml file: appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/pom.xml - <Export-Package>org.openecomp.appc.adapter.netconf,org.openecomp.appc.adapter.netconf.dao,org.openecomp.appc.adapter.netconf.util,org.openecomp.appc.adapter.netconf.exception</Export-Package> + <Export-Package>org.openecomp.appc.adapter.netconf,org.openecomp.appc.adapter.netconf.jsch,org.openecomp.appc.adapter.netconf.dao,org.openecomp.appc.adapter.netconf.util,org.openecomp.appc.adapter.netconf.exception</Export-Package> After I did this, my feature still didn't load because of a dependency on org.openecomp.appc.exceptions. Specifically, I need org/openecomp/appc/exceptions/APPCException.java (because the NetconfClientJsch can throw this) This is defined in appc-common-1.1.1-SNAPSHOT.jar, but that .jar file isn't a bundle. To get around this, I have karaf load it and wrap it as a bundle. bundle:install -s wrap:mvn:org.openecomp.appc/appc-common/1.1.1-SNAPSHOT My question ... Am I just pushing the bleeding edge and hitting something that isn't fully baked yet or am I using this incorrectly or is there an option #3 that I'm not aware of. Thanks in advance, Jim West This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
_______________________________________________ onap-discuss mailing list [email protected] https://lists.onap.org/mailman/listinfo/onap-discuss
