#81 Usability: Inherit Ant Properties

release_3.0
closed
Oliver Burn
ANT Task (45)
5
2014-06-02
2003-01-19
Lars Kühne
No

The current resolution mechanism for checkstyle
properties does not know about Ant properties, the Ant
properties are not inherited to resolve ${property} in
the checkstyle config file.

In my checkstyle config file I write:

<module name="Checker">
<property name="basedir" value="${basedir}"/>
<module name="TreeWalker">
<property name="cacheFile"
value="${checkstyle-cache}"/>

To use the $-notation in the value spec, in my
build.xml I have to write really stupid code like:

  &lt;property key=&quot;basedir&quot; value=&quot;${basedir}&quot;/&gt;
  &lt;property key=&quot;checkstyle-cache&quot;

value="${checkstyle-cache}"/>

Having to add that code to the build.xml should not be
necessary, the checkstyle task should inherit the ant
properties (maybe configurable like in Ant's antcall task).

Discussion

  • Lars Kühne
    Lars Kühne
    2003-01-28

    Logged In: YES
    user_id=401384

    fixed, the config file can now use ant properties like
    ${basedir} without having to declare them in property
    subelements of the checkstyle task.