Wednesday, April 13, 2011

integrating eclipse with jboss and svn

While this seems to be a trivial task for web developers working with eclipse IDE and Jboss Application Server on their development environment, there are a couple of traps I keep stubling upon. The first one is generating a war file with an empty lib directory. This happens to me with eclipse Galileo and jboss 5.1. While I refuse to upgrade both my IDE and jboss version and ultimetaly resolve the problem, I found the answer on this thread.

The thread basically proposes to change the Java output folder in your jboss server screen, close the project, reopen it, change again the Java output folder and finally redeploy the project. This solves the problem in a non-quick but for sure dirty way.

Just to add up to that thread, I noticed that the problem occured more often after I start my laptop, open eclipse and publish my project to the server. If on the other hand I start my laptop, start jboss via eclipse and then do whatever (write some code, publish it to jboss, restart the server, redeploy my project, etc) it all works as it supposed to be!

The second issue is more of a personal mental glitch rather than a real issue. It has to do with eclipse and svn locking of files. There are times where I synchronize with the repository and want to update my projects. But instead of clicking "override and update" I click "override and commit". I do not want to make other developers angry, so I quickly hit the "Cancel" button. This has the effect of locking the chosen file, not for other users but for me!

I read some threads on how to resolve this, but what worked for me is the following:

1. Close eclipse
2. Go to your workspace, one directory above the directory that contains the locked resource.
3. Rename the directory that contains your locked resource to to xxx_old
4. Take an update
5. Open eclipse and check whether its all good. If yes, delete the xxx_old dir

Thats it!

No comments:

Post a Comment