This Maven ghost is not unique to Ubuntu . He can be seen in windows version of eclipse too.So what does he do? He just makes all maven dependencies disappear from Eclipse !!!. Deadly dangerous right?
After getting back all my plug ins , i was a happy worker. But Eclipse was not happy.So it launched maven ghost against me.One evening i see all the maven dependencies are disappeared from package explorer. The project was building fine which means all dependencies were there.But they just disappeared from the eclipse view.
I restarted Eclipse .No effect. I cleaned it so many times.No effect.I rebooted my system itself . No effect.So started to Googling about it. After one hour of search i found out that two small setting will change everything. I am sharing with you this , may be it will be useful if you come across this ghost.
For every project ,Eclipse maintains a .classpath file. Just add the following line to the .classpath file of the project in which maven dependencies are missing.
classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"
This enables the eclipse to show maven dependency folder.
That's not enough. By this setting it only some jars . If you want to see all dependencies
got to .settings folder. Then in org.maven.ide.eclipse.prefs change
includeModules=false
to
includeModules=true
Just restart the Eclipse.
Maven Dependencies are back and ghost is not here. May be he went to your place , just be aware :)
Update : This ghost is unique to Maven plug in 0.10 version. It does not appear in 0.98 version
Aug 31, 2010
Aug 28, 2010
Ubuntu at work - Part 2 Where are the plugins
Plug-ins are the most exciting things in Eclipse. They are the one which make Eclipse so exciting as a development tool. Virtually there is an Eclipse plug-in for every java tool out there. Our product also uses a lot of plug-ins. But today I discovered a strange thing in Eclipse. Some of the plug-ins simply disappeared from the IDE window. OMG!!! it took hours to download them and now they are missing and another strange thing is that every time eclipse starts it loads different set of plug ins. This post discuss how to solve this mystery.
Eclipse to Ubuntu : Hey I want to load 2000 plug ins
Ubuntu : No dude ! You can load only 1024 of them.
No.of open files in Ubuntu
If you execute
$ulimit -a you can see the system parameters limiting the resources. In those parameters no.of open files for a given process is defined. In ubuntu its 1024 files by default. But as no.of plug-ins grow in the eclipse, this limit is inadequate. So we have to set this parameter to a higher number. But sadly there is no direct way to do this. So we have to follow the following steps to change the parameters
Step 1: Add “session required pam_limit.so” to /etc/pam.d/common-session
$sudo vi /etc/pam.d/common-session
Step 2 : Un-comment same line in /etc/pam.d/su
$sudo vi /etc/pam.d/su
Step 3 : Add “ * hard nofile 10000” to the /etc/security/limits.conf. Here 10,000 is the limit which we want to set for per process basis. You can choose your own limit.
$sudo vi /etc/security/limits.conf
Step 4 : Reboot your system
Step 5 : Login and in terminal type
$ulimit -n 10000
Now this will set to no.of open files to 10,000.
Hurray!!! Plug ins are back again. Time to work again ...see you
Eclipse to Ubuntu : Hey I want to load 2000 plug ins
Ubuntu : No dude ! You can load only 1024 of them.
No.of open files in Ubuntu
If you execute
$ulimit -a you can see the system parameters limiting the resources. In those parameters no.of open files for a given process is defined. In ubuntu its 1024 files by default. But as no.of plug-ins grow in the eclipse, this limit is inadequate. So we have to set this parameter to a higher number. But sadly there is no direct way to do this. So we have to follow the following steps to change the parameters
Step 1: Add “session required pam_limit.so” to /etc/pam.d/common-session
$sudo vi /etc/pam.d/common-session
Step 2 : Un-comment same line in /etc/pam.d/su
$sudo vi /etc/pam.d/su
Step 3 : Add “ * hard nofile 10000” to the /etc/security/limits.conf. Here 10,000 is the limit which we want to set for per process basis. You can choose your own limit.
$sudo vi /etc/security/limits.conf
Step 4 : Reboot your system
Step 5 : Login and in terminal type
$ulimit -n 10000
Now this will set to no.of open files to 10,000.
Hurray!!! Plug ins are back again. Time to work again ...see you
Aug 20, 2010
Ubuntu at work - Part1
I am a happy user of Ubuntu from 2 years. It worked smoothly over 5 upgrades.These years I primarily used ubuntu for the academic and personal uses. But now I am out of college and working for a start up company “Zinnia Systems”. Since I am so used to ubuntu , i din’t wanted to switch to windows at work place . Luckily I am allowed to use ubuntu at work place too .So the in next series posts I will share experience of ubuntu at work
Background
Our company is a telecommunication product company . We use java stack for developing our products. So java employs “Write once, Run anywhere” policy should work on any platform, i am trying to develop the product in ubuntu when all working on the windows systems.
System
My system is dell Vostro with 2GB RAM and 320 GB hard disk . It runs ubuntu karmic kola (9.10) . Though 10.04 is the latest i dint had much time to test it, so i am using 9.10 itself.
Day 1 : Setting up the environment
Any company you work ,first requirement will be learning the working environment . So in this post i talk about how i managed to install the tools for getting started
Installing IBM RTC Express-C eclipse client
Since we use Java for development we use Eclipse for coding which is a favorite of most of java developers.We also use Rational Team Concert for source control , I have to use IBM RTC for development .
So i downloaded the IBM RTC from here ( It’s trickier to find )
https://jazz.net/downloads/rational-team-concert/releases/2.0?p=allDownloads (requires registration)
Just download the Linux version.
Button.......Don't click me!!!!!!
“ With choice comes the responsibility”
Though i download the correct version , the buttons in eclipse dint worked.After a lot of googling, I came to know that It’s a bug in 9.10. So i used to the following shell script to launch the eclipse
#!/bin/sh
export GDK_NATIVE_WINDOWS=1
$path to ur downloaded eclipse
This script make sure that correct GDK available to the Eclipse. After configuring this Eclipse is happily responding to the button clicks.
Installing and configuring Maven plug in to the Eclipse
This is one of the most time consuming thing in whole setup . Though maven is small plug in it has too many gotchas with the IBM RTC.
“Update sites don't make life easier “
The m2eclipse repository failed to fetch the plug in for eclipse. After many hours of googling we found that the update site http://m2eclipse.sonatype.org/sites/m2e incompatible with the eclipse 3.4
So if you want maven plug in for Eclipse 3.4 use this repository
http://m2eclipse.sonatype.org/sites/m2e/0.10.0.20100209-0800/
It may save you a day.
“Dependencies hell”
Though I am able to find the correct repository , it always refused to install by saying that it needs a lot of things . I tried to install all those dependencies but it wanted more . Finally i discovered that there is an easy way to do it. Just click on manage sites and check all the sites.Then it automatically downloads the all the required dependencies. Yes it is a long download ..U can take a nap and come back.
So at the end of day , I was able to get the eclipse running and maven was happy to build projects for me.
Its enough for a day.Will be back with another story .Till then happy ubunting :)
Background
Our company is a telecommunication product company . We use java stack for developing our products. So java employs “Write once, Run anywhere” policy should work on any platform, i am trying to develop the product in ubuntu when all working on the windows systems.
System
My system is dell Vostro with 2GB RAM and 320 GB hard disk . It runs ubuntu karmic kola (9.10) . Though 10.04 is the latest i dint had much time to test it, so i am using 9.10 itself.
Day 1 : Setting up the environment
Any company you work ,first requirement will be learning the working environment . So in this post i talk about how i managed to install the tools for getting started
Installing IBM RTC Express-C eclipse client
Since we use Java for development we use Eclipse for coding which is a favorite of most of java developers.We also use Rational Team Concert for source control , I have to use IBM RTC for development .
So i downloaded the IBM RTC from here ( It’s trickier to find )
https://jazz.net/downloads/rational-team-concert/releases/2.0?p=allDownloads (requires registration)
Just download the Linux version.
Button.......Don't click me!!!!!!
“ With choice comes the responsibility”
Though i download the correct version , the buttons in eclipse dint worked.After a lot of googling, I came to know that It’s a bug in 9.10. So i used to the following shell script to launch the eclipse
#!/bin/sh
export GDK_NATIVE_WINDOWS=1
$path to ur downloaded eclipse
This script make sure that correct GDK available to the Eclipse. After configuring this Eclipse is happily responding to the button clicks.
Installing and configuring Maven plug in to the Eclipse
This is one of the most time consuming thing in whole setup . Though maven is small plug in it has too many gotchas with the IBM RTC.
“Update sites don't make life easier “
The m2eclipse repository failed to fetch the plug in for eclipse. After many hours of googling we found that the update site http://m2eclipse.sonatype.org/sites/m2e incompatible with the eclipse 3.4
So if you want maven plug in for Eclipse 3.4 use this repository
http://m2eclipse.sonatype.org/sites/m2e/0.10.0.20100209-0800/
It may save you a day.
“Dependencies hell”
Though I am able to find the correct repository , it always refused to install by saying that it needs a lot of things . I tried to install all those dependencies but it wanted more . Finally i discovered that there is an easy way to do it. Just click on manage sites and check all the sites.Then it automatically downloads the all the required dependencies. Yes it is a long download ..U can take a nap and come back.
So at the end of day , I was able to get the eclipse running and maven was happy to build projects for me.
Its enough for a day.Will be back with another story .Till then happy ubunting :)
Subscribe to:
Posts (Atom)