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

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.

Related

How can i setup Liferay 6.2 tomcat8 server configuration in eclipse or liferay studio? Is it supportable?

Actually i am not able to configure tomcat8 server in eclipse or liferay studio as liferay plugin is showing only 6.2 with tomcat7 option not 6.2 with tomcat8.
enter image description here
Looking at Liferay's 6.2 Compatibility Matrix, it looks like Tomcat 8 is a supported EE configuration when patched to SP15+.
I'd imagine that using a Tomcat 8 server with Liferay would be simpler in their studio than with basic Eclipse, and could probably be accomplished by:
Setting up a manual installation on an existing Tomcat 8 server
(that you've configured) using the Liferay .war (detailed steps can
be found here)
Creating a new Liferay Workspace in Dev
Studio, but deselect the "Download Liferay bundle" checkbox when
creating the workspace, and configure the workspace’s
gradle.properties file to point to the pre-existing bundle by
setting the liferay.workspace.home.dir property.
Alternatively, you could set up Liferay's Plugins SDK to be used with your Liferay version/application server of choice.
If you already have existing projects in Eclipse, though, you could probably modify the steps in this article to use a 6.2 Liferay .war with Tomcat 8 in Eclipse.

Integrating JBOSS and Eclipse

I have JBOSS server. I used to make web applications using just notepad++. I used to create the necessary folders like web-inf and files like web.xml. For larger projects doing all this and manually compiling has become cumbersome. I want to use eclipse for that. I saw this tutorial - http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html . But I don't understand how to make a server. I already have a server. What I want to do is write JSPs and Servlets in eclipse and the build should automatically be deployed in jboss server.
How to to this?
Install JBoss Tools
After that follow the instructions from here to get started and deploy apps to JBoss Server.
To automatically deploy apps after the build you could use a build tool such as ANT or Maven.
I wrote a tutorial for this some time ago: Setting up web development environments with Eclipse
It shows how to setup JBoss within Eclipse (in addition, it also shows how to setup Tomcat and Weblogic), and also shows how to build a simple sample Servlet to verify the proper installation.
If you already use JBoss on the server side, then have a look at the client side as well: http://www.jboss.org/developer
(I haven't tried it myself, but...)
Just open eclipse then go to:
"Help-> Check For Updates" It will check for eclipse updates and installs new availables.
Now "Help -> Eclipse Market Place" Search for "Jboss tools" from search result select one(as your eclipse version) and install it. It will add adapter for new jboss versions.
Now add new server from server view select Jboss version then next add your Home directory of jboss. Then finish.
Step 1 is optional but it sometime it helps.

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).

How to register existing Glassfish server in Eclipse?

I have previously installed Glassfish and been using it with Netbeans. I have decided to switch to Eclipse. Now, I have installed Eclipse. When creating a new Dynamic Web Project, it does not show Glassfish, so I installed plugins for it but what it does is to install a new Glassfish server.
How will I tell eclipse that I have already a Glassfish server and point it to that?
You can register a server in the Preferences---> Server---> Runtime Environments .
The main point is that you should install The server adapter for Glassfish in order to integrate the glassfish to the eclipse . You can refer here , and here for the tutorial.

How to redeploy the web app using the Eclipse IDE

Im new to Eclipse. I use Tomcat as my run time server, but every time I modified the jsp pages, Eclipse was still displaying the older one. Just wondering how to redeploy the application so the changes can be reflected.
Eclipse: Eclipse IDE for Java EE Developers 1.2.1.20090918-0703
Tomcat: Tomcat 6.0
Thanks
Doubleclick the server instance in question in the Servers view to open its configuration. Now, in the right top you should see a section called Publishing. Open it to verify and configure autopublishing settings.
Eclipse should do that automatically for you.
Otherwise, on the Servers view (Menu Window->Show View->Servers), you can right click on your Tomcat instance and hit "Publish" or "Restart"
Make sure you have the "JST Server Adapters" ("Web, XML and Java EE Development category") feature installed.
Eclipse's publishing functionality requries the project to be a "web project", and in some cases requires additional configurations.
Go to Windows > Preferences > Server > Runtime environments and add your tomcat
Either try using publishing, or (better I think) use the FileSync plugin. There you can tell which folders from your project should be copied (live) to what directory on your machine (the tomcat/webapps/yourapp). With a little more effort the filesync configuration can be made machine independent (only using one parameter as TOMCAT_ROOT), in case you want to check-in the project to a repository where others will use it.
Get the Tomcat plugin. It was nice because you can install Tomcat on your system and then associate your web app with that instance of Tomcat. The plugin will let you stop/start Tomcat and define a server such that when you do a build it knows how to deploy the changes. There may be some newer plugin but the Tomcat plugin worked for me and was fairly simple to install and use. Here is a page from IBM on using Eclipse and Tomcat. Inside that page it points you to the following: http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/