Hi Jim,

to get this to work I have set up an environment variable MAVEN_OPTS=-ea in my .profile  (I am on MacOSX - do whatever you need to do to set up env variables on your platform)

it's less than ideal but for now I have been told this is the only way.

Kind regards,
Dave Sag




 


"Jim Babka" <[EMAIL PROTECTED]> wrote on 06-02-2006 18:54:03:

> 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]
>

Reply via email to