<p>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:</p>

<p>How do I use continuous integration with an Eclipse project?</p>

<p>Is there a command line way to do it? </p>

<p>Is there a build server that already supports it natively?</p>

Yeah, Eclipse Maven2 plugin is crap for now. But I would suggest for you to hang in there, there is a lot of benefit to using Maven2, so it actually balances out.
What we do, is that we use Eclipse to develop and only use Maven to manage dependencies. Everything else is done by running "mvn" on command line. We keep tests in their own integration test projects (...-itest) and have continuous integration server to do build in 2 phases, first build the actual code, and second pass build and runs the -itest projects. (First pass (pure build) usually is very quick, and the integration tests build (with running of tests) usually takes quite a while.)
Here's command line to make mvn run tests:
```
mvn -o verify -Ditest
```
Of course you need to define 'itest' profile in your parent pom:
Say, like this:
```
```
<profiles>
  <profile>
    <id>integration-test</id>
    <activation>
      <property>
        <name>itest</name>
      </property>
    </activation>
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <executions>
            <execution>
              <id>itest</id>
            </execution>
          </executions>
          <configuration>
            <testSourceDirectory>src/main</testSourceDirectory>
            <testClassesDirectory>target/classes</testClassesDirectory>
            <forkMode>once</forkMode>
          </configuration>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>
```
```