Fórum
LR6.2 Hook to LR7 migration
darren rose, modificado 7 Anos atrás.
LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentesdarren 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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration (Resposta)
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesJuan 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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
What kind of hook are you trying to migrate, Darren?
darren rose, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration (Resposta)
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentesdarren 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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesRay 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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
@David, are you there?
darren rose, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
are you using gradle or maven to build your artifact?
Vipin Bardia, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
Do you want all hooks to share the same jar, and experience the new jar when the updated?
Vipin Bardia, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
in that case, assuming you are using Tomcat, following the guide for deploying jars to Tomcat's common folder.
darren rose, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
Vipin Bardia, modificado 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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 7 Anos atrás.
RE: LR6.2 Hook to LR7 migration
Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
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.