Cool thanks. I actually thought about checking the surefire plugin configuration right after I posted and that's exactly what I wound up doing.

The next question I have is if there is anyway to configure the unit tests to run forked in a separate directory. Before, I had a project.properties file that specified

maven.junit.fork=true
maven.junit.dir=${maven.build.dir}/test

I also had a post goal to create the ${maven.build.dir}/test directory as follows:

   <postGoal name="test:prepare-filesystem">
       <mkdir dir="${maven.junit.dir}" />
   </postGoal>

The reason I have the unit tests running forked in a separate directory is for logging and so the console output doesn't go to the console but is instead captured in the test report.

Is there an equivalent way to do this? Or even better, is there a better way to do this?

Matt Raible wrote:
 <build>
        <defaultGoal>package</defaultGoal>
        <sourceDirectory>src</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/*TestCase.java</exclude>
                        <exclude>**/*WebTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

On 10/21/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
Hey everyone,

In m1 it was easy to exclude certain things from being run as test cases
using:

    <unitTest>
      <includes>
        <include>**/*Test.java</include>
      </includes>
      <excludes>
        <exclude>**/Abstract*.java</exclude>
      </excludes>

I don't see anything similar in m2 and it's trying to run my
HibernateDaoSupportTestCase which is an abstract base class for my Dao
unit tests.  How can I exclude this from the tests being run?

Thanks,
Rich

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



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



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

Reply via email to