Use the exclude only for file regexp who match the include regexp that you 
don't want to include in your unit test (**/*AbstractTest.java for 
example).
unitTestSourceDirectory must be set to your test directory (src/test)

 <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
                <unitTest>
                        <includes>
                                <include>**/*Test.java</include>
                        </includes>
                        <resources>
                                <resource>
                                        <directory>src</directory>
                                        <includes>
 <include>**/*.xml</include>
                                        </includes>
                                </resource>
                        </resources>
                </unitTest>

Nicolas,





Josip Gracin <[EMAIL PROTECTED]>
18/06/2004 15:42
Veuillez répondre à "Maven Users List"

 
        Pour :  [EMAIL PROTECTED]
        cc : 
        Objet : Problem with <includes> and <excludes> in unitTest


Hello!

Could somebody please tell me why the following code from project.xml 
still 
tries to compile several hundred test classes when I run 
"maven clean test:compile"?  As far as I understand the <includes>'s and 
<excludes>'s, this should exclude all files and it should not compile 
anything, right?

                <unitTestSourceDirectory>src</unitTestSourceDirectory>
                <unitTest>
                        <includes>
                                <include>**/*Test.java</include>
                        </includes>
                        <excludes>
                                <exclude>**/*</exclude>
                        </excludes>
                        <resources>
                                <resource>
                                        <directory>src</directory>
                                        <includes>
 <include>**/*.xml</include>
                                        </includes>
                                </resource>
                        </resources>
                </unitTest>

Thanks in advance!


---------------------------------------------------------------------
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