<p>We've had an ongoing need here that I can't figure out how to address using the stock Maven 2 tools and documentation.</p>

<p>Some of our developers have some very long running JUnit tests (usually stress tests) that under no circumstances should be run as a regular part of the build process / nightly build.</p>

<p>Of course we can use the surefire plugin's exclusion mechanism and just punt them from the build, but ideally we'd love something that would allow the developer to run them at will through Maven 2.</p>

Normally you would add a profile to your maven configuration that runs a different set of tests:
run this with mvn -Pintegrationtest install
```
```
<profile>
        <id>integrationtest</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>-client -Xmx896m -XX:MaxPermSize=192m</argLine>
                        <forkMode>once</forkMode>
                        <includes>
                            <include>**/**/*Test.java</include>
                            <include>**/**/*IntTest.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/**/*SeleniumTest.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        <activation>
            <property>
                <name>integrationtest</name>
            </property>
        </activation>
    </profile>
```
```