eclipsecontinuous-integrationbuild-automationinfinitestjavarebel

How do I use continuous integration with an Eclipse project?


I've been using maven2 and hudson for a while to do my continuous integration, but I find that Eclipse and Maven do not play well together. Sure there's a plugin, but it's cranky to mash the maven project into something that eclipse likes and the build times and unit test are too long. I'm considering switching back to a pure eclipse project with no ant and no maven involved. With the infinitest plugin and possible the JavaRebel agent, it would give me a very fast build-deploy-test cycle. However I'd still like to have automatic and testing as well, so:

How do I use continuous integration with an Eclipse project?

Is there a command line way to do it?

Is there a build server that already supports it natively?


Solution

  • I managed find a good solution. I simply got infinitest (can be installed from the Eclipse marketplace) to work when using maven and eclipse

    In Eclipse->Project Properties->Java Build Path->Source uncheck the box called: "Allow output folders for source folders"

    That will enable your project to have more than one output path and Eclipse will then start reporting the test-classes as being part of the class path. Infinitest now finds it and starts running tests!

    All I did was use the official Maven Eclipse plugin and add this to my POM

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.5</version>
            <!-- <scope>provided</scope> -->
        </dependency>
    
        <dependency>
            <groupId>org.infinitest</groupId>
            <artifactId>infinitest</artifactId>
            <scope>test</scope>
            <version>4.0</version>
        </dependency>
    
    </dependencies>