Różne profile maven'a dla różnych testów

0

Witam,

Chciałbym utworzyć dwa profile, jeden dla testów JUnit, drugi dla testów JUnit + Integracyjne.

Chciałem to zrobić tak, że dla żadnego profilu nie odpalaj testów IT*.java


                <pluginManagement>
                        <plugins>
                                <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <version>${surefire.version}</version>
                                        <configuration>
                                                <excludes>
                                                        <exclude>**/IT*.java</exclude>
                                                </excludes>
                                        </configuration>
                                </plugin>
              </pluginManagement>
                <plugins>

następnie w profilu local chciałem dodać testy IT*.java

                    <profile>
                        <id>local</id>
                            <build>
                                <plugins>
                                        <plugin>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-failsafe-plugin</artifactId>
                                                <version>${surefire.version}</version>
                                                <configuration>
                                                        <includes>
                                                                <include>**/IT*.java</include>
                                                        </includes>
                                                </configuration>
                                        </plugin>
                                </plugins>

Niestety testy IT*.java nigdy się nie odpalają :/

Czy ktoś mógłby powiedzieć co jest źle?

0

[RTFM] Tutaj http://maven.apache.org/surefire/maven-failsafe-plugin/usage.html
jest coś takiego:

<goals>
    <goal>integration-test</goal>
    <goal>verify</goal>
</goals>

i odpalasz przez mvn -Plocal verify

Więcej o goals i phases:
http://stackoverflow.com/questions/16205778/what-are-maven-goals-and-phases-and-what-is-their-difference
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

1 użytkowników online, w tym zalogowanych: 0, gości: 1