ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Innerebner Markus <>
Subject Java task does not check assertions
Date Tue, 27 Dec 2011 17:19:30 GMT


I am trying to enable assertions in my target that invokes the java
The class AssertionTest works perfectly when compiling it from shell
with javac (=source 1.6) and than running it with the command

java -ea:AssertionTest AssertionTest 

but with Ant it looks like assertions are always disabled.

The steps I did:
1) create a target that invokes javac task with the attribute 
<javac ... source="1.6"> ..</javac>
2) create a target that invokes java task with the nested element: 
<java classname="AssertionTest" classpathref="classpath">
  <assertions><enable class="AssertionTest"/></assertions>

I am using Ant 1.7.1 with Java 1.6.0_26

thanks for any suggestion

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message