0

I'm using liferay 7.1 ga3.

In the build.gradle I need to use :

`compileOnly group:"com.liferay",name:"com.liferay.portal.instance.lifecycle",version: '3.0.0' 

because I want to use BlockchainPortalInstanceLifecycleListener.

If I use the above, it throws the exception.

If I use like this

compileInclued group: "com.liferay", name: "com.liferay.portal.instance.lifecycle",version: '3.0.0' 

instead, it does not throw the exception, but it doesn't work.

Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Simone Sorgon
  • 155
  • 1
  • 14

1 Answers1

1

First of all, compile include should not be necessary if you are using a dependency that is part of the modules exposed by liferay. Second, the bundle exposed by 7.1 GA3 is not called

"com.liferay.portal.instance.lifecycle"

But you do have those available:

"com.liferay:com.liferay.portal.instance.lifecycle.api:1.0.+"
"com.liferay:com.liferay.portal.instance.lifecycle.impl:1.0.+"

You are probably looking for

compile "com.liferay:com.liferay.portal.instance.lifecycle.api:1.0.+"
Victor
  • 3,520
  • 3
  • 38
  • 58
  • 1
    ...and definitely do **not** go with `compileInclude`. The module is available in the OSGi runtime and *must not* be contained again in your own code. – Olaf Kock Jul 16 '19 at 09:03