Petr,

If it makes any difference, I have Maven 2.0.7 and the antrun plugin
with Junit combination works for me. I am, however, using the 3.8.1
version of Junit, but i don't think it matters.

Maven-antrun-plugin page also has a writeup on how to use optional tasks:
http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html

I have the following in my plugin:
           <plugin>
               <artifactId>maven-antrun-plugin</artifactId>
               <inherited>false</inherited>
               <executions>
                   <execution>
                       <id>run-integration-tests</id>
                       <phase>integration-test</phase>
                       <goals>
                           <goal>run</goal>
                       </goals>
                       <configuration>
                           <tasks>
                               <junit printsummary="withOutAndErr"
showoutput="yes" haltonfailure="true" fork="true" timeout="180000">
                                   <classpath refid="maven.test.classpath"/>

                                   <formatter type="plain"/>
                                   <test name="org.marketcetera.SomeTest"

todir="${project.build.directory}/surefire-reports"/>
                               </junit>
                           </tasks>
                       </configuration>
                   </execution>
               </executions>
               <dependencies>
                   <dependency>
                       <groupId>ant</groupId>
                       <artifactId>ant-junit</artifactId>
                       <version>1.6.5</version>
                   </dependency>
                   <dependency>
                       <groupId>junit</groupId>
                       <artifactId>junit</artifactId>
                       <version>3.8.1</version>
                   </dependency>
               </dependencies>
           </plugin>

hope this helps.
--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to