Caffeinated
Caffeinated

Reputation: 12484

Am I allowed to pass multiple arguments to the Ant compilerarg element?

In Ant, am I alllowed to do something like this:

<compilerarg value= "-Xlint:deprecation,unchecked" /> 

i.e, I want to pass both -Xlint:deprecation and -Xlint:unchecked

Upvotes: 2

Views: 1323

Answers (1)

ioscode
ioscode

Reputation: 821

This page describes the proper way to use compilerarg elements: https://ant.apache.org/manual/Tasks/javac.html

You can either do multiple nested elements like this:

<compilerarg value= "-Xlint:deprecation" />
<compilerarg value= "-Xlint:unchecked" />

Or use the line attribute instead of value:

<compilerarg line= "-Xlint:deprecation -Xlint:unchecked" />

Upvotes: 4

Related Questions