| Next page
Wednesday Sep 19, 2012
Speedup Eclipse Juno
To my mind, the new Eclipse release 4.2 (Juno) is a little bit slower than Eclipse Indego.
To make it faster I changed the following things:
- disable validators
I disabled all Validators until 'Classpath Dependency Validator', 'Facelet HTML Vlvalidator' and 'HTML Syntax Validator'
- disable maven index update
I disabled also the maven plugin feature 'Download repository index updates on startup'
Sunday Jul 22, 2012
Eclipse Juno - Maven support
The new Eclipse build 4.2 (Eclipse Juno) is out and I started using it for my own Maven based Java EE projects. After playing around with several plugins concerning the maven integration, I came to the conclusion that the Maven-WTP integration in Eclipse is still something you did not need and you should not use. It slows down my complete workspace containing different multi-module maven projects. Maybe its only my IDE installation of Eclipse 4.2, but I recognised a permanent CPU peak as result of a never ending WTP Builder process. After I removed the "Maven Integration for WTP" Eclipse Juno works again very fast.
So here is my recommendation for plugins that you should install in Eclipse 4.2 (Classic) if you are developing Maven based Java EE projects:
- JavaServer Faces Tools (JSF) Project (for JSF/Faclets support - much better than in Eclipse 3.7)
- JST Server Adapters (for GlassFish Server Adapters - see also my blog about GlassFish 3.2 support)
- m2e - Maven Integration for Eclipse (the general and pure maven integration)
- Subversive Integration for the M2Eclipse Project (necessary if you work with SVN - see another blog entry)
And do not install the "Maven Integration for WTP" plugin.
If you are looking for a simple Hotdeployment Plugin for Eclipse/GlassFish take a look at Manik hot-deploy.
Saturday Jul 21, 2012
Eclipse Juno - Maven & Subversion
The new Eclipse release (4.2) is out and looks great! To run a first IDE test I tried to checkout some maven projects from my svn repository. M2E and the Subversive Plugin are not installed in the Eclipse classic platform (can't understand why) but can be easily installed manually from the menu "->Help->install new Software"
After restarting Eclipse you can start importing your maven project with "->File->new-> project->Checkout Maven Projects form SCM"
The problem here is hat the SVN connector for m2e is missing and can not be installed by the dialog showing up all available maven add ons. To solve this problem go again to install new software manually and add the following update URL:
This updatesite includes the missing svn/m2e connector. After a restart you can checkout your maven project from a SVN repository using the Eclispe subversive plugin.
Thursday Jan 12, 2012
Eclipse and Gnome Shell
Today I stumbled into a problem with my eclipse IDE running in Ubuntu 11.04 with Gnome shell. When trying to run the BIRT plugin with external XML resources the popup dialog prompting for username/password did no longer appear and I got a http error message 401. I think similar problems can also appear with other plugins in eclipse or eclipse based applications.
To solve such a problem it is necessary to provide a customized startup script. To create such a script change into the folder were your eclipse is installed and create a new file named 'eclipse_gnome'
Next make it executable by running the command
chmod +x ~/eclipse_gnome
Now edit the file with the following lines of code
With the GDK_NATIVE_WINDOWS variable eclipse changes the way to handle windows internal. And this will fix difernt problems working with eclipse in Gnome shell.
To start eclipse use the new script.
If you have installed eclipse through the ubuntu software-center then your eclipse executable is located in the folder /usr/lib/eclipse/eclipse. In that case you can change the content of your start script like this:
Monday Aug 15, 2011
Eclipse Indigo - Maven and SVN
With the latest release from Eclipse - Indigo - now Maven is well supported. So it is no longer an ordeal to install maven support and especially svn integration.
To add the Maven with SVN into Indigo it is sufficient to got to "help -> install new software"
There you can select the Indigo plugin repository 'Indigo - http://download.eclipse.org/releases/indigo'
Go to the section 'Collaboration' and select the features "m2e - Maven Integration for Eclispe".
Now you have maven support provided by the sonatype plugin "m2Eclipse"
If you need also Subversion support you should add the Subclipse
Plugin. (this works in most cases better than the Subversive SVN Team
Provider). To add sublicpse to Ecipse Indigo you need to add the following plugin site:
From this update site you can choose all Sublicpse Plugins to bee installed.
Checking out a Maven Project from a SVN repository
To check out an existing Maven project from an subversion repository you need the additional scm connector. To get this connector installed simply create at first a new project from the 'New Project wizard' - (menue 'File -> new project')
Select the project type : "Maven -> Checkout Maven Projects from SCM":
Now you will see the dialog box to select your Target location:
The first time you can not choose a valid SCM URL type. You need first to install a SCM Connector for Maven and SVN. Click on the LInk 'm2e Marketplace'
You will see the m2e Marketplace where you can now select the "m2e-sublicpse" or the "m2e-subversive" connector (this depends on the subversion plugin you installed before - as noted here I recommend sublipse instead of subversion! - do not pay attention to the next screen shot!):
Note: If you are using a different SCM system you have to select the corresponding connector type
After the Installation finished you can select the SCM URL Type and enter your repository URL:
Alternatively you can also checkout a project from the SCM view with the option "checkout as maven project"
Saturday Apr 09, 2011
Eclipse Helios - JSF Content Assist for xhtml files
After I upgrade my Eclipse IDE form Galileo (3.5) to Helios (3.6) I
wondered that the Content Assist for xhtml files is not working. This
was a problem with all early versions of eclipse (See my blog for Eclipse Galileo).
Read my tutorial how to configure Eclipse Helios to support the Content Assist for XHTML Files in JEE Web Modules.
Sunday Feb 06, 2011
Glassfish Debug Mode no longer working in Eclipse
I was faced with a strange problem in my eclipse. When I start my glassfish out from eclipse in debug mode the debugger did no work properly. When I set a breakpoint the eclipse ide stops but was unable to open the corresponding java source file. So the code line of a breakpoint was not shown in the editor. So it was impossible to use the debugger.
The reason was because of a bug in an early jdk 1.6 version. I was running the glassfish with OpenJDK 6. And after I changed the glassfish server launch settings in my eclipse IDE from OpenJDK to sun-jdk 1.6.0_22-b04 the debugger works fine again.
here are the details about that issue:
Tuesday Sep 14, 2010
Incremental deplyoment for Glassfish Server
One of the most frustrating things of Eclipse is the poor support for Maven JEE projects by the Web Tools Plattform (WTP). Especially the incremental deployment, which is a cool feature of Glassfish Server is not supported by wtp. This was the reason why I started a new project with a small Eclipse Plugin to speedup maven based development of JEE apps in Eclipse:
See the manik-hot-deploy project site: http://code.google.com/p/manik-hot-deploy/
If you have any comments ore suggestions about this plugin let me know!
Sunday Jan 31, 2010
Eclipse Galileo - JSF Content Assist for xhtml files
In the past I wrote some articles about how to configure Eclipse to get a content assistance for xhtml files in a jee project (things like code completion and mouse over hints). (see: Ganymede and faclets and Eclipse JSF/Facelet Support)
As Thiago dos Santos Prado posted in one of the comments all the stuff of configuration seems to be dispensable in Eclipse Galileo. But still Eclipse galileo is not disposed to support content assistance for xhtml file out of the box. I can't find out why Eclipse ignores xhtml files in most jee projects as this is a standard file format for JSF applications. Maybe that the problem only exists for Maven based projects as maven is a little bit untended in Eclipse IDE.
But it seems to be now very easy to add this missing feature simply by adding an additional content type for xhtml files:
- Open "window" > "Preferences..." and select "General" > "Content Types"
- Next click the button "Add..." button and add the new content type ".xhtml"
- Finally check if the File Association for .xhtml Files is set to "JSP Editor". In my case this is already configured right.
Now you have content assistence for Java Server Faces and also all included JSF third libraries like RichFaces or MyFaces.
Wednesday Jan 13, 2010
Maven & SVN Plugins for Eclipse Galileo
Today I installed the Maven M2 and Subversive Plugins in my Eclipse Galileo Installation.
This is a little bit tricky because the M2 Plugin needs some additional Plugins if the Plugin should work together with the Subversion Plugin Subversive.
These are the steps I go through the Eclipse Update Manager to get all things work:
First I added the Suversive SVN Team Provider provided from the Galileo Download Site. This Site is available in the Eclipse "Install new Software" Dialog. Select the Option:
"Collaboration->Suversive SVN Team Provider"
After restarting Eclipse the SVN Plugin will ask for a Subversive Connector. This is a new cool feature so you did not add an Updite URL for these plugins manually. I selected only the option SVN Kit 1.3.0:
...the wizard will select two additional plugins to be installed next...
In the next step I added an additional Plugin which is needed to get a better Maven/SVN Integration.
Therefore I added in the Eclipse Install Dialog the following new Update site:
From This site I selected only(!) the Plugin
"Subversive SVN Team Provider (Incubation)"
After Restarting Eclipse I add now the "SVN Maven Support" provided by the following Update Site:
This is an additional Plugin needed to get better SVN Support. I select the "Subversive Integration for the M2Eclipse Project" Plugin:
Now finally its time to add the Maven Integration Plugin itself form the Update Site:
You should not(!) select the Maven SCM Integration if you followed my recommanded installation steps.
So I select the MavenEmbeder, Pom Editor and Maven Central Repository:
After restarting Eclipse Galileo once more you can now Checkout a Maven Project from any SVN Repository with the option "Check out as maven Project..." and use the M2 Integration Plugin Features like the POM Editor.
If anybody knows an easier way to get Maven and SVN Integration for Eclipse Galileo installed please let me know...
Thursday Aug 13, 2009
Eclipse Galileo and the Glassfish Server Plugin
For some reasons it is not possible to install and add the Glassfish Server Adapter in Eclipse Galileo with the Buildin Wizard form the "New Server" Wizzard (Function - "Download additional server")
But you can add the Glassfish Server Adapter easily with the "Help->Install new Software" Dialog, using this additional Download URL:
Saturday May 23, 2009
Eclipse JSF/Faclet Support in a Maven Web Project
In the following section I will describe how to configure a Maven Web Module in Eclipse Ganymede to get full support of Content assist, Hover Help and code completion for JSF and Facelets.
These features are supported by the Eclipse Web Tool Platform (WTP). So it seams not to be so difficult to configure a existing web project. But as Maven have some different in building a classpath and updating project configuration in Eclipse you need to be careful to reconfigure a Maven project. I spent a lot of time to find out why it sometimes did not work. So I hope my following walk-through will be helpful to you.
I have an existing Maven Web Project which I checked out from a code repository into my eclipse workspace. Therefor I used the Maven Plugin and the Maven SVN Integration Plugin.
The Maven Project I am working with is a JEE Web module with JSF and Faclets support and also uses the JBoss RichFaces JSF components.So the goal is to get content assist when editing a .xhtml faclets file in my web project.
The Facelets Plugin
To get things run I need first to install the faclets plugin for eclipse. The reason for adding this plugin is that a faclets application typical uses .xhtml pages to represent the jsf resources. The Eclipse WTP did not support .xhml files per deault so the faclets plugin will add the JSF features to also .xhtml files. Additional the plugin includes some wizzards and a new WTP Facete.
You can download the plugin from here. Extract the file and copy the jars into your /plugin folder of your Eclipse Ganymede. Next restart Eclipse!
Adding a JSF Implementation and Server Runntime
Next step is to add a JSF Implementation into you Eclipse Workspace. You can use any Implementation. I take the JSF Implementation form my Glassfish server. There is a Blog where Cay Horstmann explains the details:
So open the Eclipse preferences dialog and go to Web->JavaServer Faces->Libraries.
a new JSF library and name the library "GlassfishJSF-impl". Add only
the jsf-impl.jar file. This file is located in the /glassfish/lib
folder from your glassfish installation.
Important: Make sure that the option "is JSF Implementation" is checked!
Next add the Server Runtime. Select the Server Node and add your JEE Server (in my case glassfish)
Now Restart you Eclipse!
Add the Server and JSF Libraries to the Java Build Path
Next check the "Java Build Path" settings of your Web Project. You need now to add two libraries to your project.
The Server Runtime Library of Glassfish and the JSF Implementation which added before to the workspace environment.
Click "Add Library..." and select "Server Runtime"
Choose the Glassfish Server from the Server Runtime list. Click finish.
Next I add the JSF Library created before. So click again
"Add library..." and add a JSF Library and select you GlassfishJSF-Impl
Finally your project library settings should look like this
Add the JSF and Faclets Facets
Next you need to add the Project Facets for JSF 1.2 support and Facelet 1.0. A Facet is a WTP specific feature which adds additional tools and features to a web project. The Facelet 1.0 Facete is an additional feature added by the Facelet plugin I added before.
To add a new Facete you open the preference dialog for your web project and select the "Project facets" node.
If this Node is not present in you project preferences Eclipse has not recognized your Maven web project as a Eclipse Web Project. So you need first to add the WTP Nature to your project manually.
- Switch in the "Navigator" View
- open the file ".project"
- add the nature
- save the .project file
Now you can add the different facets in the following order:
- Select Java 5.0
- Select Dynamic Web Module 2.5
after that you can see the link "Further configuration available" - open the dialog
As I am working in a maven project I change the Content and Java Source Directory into
which are the default maven source folders
Also I unchecked the "Generate deployment descriptor" as my maven project still have the necessary descriptors.
- Next Select "JavaServerFaces 1.2".
Again there is "Further configuration required"
You can select the option "Server Supplied JSF Implementation"
Choose the "Next" Button to switch through the different config pages.
- Finally add the "Facelet 1.0 " support.
Again there is "Further configuration available"
I disabled all options as my maven project is well configured
- Finally restart eclipse
Now you should have the content assist and hover help in your xhtml files.
Eclipse is parsing all necessary libraries so also my RichFaces tags are now known by Eclipse!
The first time you get the content assist from Eclipse it will take some time as Eclipse needs to analyze the tag libraries.
If it did not work...
In some cases this did not work. Then the main reason seams to be that the Eclipse java build classpath is not well configured. Check the Java Build Path settings. Remove and add some Libraries - this will help Eclipse to update the Workspace settings and restart Eclipse. Also wait some time after restart until Eclipse have finished all inizalizing.
Thursday May 21, 2009
Error deploying EAR on Glassfish - error expanding jar
Today I was faced again with a deployment problem on glassish. When I tried to deploy my EAR application on glassfish I got some strange errors telling me that Glassfish was not able to expand some jars in my ear. In other cases an error can be that glassfish is did not find a jar in ear.
The problem occurs only when I build my EAR with Maven inside Eclipse Ganymed on a Windows Mashine. The Reason is the missing version tag in the ear pom file
I often did not use the version tag in the configuration of my maven-ear-plugin. But if you do so in Eclipse ganymede running on a windows machine the Eclipse/Maven Plugins will generate a EAR 1.3 Module! So the build process will add a wrong application.xml file into the ear.
This is strange as using eclipse on linux did not run into this configuration conflict.
anyway - do not miss the version tag in your ear pom! And if you run in the situation described here also clear your maven projects befor you run a new install. otherwise the old applicaiton.xml fill will stay in you target folder!
Saturday Mar 28, 2009
Eclipse: maven install from runAs menu fails
A few days ago I updated my eclipse Ganymede via the update manager. After that I was unable to build my Maven projects with from the "runAs -> maven install" context menu:
I got the following error when I try to build my EAR module
[INFO] org.imixs.callcenter.ear .............................. FAILED [0.634s]
The following mojo encountered an error while executing:
brought in via: packaging: ear
While building project:
From file: /home/rsoika/eclipse-ganymede/sywapp/org.imixs.callcenter/org.imixs.callcenter.ear/pom.xml
Reason: Cannot copy a directory: /home/rsoika/eclipse-ganymede/sywapp/org.imixs.callcenter/org.imixs.callcenter.web/target/classes; Did you package/install active project artifact:
artifact = org.imixs.examples:org.imixs.callcenter.web:war:0.0.2:compile;
project: MavenProject: org.imixs.examples:org.imixs.callcenter.web:0.0.2 @ /home/rsoika/eclipse-ganymede/sywapp/org.imixs.callcenter/org.imixs.callcenter.web/pom.xml?
[INFO] For more information, run with the -e flag
[INFO] BUILD FAILED
I can build all modules separately and it seams to be an known issue form the m2eclipse plugin (http://jira.codehaus.org/browse/MNGECLIPSE-1173)
The problem seams to be the "Resolve Workspace artifacts" option. My workarround was to use my own "run as" configuration.
When I use these settings (see "Resolve Workspace artifacts" is disabled!) everything works fine for me.
But I did not find out how to change the "Resolve Workspace artifacts" option in general for eclipse.
Sunday Sep 14, 2008
Debugging Glassfish with Eclipse
To use remote debugging in eclipse in conjunction with Glassfish there only two configuration steps necessary:
1.) enable the Debugging in the Glassfish Server Configuration
- Open the Web Console and choose menu "Application Server".
- go to the Tab "JVM Settings"
- enable the Debug mode
2.) In your Eclipse you need a extra Debug Program Configuration
- Choose in your Eclipse the Menu "Run -> Debug..."
- create a new "Remote Java Application" for example "Glassfish Debuger"
there you cann edit the Projekt and also the remote Port of the System. you need to change form 8000 to 9009.
Now you can start the Debug Mode from your eclipse by running "Debug->Glassfish Debugger"
See also the following blog