Incremental publishing on Eclipse Juno and GlassFish 3.1.2.2 - deployment

After updating my Eclipse to Juno and latest GlassFish to 3.1.2.2 I've lost the option to incremental deploy applications from the servers tab (I see the server there and deploys and runs my Java EE apps OK but now if I change any xhtml file I need to redeploy all the app).
I used to have a menu in the deployed application inside the servers where I could do a full deploy or incremental deploy, which I used a lot whenever I did any minor change.
I use an external Glassfish, not the internal runtime and I'm using MacOS Lion.

Related

How to develop Liferay project in Eclipsce juno and built it on on Jboss

I have downloaded the Liferay 6.1 with jboss 7.1.1 Bundle and Liferay IDE(Eclipsce Juno).All I have to do is to develop Liferay Project and running it on Jboss server.
I can able to run and open liferay portal in localhost:8080/
I am having issues in developing Liferay portal project.As default server adapter for Liferay in IDE is Tomcat 7.0 and I couldn't able to find Jboss server adapter.I tried by running and deploy it on Tomcat and running the Jboss server by running standalone.bat file.
Please advise and help in develop and running Liferay project on Jboss
There's guide in Liferay Wiki about developing with non-Tomcat Liferay bundles. There you can read about the disadvantages of that kind of development and how to do it if you still want.
But I agree, developing with Tomcat is definetely the better idea.
Liferay IDE is meant for development with Tomcat only since tomcat's start-up time, its simple structure and comparatively easy configuration makes it ideal for a development environment.
If you are development plugin projects like themes, portlets, hook, layouts etc then if it works on tomcat it would work on any other server running with Liferay, so during development you can use tomcat and then when you have completed your development iteration (i.e. when your project is ready to be deployed for testing or for stage environments) you can deploy the WAR to Jboss for testing and can do some testing to see if it works fine.
Since the plugins are made in such a way as to be independent of the underlying Server, there should not be any issues developing them on Tomcat and then running them on Jboss.
Hope this helps.
I achieved it through a work around, steps mentioned # https://www.liferay.com/community/forums/-/message_boards/message/17864836
Benefits of Liferay IDE plugin+ JBoss as runtime configured in IDE.
Only issue is you'll need to use any other eclipse based IDE which supports JBoss AS 7.1.1 as normal server/runtime (like JBoss Developer Studio).

Eclipse + JBoss Tools won't run webapp to configured JBoss AS

I am using Eclipse 3.7.2 with JBoss Tools 3.3 under Ubuntu 12 and have configured a locally installed copy of JBoss AS 7.1.1 in Eclipse under "Preferences::Server::Runtime" Environments.
However, when trying to run a Java EE application by double-clicking on the project or an .xhtml page I only see "Run As / Run" on Server as an option and I get an HTTP 404 from Apache Tomcat/7.0.26 at localhost:8080. That is, it seems like Eclipse is trying to deploy to a Tomcat server as opposed to the JBoss AS I have configured in "Preferences::Server::Runtime" and I don't get an option like "Run on JBoss" or anything. When I export my application as a war and manually deploy to JBoss AS the app runs fine.
The idea is to add your application to a specific server that you have configured. Additionally; just adding the server runtime isn't enough.
You need to open the Servers view, and from there right click on the background and select New, and then Server. If you choose JBoss Community -> JBoss AS 7.1 here, you can select your previously created Server runtime in the Server runtime environment, or optionally create a new one.
Then comes the mental twist that you need to make. In WTP you don't use the Run As command, but instead right click the server in the Servers view (default name should be JBoss 7.1 Runtime Server, and select Add and Remove. Select one or more applications from your workspace that you would like to run on your server. Click finish when done.
Now right click again on your server, and choose either Start or Debug.

Is it possible to integrate Glassfish support into Liferay IDE yet?

