Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Google Api auth libraries problem
Hi to all,
I'm developing a home page that tries to access the portal using the Google authorization.
Unfortunately, I'm having a problem with the libraries.
in the specific (in gradle)
these are
Does someone know how can I solve this problem?
Are there any alternative libraries?
The Liferay version is 7.0
Many thanks.
I'm developing a home page that tries to access the portal using the Google authorization.
Unfortunately, I'm having a problem with the libraries.
in the specific (in gradle)
these are
// https://mvnrepository.com/artifact/com.google.apis/google-api-services-oauth2
compileOnly group: 'com.google.apis', name: 'google-api-services-oauth2', version: 'v2-rev131-1.23.0'
// https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty
compileOnly group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.25.0'
The problem is that I can't deploy(probably they are not compliant with osgi module).Does someone know how can I solve this problem?
Are there any alternative libraries?
The Liferay version is 7.0
Many thanks.
Hi,
by saying "compileOnly" you make the dependencies compile only. It means you expect them to be present in the runtime, provided by someone else.
I think portal doesn't provide those libraries OOTB. Try to use "compileInclude" to package the libraries into your project.
-- tom +
by saying "compileOnly" you make the dependencies compile only. It means you expect them to be present in the runtime, provided by someone else.
I think portal doesn't provide those libraries OOTB. Try to use "compileInclude" to package the libraries into your project.
-- tom +
Hi Tomas,
many thanks for your suggestion.
Unfortunately, it doesn't work.
I'm really thinking that the problem could be any conflict with all the libraries that I 'm using.
many thanks for your suggestion.
Unfortunately, it doesn't work.
I'm really thinking that the problem could be any conflict with all the libraries that I 'm using.
dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
compileOnly group: 'org.apache.servicemix.bundles', name: 'org.apache.servicemix.bundles.javax.mail', version: '1.4.1_5'
// https://mvnrepository.com/artifact/com.google.apis/google-api-services-oauth2
compileInclude group: 'com.google.apis', name: 'google-api-services-oauth2', version: 'v2-rev131-1.23.0'
// https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty
compileInclude group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.25.0'
}
Hi there,
I am also having problems with this library inside my portlet:
compileInclude group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.24.1'
Could you solve this conflict with Liferay?
Thanks in advance!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™