[ http://jira.codehaus.org/browse/SUREFIRE-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter closed SUREFIRE-338. --------------------------------- Assignee: Brett Porter Resolution: Fixed > Unable to disable assertions (-da) > ---------------------------------- > > Key: SUREFIRE-338 > URL: http://jira.codehaus.org/browse/SUREFIRE-338 > Project: Maven Surefire > Issue Type: Bug > Components: plugin > Affects Versions: 2.3 > Environment: Ubuntu Linux, Java HotSpot(TM) Client VM (build > 1.5.0_11-b03, mixed mode, sharing), maven 2.0.6 > Reporter: Emilian Bold > Assignee: Brett Porter > Fix For: 2.3.1 > > Attachments: maven-disable-assertions.zip > > > I'm unable to disable assertions while running tests with the surefire plugin. > I have product "assert1" with a code with "assert false" (this always throws > an AssertionError when assertions are enabled). > I use the code in assert2 in a unit-test and it *always* throws an assertion > error with surefire 2.3. > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <!-- emi: forcing version to avoid ignoring of -da --> > <!-- <version>2.1.3</version> --> > <configuration> > <forkMode>pertest</forkMode> > <argLine>-da</argLine> > > <childDelegation>false</childDelegation> > </configuration> > </plugin> > </plugins> > </build> > > I can play with various values for forkMode and childDelegation with no luck. > The only working way is forcing the version to 2.1.33 and with the above > settings (pertest forkmode, false childDelegation). > I'm attaching a zip with 2 projects. Trying to run mvn test on assert2 will > throw an assertion error except if forcing the surefire version to 2.1.3. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira