Posts Tagged ‘eclipse’

Eclipse PDE Build: Unable to find plugin XYZ

April 22nd, 2010 | By Christoph in Software-Development | No Comments »

Today I had the problem that suddenly my headless Eclipse PDE Build process wasn’t working anymore as soon as I added a new Bundle project to my feature.xml.

[java] /Applications/eclipse_3.5RC3/plugins/org.eclipse.pde.build_3.5.0.v20090527-1800/scripts/genericTargets.xml:106: Unable to find plug-in: bundlexyz

I first thought there is something wrong with the plugins MANIFEST.MF, but everything was ok.
It turned out that the new project I have created was in the wrong folder.

All my other bundle projects are inside a folder locally under /development/repo/myproject/plugins/bundle123 there is also my main ant build.xml.
and my Eclipse is under /development/workspace/ and
links to the repo folder.
Now, when I had created my new bundle project (which PDE Build complains about now) by accident I had forgotton to change the the location. I should have unchecked the checkbox “Use default location” put the new plugin into /development/repo/myproject/plugins/bundlexyz instead of under my workspace folder.

Solution:
1. Right click on your project and choose “Refactor > Move”
2. Choose the folder  /development/repo/myproject/plugins/bundle

After that change PDE Build stoppped complaining.

Remember: When using headless PDE Build, you have to put new plugins into the same location as all your other plugins. In Eclipse UI it will work, but in headless mode on the command line it will not work.

SVN ignores file extension .so by default – which corrupted my build

März 1st, 2010 | By Christoph in Software-Development | 3 Comments »

I was just working on my currently OSGI project which is build with Eclipse PDE headless for multiple platforms.
The Eclipse Deltapack contains a launcher bundle (directory) called org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520 which contains a file called eclipse_1206.so.
This launcher bundle I also committed to my SVN repository for my headless build from the build machine.

I was wondering why my build was always broken and corrupt and I found out that in my SVN repository the eclipse_1206.so file was missing…and indeed it was NOT committed.
I first thought I made a mistake, so I removed and recommitted everything. And again, the eclipse_1206.so wasn’t there.

So I started googling and I found this which directed me to this. Apparently *.so files are igored by SVN by default even though there is no svn:ignore property set.

Solution:
In order to solve this I did the following:

  1. Open the file ~/.subversion/config
  2. Remove the comment from the line which starts with # global-ignores
  3. The line looks like this now: global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store

As you can see the .so file extension is not defined anymore and suddenly .so files also show up in my SVN Commit Dialog (I am using svnX on MaxOSX).

This also explains a bit my most recent issue I was having with a broken Eclipse build.

I am not too sure if this is a good default by SVN to ignore .so files as those are shared objects in Unix Environments which are important for Multi Platform builds in my case. Anyway I found this out and solved the problem.

Eclipse PDT and XDebug finally working

Oktober 5th, 2009 | By Christoph in Software-Development | 1 Comment »

Yesterday I wanted to give myself a little update what’s going on in the PHP world as I was deeply involved in Java/J2EE in the last 4 years and haven’t done any PHP work besides maintaining some of my websites.
So I decided to give the Zend Framework a try and started going through the Quickstart guide.

Something what always enjoyed in the Java world was the availability of easy debugging. In PHP in the past I have used ugly “echo …” debugging statements and never really digged any deeper. Now the time has come and I read that it is possible too but maybe with some more setup efforts.

Environment

The following articles helped me to get setup:

Even though the articles are pretty good I had some minor problems, especially figuring out what exactly I have to add to my php.ini.

That’s why I give you what I have added to the very bottom of my php.ini which lives in the following path: /Applications/xampp/etc/php.ini

[xdebug]
zend_extension=/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.auto_trace=1
xdebug.remote_enable=On
xdebug.remote_host=”localhost”
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”

The xdebug.so was mentioned in first tutorial above and I got it from here (Komodo IDE: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging)

Here are some important infos and screenshots which might be helpful in understanding my setup:

  • php executable: /usr/bin/php
  • php.ini: /Applications/xampp/etc/php.ini

One of the most important things was the Path-Mapping, which maps your Eclipse Project structure to the URLs of your web-application.
URL of my app in the browser: http://localhost/zendtest/ZendFramework-1.9.3PL1-minimal/quickstart
Local-Path: /Applications/xampp/xamppfiles/htdocs/zendtest/ZendFramework-1.9.3PL1-minimal/quickstart

This mechanism is important, because it tells the debugger when to stop. If those settings are not correct (and they weren’t correct in my case) then the debugger will not recognize to which file the current URL in the browser belongs to and basically will not stop or will not stop at where you have placed your breakpoint.

Screen shot 2009-10-05 at 6.43.22 PM

Last but not least some screenshots which show the my setup and configuration:

Screen shot 2009-10-05 at 6.40.32 PM

Screen shot 2009-10-05 at 6.41.29 PM

Screen shot 2009-10-05 at 6.48.11 PM

Screen shot 2009-10-05 at 6.46.41 PM