I am looking for a bit of Liferay/Glassfish assistance here.
I am currently using a Liferay 6.0.6 portal running on Glassfish 3.0.1 and developing in Eclipse 3.7 (Indigo). I have downloaded the Liferay IDE for Eclipse as well.
The trouble I am having is in actually developing in Eclipse against a Glassfish server. I cannot create an actual Liferay project in Eclipse because the wizard requires me to specify a Liferay-Tomcat runtime environment.
Now I realize that this is the only server that is supported for the Liferay IDE as it is clearly documented in multiple places on the Liferay website and various forums around the web. However, I seem to recall one site (which, of course, I didn't bookmark :/ ) that gave instructions on a workaround for using Glassfish within the Liferay IDE. I believe it had something to do with creating the initial project as a Tomcat project, then going behind the scenes and changing some configuration files' Tomcat references to point to my Glassfish server.
I have set up my Liferay SDK environment correctly, including the build.username.properties file. I have this file pointing to my Glassfish server.
#
# Specify the paths to an unzipped Glassfish bundle.
#
project.dir=C:\\DEV\\myworkspace
app.server.type=glassfish
app.server.dir=${project.dir}\\..\\bundles\\liferay-portal-6.0.6\\glassfish-3.0.1
app.server.deploy.dir=${app.server.dir}\\autodeploy
app.server.lib.global.dir=${app.server.dir}\\domains\\domain1\\lib
app.server.portal.dir=${app.server.dir}\\domains\\domain1\\applications\\liferay-portal
However, everytime I try to do a deploy through Eclipse...
...this build.username.properties file gets overwritten with Tomcat settings from the runtime environment.
app.server.type = tomcat
app.server.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29
app.server.deploy.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\webapps
app.server.lib.global.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\lib\\ext
app.server.portal.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\webapps\\ROOT
Is there somewhere else that I need to make a change in order to get Eclipse to recognize my Glassfish server?
Any help or tips would be greatly appreciated.
It is not currently possible to use a Liferay+Glassfish bundle directly as a runtime or server adapter in Eclipse with the Liferay IDE plugins. As you pointed out the only runtime and server adapters for Liferay IDE are the tomcat bundles. However, you can still use Liferay IDE to develop with Glassfish by using the following receipe with version 6.0.6 and current version of Liferay IDE.
Download Liferay+tomcat bundle
Configure it as a Liferay runtime
Create the project pointing to Liferay runtime
Go to Window > Preferences > Liferay > Installed SDKs, switch "update build.properties" option to Never
Launch Glashfish externally using startup script
Modify the build.properties in your SDK to point to Glasshfish as runtime
For deployment use the SDK deploy action just as you showed and it should be deployed to glassfish.
This should work for now. In the future, we will be adding support for Glassfish server to our Server Manager plugin that can be using with Liferay IDE and Liferay 6.1 for remote deployment and development, so it will work just like a local tomcat instance except it will be remote Liferay running on glassfish or jboss, or whatever you like. But right now the Server manager plugin in 6.1 beta4 only supports Tomcat6/7 and Jboss7. We hope to add Glassfish very soon.

How do I - Incrementally deploy in debug mode and other wise using Eclipse Helios and JBoss Tools

Environment
Win7
Eclipse Helios, Eclipse 3.6.1
Java 6
Jboss Tools version 1.0.0.v20110123-0129-H10-CR1 from the nightly builds
Jboss 4.2.3
In the past I used MyEclipse, which is a paid tool. In myEclipse, it's easy to configure a JBOSS Server and then deploy
your webproject in it. While in debug mode, if I change a java class (OR JSP), its changes are immediately reflected under Jboss and
I can test that change, without doing any explicit redeployment
So myeclipse had these features working outof the box....
I'm trying to accomplish same functionality with Eclipse Helios and Jboss Tools
Case 1
I added the Jboss Server via Java EE perspective->Add Server etc...
And then added my WebProject to this Jboss Server
When I right click on this added project and publish from here, it runs an ant script, to create a single (Standard) war file...and it always does the whole thing over.
I dont get a choice to deploy it expanded and anything to specify an incremental deployment
Case 2
Since Case 1 didnt allow exploded war and anything incremental, I decided to use JBOSS Tools
So I opened, Window->Show View->Other->Jboss Tools->Project archives
Selected my webproject, after which it showed up in the "Project archives" tab
So then....Right click on the project name in "project archives" tab.....->New Archive->WAR...and I added my project to deploy in exploded form. ok.
Now if I right click on the added WAR and click "Build Archive (full)"....it deploys the whole web project. Everytime it does the whole thing, instead of incremental.
Since that option didnt do it incrementally, so I right clicked and clicked "Publish to Server". The window that pops up, doesnt show me any servers...from where do i add to this?
In summary....
A) I havent seen any way to incrementally deploy
B) When I'm in debug mode, my java file changes dont reflect immediately...I dont mind redeploying, but since its not incremental, its annoying to do the whole thing over and over.
So question is ...
1) How do I do an incremental deployment?
2) How do I configure this, such that my changes in java classes are reflected immediately when in debug mode.
btw I have seen people suggest an alternate soln to use a custom ANT script....But will ANT script incrementally deploy, if I use it's copy command?
Thanks
Amit
It's MUCH simpler than this.
Forget about JBoss tools Archives, simply use the WTP adapter that JBoss tools provides. This one does incremental deployment (like MyEclipse).
Make sure you install JBossAS Tools from JBoss tools (yes the name sucks). Its description is:
Provides a WTP adapter for JBoss AS 4.x and 5.x. Supports incremental and exploded deployment.
Dish the WTP Server adaptor you created earlier from "Add Server etc..." and do it again, but this time don't choose from "JBoss" but choose from the new folder "JBoss Community". You'll see several new adapters there with the red logo and a slightly different name (e.g. WTP bundled is JBoss v5.0 but the one supplied by JBossAS Tools is JBoss AS 5.0).
Alternatively you can also use JRebel, which does incremental deployment no matter what WTP adapter you use (you disable the automatic deployment in that case).

how to get jboss tools to not automatically deploy on server start

ive just upgraded to eclipse 3.6 and i have a seam application running on jboss 5 with the latest version of jboss tools. my problem is that when i opened an xhtml page it asked me to activate the jsf components. i went ahead and did so and now my problem is that when i start jboss inside of eclipse it automatically deploys an exploded version of my app. i don't want this, i use ant to build and deploy the app and just use jboss tools to start and stop the server. i need to turn this feature off, does anyone have an idea how to do it?
Double click the server and select the radiobutton that says "Never publish automatically"
btw. you can also enable "Deploy projects as compressed archives" if your problem is that the deployment is exploded.