so I have this in my pom.xml to skip all tests:
<!-- skip running all tests in this project. Do not change this -->
<!-- run tests explicitely -->
<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>
BUT, I want to run a test explicitly and thought this would work (and
override the pom file settings but apparently the command line options DO
NOT override the pom file settings
mvn -Dmaven.test.skip=false -Dtest=DeleteDatabaseTableTest clean test
So I want to make it difficult to run the tests and all tests are excluded
by default but the pom filter (skip = true) should not override any command
line options.
Is this the default behaviour of Maven ? (pom file overrides any command
line switches?)
Thanks
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#a8673329
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]