留言板
blade deploy vs gradle deploy
in Liferay 7 GA3
in command line (I am on linux), after cd to ../modules/apps/contactform-web
the following command deploys fine:
blade deploy build/libs/ca.domain.server.contactform.web-1.0.0.jar
the following command builds fine:
../../../gradlew build
yet the following does not copy the jar into the Liferay 'deploy' folder
../../../gradlew deploy
what might I be missing ? I am hoping to use gradle tasks in IntelliJ and while I see the 'deploy' task, like with the command line it doesn't end up deploying.
in command line (I am on linux), after cd to ../modules/apps/contactform-web
the following command deploys fine:
blade deploy build/libs/ca.domain.server.contactform.web-1.0.0.jar
the following command builds fine:
../../../gradlew build
yet the following does not copy the jar into the Liferay 'deploy' folder
../../../gradlew deploy
what might I be missing ? I am hoping to use gradle tasks in IntelliJ and while I see the 'deploy' task, like with the command line it doesn't end up deploying.
gordon daniels,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Master 帖子: 797 加入日期: 08-8-24 最近的帖子
You actually expected it to deploy
Hiya Jack. Hope all is well with you. How do you like 7.0?
Hiya Jack. Hope all is well with you. How do you like 7.0?
gordon daniels:
You actually expected it to deploy
I have functional ways forward and as I gain an initial learning of gradle and blade, I look to make my dev enviro and dev iterations more efficient.
gordon daniels:
Hiya Jack. Hope all is well with you. How do you like 7.0?
Are you hijacking this thread
I'm starting to recognize the benefits of v7 features and approaches. I've gone through theme and layout development exercises and then a content/theme creation phase and really like most of the new v7 WCM features and gulp watch is a new friend. I've also started simple portlets and servicebuilder projects, and am digging OSGi. All in good time I hope.
Enjoy Gordon
gordon daniels,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Master 帖子: 797 加入日期: 08-8-24 最近的帖子
I should have announced this was a hijack! Actually, I've had the same issue but was waiting on searches to turn up an answer. Glad to hear you like the new stuff. Good luck.
Hi Jack,
When you run gradlew deploy it puts the module in <workspace_dir>/bundles/osgi/modules directory by default. You can configure Liferay Workspace to use another bundle by editing the gradle.properties file in the root of the workspace and setting liferay.workspace.home.dir= to where your bundle is. Then when you run gradlew deploy it should put it in your bundle under osgi/modules.
Hope this helps!
-Jamie
When you run gradlew deploy it puts the module in <workspace_dir>/bundles/osgi/modules directory by default. You can configure Liferay Workspace to use another bundle by editing the gradle.properties file in the root of the workspace and setting liferay.workspace.home.dir= to where your bundle is. Then when you run gradlew deploy it should put it in your bundle under osgi/modules.
Hope this helps!
-Jamie
Hi Jamie
Thanks and yes, this indeed does happen. However, after such I don't see any changes I might have made, say to a view.jsp. If I do the blade deploy approach, or copy the .jar into the Liferay deploy folder, then I do see the changes. I must be missing something obvious to OSGi savvy folks out there.
Jamie Sammons:
When you run gradlew deploy it puts the module in <workspace_dir>/bundles/osgi/modules directory by default.
Thanks and yes, this indeed does happen. However, after such I don't see any changes I might have made, say to a view.jsp. If I do the blade deploy approach, or copy the .jar into the Liferay deploy folder, then I do see the changes. I must be missing something obvious to OSGi savvy folks out there.
David H Nebinger,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
You cannot rely on hot deploy w/ osgi, it tends to keep old references around that mask your updates.
After a deploy, first step is to restart the container. If you still believe your changes are not taking effect, shut down the server and purge the contents of the osgi/state directory and try again.
After a deploy, first step is to restart the container. If you still believe your changes are not taking effect, shut down the server and purge the contents of the osgi/state directory and try again.
Good thing I don't mind sounding like a nube as I explore this. It's a matter of mind over matter. If you don't mind, it doesn't matter.
I am gathering there is additional 'magic' going on when one uses blade deploy, and also when dropping in the portal property path specified by "auto.deploy.deploy.dir". Plz correct me if I am off track or outright mistaken, but I see blade also stops and starts the module.
I tried the gradle deploy, and then with gogo stop and start it, but given my test jsp updates still not visible via browser, there must be more going on with a gradle deploy or dropping it in the auto.deploy.deploy.dir. (plz, go ahead and laugh all those of you magicians who have been working on this for many years...).
I guess I am used to a maven-like liferay:deploy task that I can use via command line, or via IntelliJ IDEA.
I am gathering there is additional 'magic' going on when one uses blade deploy, and also when dropping in the portal property path specified by "auto.deploy.deploy.dir". Plz correct me if I am off track or outright mistaken, but I see blade also stops and starts the module.
I tried the gradle deploy, and then with gogo stop and start it, but given my test jsp updates still not visible via browser, there must be more going on with a gradle deploy or dropping it in the auto.deploy.deploy.dir. (plz, go ahead and laugh all those of you magicians who have been working on this for many years...).
I guess I am used to a maven-like liferay:deploy task that I can use via command line, or via IntelliJ IDEA.
David H Nebinger,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
JSP fragment bundle or a JSP-based portlet that isn't updating?
JSPs from bundles end up compiled into the $LIFERAY_HOME/work directory, if you have a stale JSP you might consider whacking the contents of this directory and starting the server to get fresh JSP compiles.
I've never used the blade deploy so I don't know what's going on w/ that one.
The gradle deploy option sticks within your liferay workspace to handle the deploy into your local bundle. When the modules get deployed they go directly to the osgi/modules directory (skipping the whole deploy folder push).
JSPs from bundles end up compiled into the $LIFERAY_HOME/work directory, if you have a stale JSP you might consider whacking the contents of this directory and starting the server to get fresh JSP compiles.
I've never used the blade deploy so I don't know what's going on w/ that one.
The gradle deploy option sticks within your liferay workspace to handle the deploy into your local bundle. When the modules get deployed they go directly to the osgi/modules directory (skipping the whole deploy folder push).
David H Nebinger:
JSP fragment bundle or a JSP-based portlet that isn't updating?
portlet
David H Nebinger:
JSPs from bundles end up compiled into the $LIFERAY_HOME/work directory, if you have a stale JSP you might consider whacking the contents of this directory and starting the server to get fresh JSP compiles.
done the delete of contents in tomcat*/work and tomcat*/temp , didn't allow gradle deploy to hot deploy
David H Nebinger:
I've never used the blade deploy so I don't know what's going on w/ that one.
You should try it, it works well
David H Nebinger:
The gradle deploy option sticks within your liferay workspace to handle the deploy into your local bundle. When the modules get deployed they go directly to the osgi/modules directory (skipping the whole deploy folder push).
Yeah, as Jamie was also writing.
Ok, so from what I think I'm reading in this thread, a '../../../gradlew deploy' from within a ../modules/apps/myapp is supposed to hot deploy. Hmmm... wonder what's up in my approach/enviro then.
btw David (a.k.a. user.26526), in your blog "Liferay 7 Development, Part 5" you give instructions to build with:
../../../gradlew build
yet give a step to deploy with a move of jar to deploy folder
../../../gradlew build
yet give a step to deploy with a move of jar to deploy folder
user.26526:
You should end up with your new com.liferay.filesystem.access.web-1.0.0.jar bundle file in the build/libs directory. If you have a Liferay 7 CE or Liferay DXP tomcat environment running, you can drop the jar into the Liferay deploy folder.
David H Nebinger,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子Jack Bakker:
btw David (a.k.a. user.26526), in your blog "Liferay 7 Development, Part 5" you give instructions to build with:
../../../gradlew build
yet give a step to deploy with a move of jar to deploy folderuser.26526:
You should end up with your new com.liferay.filesystem.access.web-1.0.0.jar bundle file in the build/libs directory. If you have a Liferay 7 CE or Liferay DXP tomcat environment running, you can drop the jar into the Liferay deploy folder.
This is my personal thing, I always simulate what is going to take place in test and other higher environments where "gradlew deploy" is not going to be an option. I prefer knowing what is going to happen when I get to those upper environs earlier in the dev cycle rather than later. It is totally my personal development pattern that I let slip into the blog posting...
David H Nebinger,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子Jack Bakker:
David H Nebinger:
JSPs from bundles end up compiled into the $LIFERAY_HOME/work directory, if you have a stale JSP you might consider whacking the contents of this directory and starting the server to get fresh JSP compiles.
done the delete of contents in tomcat*/work and tomcat*/temp , didn't allow gradle deploy to hot deploy
JSPs from modules end up in $LIFERAY_HOME/work, not tomcat*/work.
Ok, so from what I think I'm reading in this thread, a '../../../gradlew deploy' from within a ../modules/apps/myapp is supposed to hot deploy. Hmmm... wonder what's up in my approach/enviro then.
Hot deploy is not supported for modules. OSGi tends to keep stale references to older versions, etc. After a deployment, a restart is recommended especially if you see oddball things like this.
David H Nebinger:
JSPs from modules end up in $LIFERAY_HOME/work, not tomcat*/work.
good to know, thanks
David H Nebinger:
Hot deploy is not supported for modules. OSGi tends to keep stale references to older versions, etc. After a deployment, a restart is recommended especially if you see oddball things like this.
But... blade deploy or dropping jar in deploy folder does hot deploy ? yet just a gradle deploy doesn't ? I think we are back to the point of my post in the first place.
David H Nebinger,修改在7 年前。
RE: blade deploy vs gradle deploy
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Hot deploy is any deploy you do while Liferay is running w/o a restart.
for now, I added a gradle task called hotDeploy which depends on build and copies the jar to the portal deploy folder
task hotDeploy(type: Copy){
dependsOn build
from(file('build/libs/ca.domain.server.contactform.web-1.0.0.jar'))
into('/home/jbakker/lr7/client70ce/liferay-ce-portal-7.0-ga3/deploy')
}