Neeraj Joshi schrieb:
> Hi All,
> I am trying to disable execution of unit tests for a project as follows
>
> <project .....>
>    <dependencies>
>      ......
>   </dependencies>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <skipTests>true</skipTests>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> </project>
>
> When I do 
>   
>> mvn install 
>>     
> The JUnit tests still get executed.
> Only if I do 
>   
>> mvn install -Dmaven.test.skip=true
>>     
>
> This project is part of a profile (other projects within this profile need 
> JUnit execution to be enabled 
> as a result I can't set it as a property at the profile level).
>
> What am I doing wrong?
>   

You are not specifying the version of maven-surefire-plugin.

The skipTests property was only added in a recent version (2.4.0?) and I
suspect you have an older version already in your local repository.

Add
  <version>2.4.1</version>
after the maven-surefire-plugin artifactId and see if that fixes this.

In general, every time you use a plugin you should also specify the version.

Regards,
Simon


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

Reply via email to