By the way, this is what happens with version 2.0 of the surefire
plugin.  I tried the latest version (2.1.2), but with that version I get
no reports at all, even when I tell it to ignore test failures (it tells
me a test failed, but I have no way to find out what test it was).  I
have updated MOJO-107 for this second problem.

Jim Babka
Senior Software Engineer
Main: (512) 334 3200
Direct: (512) 334 3237
Email: [EMAIL PROTECTED]
 
Webify Solutions
Enabling the On Demand Enterprise(tm)
www.webifysolutions.com

-----Original Message-----
From: Jim Babka 
Sent: Monday, February 06, 2006 11:54 AM
To: Maven Users List
Subject: [m2] Surefire-Plugin ignores argLine

I am trying to run tests with assertions enabled, but the surefire
plugin is apparently ignoring the argLine parameter.  If I specify the
following, assertions are not turned on:

...
  <build>
...
    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <test>**/*TestSuite*</test>
                    <useFile>false</useFile>
                    <forkMode>once</forkMode>
                    <argLine>-ea</argLine>
                </configuration>
            </plugin>
...
    </plugins>
  </build>
...

By the way, I did try this with -enableassertions as well (which is what
is shown in the surefire example doc), and it made no difference.

As a further example, this produces no error at all, even though it
clearly should, so this argLine parameter is really being ignored:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <test>**/*TestSuite*</test>
                    <useFile>false</useFile>
                    <forkMode>once</forkMode>
                    <argLine>-xxx</argLine>
                </configuration>
            </plugin>

What is the right way to get surefire to run tests with assertions on?

Jim Babka
Senior Software Engineer
Main: (512) 334 3200
Direct: (512) 334 3237
Email: [EMAIL PROTECTED]
 
Webify Solutions
Enabling the On Demand Enterprise(tm)
www.webifysolutions.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]

Reply via email to