i am getting error while using skype gradle dependencies in liferay portlet

一世执手 提交于 2019-12-20 07:37:08

问题


I am developing a project in Liferay portlet where I have to use skype Gradle dependencies to send a message on skype group.

I put the dependencies

(compile group: 'com.github.taksan', name: 'skype-java-API', version: '1.7')

in build.gradle and deployed. It's working fine.

But whenever I import or use the skype package, I am getting an error like

Unresolved requirement: Import-Package: com.skype_ [Sanitized]

how to resolve this problem and if possible could you give me a code or suggestion? How to send the notification message to the skype group using Liferay java code?


回答1:


gradle dependencies apply at build time. They don't make the code available at runtime magically.

Ideally, you'd figure out that the skype API code is packaged as OSGi bundle (I'm on low bandwidth currently, can't check) and deploy it to the OSGi runtime (Liferay) as well to make it available. Potentially you might need to make its transitive dependencies available as well.

Less ideally, you'll find a version of the API jar that someone has repackaged as OSGi bundle. Or you do this yourself (and send a pullrequest to the original maintainer)

And even less ideally, you'll include the API jar within your own code. Within Liferay workspace, you can do this with the compileInclude directive in your gradle dependency declaration. See the drawbacks and consequences here (free registration to the free course required)



来源:https://stackoverflow.com/questions/58953771/i-am-getting-error-while-using-skype-gradle-dependencies-in-liferay-portlet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!