I am looking for some way to force my integration tests before a release, without explicitly using a profile.

For example,

      <plugin>
<artifactId>maven-release-plugin</artifactId>
        <configuration>
          <preparationGoals>clean verify site</preparationGoals>
        </configuration>
      </plugin>

But that doesn't work because unless the failsafe plugin is defined, it won't run the tests.

I thought of doing something like

  <profiles>
    <profile>
      <id>run-it</id>
      <activation>
        <file>
<missing>target/failsafe-reports</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
            <version>2.17</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

But that will cause the integration tests to be run after every clean.

Is there some way I can trigger the integration tests when doing a release

   mvn release:prepare

without having to do

   mvn release:prepare -P run-it

Cheers, Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to