We do something similar here with a profile:
<profile>
<id>test-name</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>${test.name}.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Then we can invoke "mvn -Ptest-name
-Dtest.name=com/example/SomeClassTest test". We have a similar profile
for testing an entire package. Hope that gives you some ideas.
Chris
> -----Original Message-----
> From: Lisa [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 23 January, 2007 13:13
> To: [email protected]
> Subject: mvn test - how to invoke a specific class from command line
>
>
> Is there a way to create a pom.xml file that will run only
> tests in one class from the command line?
>
> I want to type:
> mvn <target>
>
> Where <target> can be any word I choose and have it execute
> all tests in a specific class only. there may be many, many
> classes in the test directories, I only want it to execute
> one single class, or possibly several classes in sequence,
> but I want to choose which ones.
>
> Any help would be greatly appreciated.
>
> Lisa
> --
> View this message in context:
> http://www.nabble.com/mvn-test---how-to-invoke-a-specific-clas
> s-from-command-line-tf3066182s177.html#a8528263
> 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]