ant-user mailing list archives

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

Hi,

I am trying to enable assertions in my target that invokes the java
task. 
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>
</java>

I am using Ant 1.7.1 with Java 1.6.0_26

thanks for any suggestion
Markus




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message