• How to Install m2eclipse in Flex Builder 3

    Eclipse’s software installation process is something of a train wreck. So, when I finally crack the code for installing a particular plugin, I feel compelled to both (a) document the arcane path and (b) share it with others.

    As a result of my workhorse “Java + FB Plugin” Eclipse installation steadily progressing in to a state of unworkable slowness and a fresh Cocoa-native build of Eclipse hitting the scene a few months back, I decided to install standalone Flex Builder alongside the Cocoa Eclipse build. The Flex Builder standalone edition is really lightweight, but I like to round-trip debug on my local machine, so by having both FB and the Cocoa Eclipse build I can run Flex in FB and a Java server in Eclipse and do round-trip debugging.

    After installing FB standalone, I decided to install m2eclipse in to it. m2eclipse is an excellent plugin for working with Maven directly from Eclipse, and since we use flex-mojos at Highwinds, it’s a necessity for making our build and dependency resolution process seamless.

    Typically, this would be a simple process: set up the m2eclipse update site in FB, run the installer for new features, select it, resolve dependencies, and be done. But no, God forbid it be that simple. If you simply resolve the handful of dependencies indicated by Eclipse during the installation one by one, the plugin doesn’t show up. After finally figuring out the magic incantation required to install m2eclipse in to FB, I have documented the process below.

    Klaatu… Verata… Necto! (a.k.a. How to Install m2eclipse in to Flex Builder 3)
    1) Install Flex Builder 3 standalone
    2) Go to Help => Software Updates => Find and Install
    3) Select “Search for new features to install”, hit Next
    4) Click “New Remote Site”, entering http://m2eclipse.sonatype.org/update/ as the URL and naming it whatever you like.
    5) Check the box next to the site that you just created in step #4. Also select “Europa Discovery Site” and “The Eclipse Project Updates”, select “Automatically select mirrors”, and click Finish.
    6) Expand the tree for the m2eclipse project site. Open the “Maven Integration” project and select the “Maven integration for Eclipse (Required)” item as well as the “Maven POM XML Editor” and “Maven POM Editor.”
    7) Eclipse will complain that you don’t have all the appropriate dependencies. Expand all the top-level trees in the view you are looking at (i.e., “The Eclipse Project Updates”, “Europa Discovery Site”, “Eclipse GEF”, etc.)
    8) Click “Select Required.” About twenty dependencies will be selected in all the different trees. Some are for Eclipse’s modeling framework, others for the Web Tools Project, etc.
    9) Click Finish. Eclipse will download a metric assload of files and prompt you to restart FB. After the restart, Maven will be installed.

    I hope somebody else finds this useful and doesn’t have to spend an hour figuring this out like I did.

    Category: Uncategorized | Tags: