Foros de discusión
LR6.2 Hook to LR7 migration
darren rose, modificado hace 7 años.
LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Hi,
I am looking for a guide that details LR6.2CE Hook to LR7CEGA2 migration, including maven dependencies, changed classes etc
regards
I am looking for a guide that details LR6.2CE Hook to LR7CEGA2 migration, including maven dependencies, changed classes etc
regards
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Actually, what replaces the following in LR7GA2?
com.liferay.portal:portal-service:6.2.2
com.liferay.portal:portal-service:6.2.2
Juan Gonzalez, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientesdarren rose:
Actually, what replaces the following in LR7GA2?
com.liferay.portal:portal-service:6.2.2
I think this is the right version:
com.liferay.portal: com.liferay.portal.kernel:2.6.0
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration (Respuesta)
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientesJuan Gonzalez:
darren rose:Actually, what replaces the following in LR7GA2?
com.liferay.portal:portal-service:6.2.2
I think this is the right version:
com.liferay.portal: com.liferay.portal.kernel:2.6.0
I am using:
providedCompile 'com.liferay.portal:com.liferay.portal.kernel:2.3.0'
providedCompile 'org.osgi:org.osgi.service.component.annotations:1.3.0'
David H Nebinger, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
What kind of hook are you trying to migrate, Darren?
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Hi David,
I have hooks for the following:
application.startup.events
auth.pipeline.pre
auto.login.hooks
I have hooks for the following:
application.startup.events
auth.pipeline.pre
auto.login.hooks
David H Nebinger, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Okay, so these will not be "hooks" any more, they will merely be java classes with OSGi annotations and appropriate property values.
Auth pipeline pre handlers implement the Authenticator interface and should be defined as a component. Here's an example from the blade shiro authenticator example:
Auto login is along the same lines. Here's the example from the portal source for CAS:
I haven't found an example for the startup events, but I'm betting it's going to be along the same lines...
Auth pipeline pre handlers implement the Authenticator interface and should be defined as a component. Here's an example from the blade shiro authenticator example:
@Component(
immediate = true,
property = {
"key=auth.pipeline.pre"
},
service=Authenticator.class
)
public class ShiroAuthenticatorPre implements Authenticator {
Auto login is along the same lines. Here's the example from the portal source for CAS:
@Component(
configurationPid = "com.liferay.portal.security.sso.cas.configuration.CASConfiguration",
immediate = true, service = AutoLogin.class
)
public class CASAutoLogin extends BaseAutoLogin {
I haven't found an example for the startup events, but I'm betting it's going to be along the same lines...
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
looks good, do you happen to know the gradle dependencies required?
Are these jar artifacts deployed the same way? to the deploy folder?
thanks
Are these jar artifacts deployed the same way? to the deploy folder?
thanks
David H Nebinger, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
You can find the build.gradle files in the source and in the blade examples, they'll list all of the dependencies.
The module jars get dropped in the deploy folder.
The module jars get dropped in the deploy folder.
Ray Augé, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 1197 Fecha de incorporación: 8/02/05 Mensajes recientes
all those legacy events are implemented exactly like this one:
https://github.com/liferay/liferay-blade-samples/tree/master/liferay-gradle/blade.lifecycle.loginpreaction
Just set the key to `application.startup.events`.
https://github.com/liferay/liferay-blade-samples/tree/master/liferay-gradle/blade.lifecycle.loginpreaction
Just set the key to `application.startup.events`.
Ray Augé, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 1197 Fecha de incorporación: 8/02/05 Mensajes recientes
FYI, I just sent a PR to gamerson/liferay-blade-samples to update the README with more details pertaining to LifecycleEvents in general.
Please see: https://github.com/rotty3000/liferay-blade-samples/blob/fc86376829bfb8637e70543544e814c1bb1b8b9b/README.md#logineventspre
Please see: https://github.com/rotty3000/liferay-blade-samples/blob/fc86376829bfb8637e70543544e814c1bb1b8b9b/README.md#logineventspre
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration (Respuesta)
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientesdarren rose:
Hi David,
I have hooks for the following:
application.startup.events
auth.pipeline.pre
auto.login.hooks
I am initially migrating my 6.2 hooks as is, changing the dependencies to:
providedCompile 'com.liferay.portal:com.liferay.portal.kernel:2.3.0'
providedCompile 'org.osgi:org.osgi.service.component.annotations:1.3.0'
and making the necessary package changes
and deploying the hooks was war archives
It would be good to find a standalone gradle project of building an osgi module hook that does not form part of a nested gradle project.
Ray Augé, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 1197 Fecha de incorporación: 8/02/05 Mensajes recientes
Hey Darren, we original built all the blade-samples individually but once it got to certain point we were having a hard time keeping the quality high and consistent across all the build tools so we opted to keep a thin consistent top layer.
Which sample would you like separate?
Which sample would you like separate?
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientesRay Augé:
Hey Darren, we original built all the blade-samples individually but once it got to certain point we were having a hard time keeping the quality high and consistent across all the build tools so we opted to keep a thin consistent top layer.
Which sample would you like separate?
Thanks, I have the following hooks
auto login hook
authentication hook
configuration hook, listening for application startup, and configuring custom fields and roles
thanks
Vipin Bardia, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Hi Darren\Ray,
It is a bit different but can you tell me where to place external dependencies?
e.g. I want to add jackson api -
compile 'com.jackson:com.jackson:2.3.0'
But how to provide this dependency at run time, where can I keep these files?
How will this module jar can use this library?
Thanks in advance
It is a bit different but can you tell me where to place external dependencies?
e.g. I want to add jackson api -
compile 'com.jackson:com.jackson:2.3.0'
But how to provide this dependency at run time, where can I keep these files?
How will this module jar can use this library?
Thanks in advance
Vipin Bardia, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
@David, are you there?
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
are you using gradle or maven to build your artifact?
Vipin Bardia, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Yes Darren, I am using maven to build.
I can see them in build path, but what about run-time?
I can add them to jar via bnd entry like below
But I believe there must be a way to share those libraries and not adding them to jar itself
Thanks for your response
I can see them in build path, but what about run-time?
I can add them to jar via bnd entry like below
Bundle-ClassPath:\
.,\
lib/gson-2.2.4.jar
But I believe there must be a way to share those libraries and not adding them to jar itself
Thanks for your response
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Do you want all hooks to share the same jar, and experience the new jar when the updated?
Vipin Bardia, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Yes Darren,
I want to share the same jars with different modules and I don't want to put them inside application jar.
and experience the new jar when the updated- yes, if possible
I want to share the same jars with different modules and I don't want to put them inside application jar.
and experience the new jar when the updated- yes, if possible
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
in that case, assuming you are using Tomcat, following the guide for deploying jars to Tomcat's common folder.
darren rose, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
Vipin Bardia, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Hi Darren,
Thanks for the suggestion
Sharing the common library via this link may work where I need to place my jars at common place
May be I was not clear with my intentions, Yes I need to share jars.
But at the same time I want o have libraries for my single module, then what is required?
Project contains the jar as references library, e.g GSON library , but when it comes to deployment server it will throw runtime exception.
I am using liferay-blade-samples for maven
You can refer my previous post , which I am using right now to build.
May be it is very simple or I am doing something very stupid.
Kindly suggest.
Thanks for the suggestion
Sharing the common library via this link may work where I need to place my jars at common place
May be I was not clear with my intentions, Yes I need to share jars.
But at the same time I want o have libraries for my single module, then what is required?
Project contains the jar as references library, e.g GSON library , but when it comes to deployment server it will throw runtime exception.
I am using liferay-blade-samples for maven
You can refer my previous post , which I am using right now to build.
May be it is very simple or I am doing something very stupid.
Kindly suggest.
Ray Augé, modificado hace 7 años.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Mensajes: 1197 Fecha de incorporación: 8/02/05 Mensajes recientes
hey guys, if you look at the com.jackson:com.jackson:2.3.0 jar it's actually an OSGi bundle already, so simply deploy it along side your module in liferay's module folder.