Much ado about scripting, Linux & Eclipse: card subject to change

2010-10-25

In Which I Explain Once Again That Linux Is A Viable Alternative to Windows

I was recently asked this question:

Can linux be used for a normal computer, operating email programs, word processing, etc? I am quite frustrated with all the "improvements" that Windows keeps getting; each improvement making it slower and more prone to erratic behavior. I use a computer only for the above tasks, and would really like to get away from the problems.

As I've been telling friends, colleagues, family, and everyone who'll listen for about the past 5 years... YES.

  • Mail: Instead of Outlook, you can use Thunderbird.

  • Calendar: use Sunbird or go online w/ Google Calendar

  • Web: Instead of Internet Explorer, Firefox, Opera, Chrome, or Konqueror. None will "accidentally" install spyware for you.

  • Office: Instead of the bloated and dinosauric (20 years old!) MS Office's Word, Excel & Powerpoint, use Open Office's Writer, Calc & Impress. (Open Office is now 10 years old - old enough to be feature rich, young enough to be standards-compliant.)

  • Chat: instead of MSN, use pidgin (supports all IM protocols, including MSN, Yahoo, gtalk, IRC, Twitter, Facebook) and/or Skype (for audio/video chat)

  • Audio/Video playback & streaming: instead of Windows Media Player, VLC player.

  • Solitaire: PySol includes 200 solitaire games; Firefox "Cards" plugin contains dozens more.

More advanced users:

I personally use linux flavours designed for older machines so they're lightweight, faster, and less bloated. Then, if I need a more "bloated" app (like something from the KDE school instead of the XFCE or GDE school), I simply install that into the operating system as an add-on. Of course if you *want* eye candy (like 3D desktops and transitions when you open/close applications) you can get that too. It's pure eye candy, but it's available if you need Vista or Win7-like "bling".

If you want to try Linux before jumping in fully, I advise two options:

  • Xubuntu, designed for old machines and to stay more-or-less the same over time. Download and install it into Windows without having to reformat your hard drive. Good for your grandmother's desktop machine.

  • Fedora, designed for newer machines and to stay up to date with recent improvements in the Linux world. Can be installed onto a USB key so you can boot your system from that without having to touch your existing Windows install. Good for your parents or your machine, or for an office.

  • There are of course lots of other Linux distros out there...

2010-10-08

HOWTO: Find the feature that contains a plugin

Tycho is awesome.

However, like all build systems, it has its limitations.

One such limitation is that when you're building against a target platform, and something's missing, you get errors such as these:

[INFO] Cannot complete the request.  Generating details.
{org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=cocoa, osgi.arch=x86, osgi.os=macosx, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=}
[Software being installed: org.jboss.tools.tptp.feature.feature.group 1.2.0.qualifier, Missing requirement: org.eclipse.tptp.platform.instrumentation.ui 4.4.1.v201009092123 requires 'bundle org.eclipse.hyades.probekit [4.2.0,5.0.0)' but it could not be found, Cannot satisfy dependency: org.eclipse.tptp.platform.instrumentation.ui.feature.group 4.3.1.v201009092123-797908s73533D4H6D56 depends on: org.eclipse.tptp.platform.instrumentation.ui [4.4.1.v201009092123], Cannot satisfy dependency: org.jboss.tools.tptp.feature.feature.group 1.2.0.qualifier depends on: org.eclipse.tptp.platform.instrumentation.ui.feature.group 4.3.0]
[ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable.

The important part of that error message is as follows:

org.jboss.tools.tptp.feature.feature.group 1.2.0.qualifier
   requirement: org.eclipse.tptp.platform.instrumentation.ui 4.4.1.v201009092123 
      requires 'bundle org.eclipse.hyades.probekit [4.2.0,5.0.0)' 
         but it could not be found

org.eclipse.tptp.platform.instrumentation.ui.feature.group 4.3.1.v201009092123-797908s73533D4H6D56 
   depends on: org.eclipse.tptp.platform.instrumentation.ui [4.4.1.v201009092123]
     dependency: org.jboss.tools.tptp.feature.feature.group 1.2.0.qualifier 
        depends on: org.eclipse.tptp.platform.instrumentation.ui.feature.group 4.3.0]

So, how do you find which feature contains that plugin, so that you can add it to your target platform?

First, you need access to the repository. If you have direct server access to the repository from which the plugin comes (eg., the TPTP Helios update site), you can run this script in the root of that repository.

If you don't have server access (eg., you can't ssh to dev.eclipse.org and look in ~/downloads/tptp/updates/helios), then you can pull down a zip of the site (or use a p2.mirror script to fetch a copy of the site to your local machine)... and then run this script in the root of that repository.

Essentially the script finds matching feature jar files, unpacks them to extract the feature.xml files therein, and then greps those files for lines which suggest an included plugin matching the pattern for which you're searching:

$ findInFeature platform.probekit
./features/org.eclipse.tptp.platform.probekit_4.5.1.v201009092123-7H7BF8PAkF7B77ZARCNEK.jar
   <plugin
         id="org.eclipse.tptp.platform.probekit"

./features/org.eclipse.tptp.platform.trace_4.5.1.v201009092123-7L7O8bBgJ9E99jAfGWEM.jar
   <plugin
         id="org.eclipse.tptp.platform.probekit.launch"
From there, it's a trivial exercise to add another line item into your target platform file. First, paste in the feature jar:
./features/org.eclipse.tptp.platform.probekit_4.5.1.v201009092123-7H7BF8PAkF7B77ZARCNEK.jar

Then use vim to pattern-replace that string:

:%s/.\+\/\(org.\+\)_\(\d\+.\+\)\.jar/\t\t\t/g

And you'll end up with a new .feature.group added to the target:

<unit version="4.5.1.v201009092123-7H7BF8PAkF7B77ZARCNEK" id="org.eclipse.tptp.platform.probekit.feature.group"/>

2010-10-01

JBoss Tools: making it easier to build against a complex target platform

So you want to be a JBoss Tools developer? Awesome. Welcome to the family. SVN sources are here, JIRA's over here and there's cold beer in the fridge*.

But you say it's a pain in the tuchus to download over 25 zips or add a whole bunch of update sites and hope you get everything you need? Yeah, no argument there. If only there was an easier way to resolve all the dependencies you need to get building, much less to even RUN this stuff.

To make this process simpler, I've created a p2 repo (update site) from our target platform file, which has been recently updated to include Helios SR1 dependencies. You can track subsequent work in progress here: JIRA JBIDE-6982. You can also report any issues there too.


So, now, just add this single site** into your vanilla Eclipse 3.6.1 Classic (or a Helios SR1 bundle), uncheck the box for 'Group Items by Category' and you can install everything listed. For great justice.


Some handy links:


Some handy HOWTOs:


* - Due to beer2peer limitations, YMMV.

** - I'm aware that the update site throws a 403 if you open it in a browser. I can't be arsed to generate an index.html just yet, nor are there categorized features. Because really, you don't need either - this site is only meant to be used by p2.