掲示板
LR6.2 Hook to LR7 migration
7年前 に darren rose によって更新されました。
LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
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
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
Actually, what replaces the following in LR7GA2?
com.liferay.portal:portal-service:6.2.2
com.liferay.portal:portal-service:6.2.2
7年前 に Juan Gonzalez によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿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
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration (回答)
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿Juan 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'
7年前 に David H Nebinger によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
What kind of hook are you trying to migrate, Darren?
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
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
7年前 に David H Nebinger によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
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...
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
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
7年前 に David H Nebinger によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
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.
7年前 に Ray Augé によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 1197 参加年月日: 05/02/08 最新の投稿
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`.
7年前 に Ray Augé によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 1197 参加年月日: 05/02/08 最新の投稿
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
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration (回答)
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿darren 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.
7年前 に Ray Augé によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 1197 参加年月日: 05/02/08 最新の投稿
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?
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿Ray 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
7年前 に Vipin Bardia によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
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
7年前 に Vipin Bardia によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
@David, are you there?
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
are you using gradle or maven to build your artifact?
7年前 に Vipin Bardia によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
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
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
Do you want all hooks to share the same jar, and experience the new jar when the updated?
7年前 に Vipin Bardia によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
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
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
in that case, assuming you are using Tomcat, following the guide for deploying jars to Tomcat's common folder.
7年前 に darren rose によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
7年前 に Vipin Bardia によって更新されました。
RE: LR6.2 Hook to LR7 migration
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
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.
7年前 に Ray Augé によって更新されました。
RE: LR6.2 Hook to LR7 migration
Liferay Legend 投稿: 1197 参加年月日: 05/02/08 最新の投稿
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.