在Liferay Portlet中使用Skype Gradle依赖项时出现错误 [英] i am getting error while using skype gradle dependencies in liferay portlet

查看:59
本文介绍了在Liferay Portlet中使用Skype Gradle依赖项时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Liferay Portlet中开发一个项目,在该项目中,我必须使用skype Gradle依赖性在skype组上发送消息.

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

我放了依赖项

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

中的

并已部署.一切正常.

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

但是每当我导入或使用skype软件包时,都会出现类似

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

未解决的要求:导入包:com.skype_ [已消毒]

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

如何解决此问题,如果可以,请给我一个代码或建议吗?如何使用Liferay Java代码将通知消息发送到Skype组?

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?

推荐答案

渐变依赖项在构建时适用.他们不会在运行时神奇地提供代码.

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

理想情况下,您会发现skype API代码打包为OSGi捆绑包(我目前处于低带宽状态,无法检查),并将其部署到OSGi运行时(Liferay)并使其可用.潜在地,您可能还需要使其传递依赖项也可用.

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.

理想情况下,您会找到有人重新打包为OSGi捆绑包的API jar版本.或者,您自己做(并向原始维护者发送请求请求)

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)

甚至更不理想的情况是,您将在自己的代码中包含API jar.在Liferay工作空间中,可以使用gradle依赖声明中的compileInclude指令执行此操作.在此处查看缺点和后果(需要免费注册免费课程)

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)

这篇关于在Liferay Portlet中使用Skype Gradle依赖项时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