yes, I am familiar with this, but what I want is:
  1.  a pom file that excludes all tests by default
  2.  the ability to force all tests with a specific class by using -D
switch

Currently I have not figured out how to do this.  I know how to use the skip
tag and exclude by pattern but then if I do that I can not force a specific
class to run on demand because it gets filtered or skipped.

The tests in question run some database insertion code, so I want all tests
to be ignored by default if someone comes into the directory and runs a
build.

I do not want it mucking up the database, but I do want to provide the
ability to run some specific tests for those people who know what they are
doing and know the magic command to type.

Lisa



Wayne Fay wrote:
> 
> Have you tried -Dmaven.test.skip=false? Not sure it will work, but
> there's a good chance it will. But then I think it will run all tests.
> 
> Probably you shouldn't use config-skip if you actually want to run
> some test(s)... Instead I'd use profiles to specify the exact test or
> set of tests you want to run.
> 
> Wayne
> 
> On 1/27/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>> I want to turn off all tests for a project but still be able to force a
>> run
>> for all tests in a single class file by using a param on the mvn command
>> line but can not figure out how to do this.
>>
>> I edited the pom.xml and specified to turn off all tests, however when I
>> type:
>>
>>
>> mvn -Dtest=BootStrapTest clean test
>>
>> the test does not run.  I explicitly told it to run all tests in
>> BootStrapTest, but apparently this does not override all the
>> <skip>true</true> attrib.
>>
>> Is there a way to override the <skip> while running maven from the
>> command
>> line?
>>
>> Here is my <build> section
>>     <build>
>>         <plugins>
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-surefire-plugin</artifactId>
>>                 <configuration>
>>                     <skip>true</skip>
>>                     <useFile>false</useFile>
>>                 </configuration>
>>             </plugin>
>>         </plugins>
>>     </build>
>>
>> any help would be greatly appreciated.
>>
>>
>> Lisa
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-skip-all-tests-but-still-run-explicitly-tf3129739s177.html#a8671878
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-skip-all-tests-but-still-run-explicitly-tf3129739s177.html#a8673310
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to