You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Satish <sa...@sharefare.com> on 2006/08/18 03:08:09 UTC

excluding unit tests


How can you do this explicitly, currently by default, package/install goals
call these.

i have the following snippet in my pom.xml and it's giving errors

<build>
    <excludes>
       <exclude>
          **/*Test*.java
      </exclude>
    </excludes>
  </build>
  
-- 
View this message in context: http://www.nabble.com/excluding-unit-tests-tf2124320.html#a5860770
Sent from the Maven - Users forum at Nabble.com.


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


Re: excluding unit tests

Posted by Nick Veys <ps...@gmail.com>.
Is this maven 1 or 2?  It doesn't look right for either of them.
Excluding unit tests is covered on both version's web pages...

http://maven.apache.org/maven-1.x/reference/project-descriptor.html#unitTest
http://maven.apache.org/plugins/maven-surefire-plugin/howto.html

On 8/17/06, Satish <sa...@sharefare.com> wrote:
>
>
> How can you do this explicitly, currently by default, package/install goals
> call these.
>
> i have the following snippet in my pom.xml and it's giving errors
>
> <build>
>     <excludes>
>        <exclude>
>           **/*Test*.java
>       </exclude>
>     </excludes>
>   </build>
>
> --
> View this message in context: http://www.nabble.com/excluding-unit-tests-tf2124320.html#a5860770
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: excluding unit tests

Posted by Thierry Barnier <tb...@gmail.com>.
Have you tried

mvn package -Dmaven.test.skip=true

or defining the property inside your pom:

<build>
<plugins>
<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>


Thierry

Le 18 août 06 à 08:01, franz see a écrit :

>
>
>
> Satish wrote:
>>
>>
>> How can you do this explicitly, currently by default, package/install
>> goals call these.
>>
>> i have the following snippet in my pom.xml and it's giving errors
>>
>> <build>
>>     <excludes>
>>        <exclude>
>>           **/*Test*.java
>>       </exclude>
>>     </excludes>
>>   </build>
>>
>>
>
> Good day to you, Satish,
>
> You can configure your maven-surefire-plugin to specify which tests to
> include/exclude. For example, to exclude all MyFailingTest.java,  
> you can add
> the following to your pom:
>
> <project>
>   [...]
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <excludes>
>             <exclude>**/MyFailingTest.java</exclude>
>           </excludes>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>   [...]
> </project>
>
> Cheers,
> Franz
> -- 
> View this message in context: http://www.nabble.com/excluding-unit- 
> tests-tf2124320.html#a5860804
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: excluding unit tests

Posted by franz see <fr...@gmail.com>.


Satish wrote:
> 
> 
> How can you do this explicitly, currently by default, package/install
> goals call these.
> 
> i have the following snippet in my pom.xml and it's giving errors
> 
> <build>
>     <excludes>
>        <exclude>
>           **/*Test*.java
>       </exclude>
>     </excludes>
>   </build>
>   
> 

Good day to you, Satish,

You can configure your maven-surefire-plugin to specify which tests to
include/exclude. For example, to exclude all MyFailingTest.java, you can add
the following to your pom:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/MyFailingTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

Cheers,
Franz
-- 
View this message in context: http://www.nabble.com/excluding-unit-tests-tf2124320.html#a5860804
Sent from the Maven - Users forum at Nabble.com.


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