Hi Randal,
1.  mvn verify -Pclover.optimize
2.  mvn clean deploy -Dmaven.tests.skip=true
we managed to setup something similar using the invoker plugin. Our problem was, that by running "test" and "deploy" together on our multi-part-project the snapshot versions of the first parts got deployed while the ones with the failed tests did not - so the situation in the repository would get inconsistent if only one test failed...

Our continuus integration tool (Continuum) does not seem to be able to run multipe commands per schedule, not talking about "dependent" runs like: "do the second only if the first one did not fail"... We worked around this limitation by setting up a special profile (see below) which invokes the whole lifecyle twice with the command "mvn -N -P ci"

Regards,
 Andy

     <!-- Usage: mvn -N -P ci -->
     <profile>
        <id>ci</id>
        <build>
           <defaultGoal>initialize</defaultGoal>
           <plugins>
              <plugin>
                 <artifactId>maven-invoker-plugin</artifactId>
                 <configuration>
                    <pom>pom.xml</pom>
                    <noLog>true</noLog>
                    <streamLogs>true</streamLogs>
                    <suppressSummaries>true</suppressSummaries>
                 </configuration>
                 <executions>
                    <!-- run the tests first -->
                    <execution>
                       <id>test</id>
                       <phase>initialize</phase>
                       <goals>
                          <goal>run</goal>
                       </goals>
                       <configuration>
                          <goals>
                             <goal>clean</goal>
<goal>install</goal> <!-- should be "test", but "install" is required for some dependencies -->
                          </goals>
                       </configuration>
                    </execution>

<!-- and install + deploy all, once the tests succeeded -->
                    <execution>
                       <id>deploy</id>
                       <phase>initialize</phase>
                       <goals>
                          <goal>run</goal>
                       </goals>
                       <configuration>
                          <profiles>
<profile>notest</profile> <!-- do not run the tests again, see below -->
                          </profiles>
                          <goals>
                             <goal>deploy</goal>
                          </goals>
                       </configuration>
                    </execution>
                 </executions>
              </plugin>
           </plugins>
        </build>
     </profile>

     <!-- Disable testing -->
     <profile>
        <id>notest</id> <!-- convenience -->
        <properties>
           <maven.test.skip>true</maven.test.skip>
        </properties>
     </profile>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to