JWare Logo  “Strategies in (*)ability” [iDareMedia] [JWare] [PET] [CI-Dashboard]
<JWare/AntXtras Foundation>

 [home]    [overview] [download] [learning] [problems] [ourplans]    [contacts] [legalese

[guide] $defaultsproperty:UG

home » learning » guides » valueuris » $defaultsproperty: 

The $defaultsproperty: value uri lets you query the property name for a global build iteration property. Because AntX-based tools can customize the build iteration class and change the names of these properties, it is important that your scripts do not hard-code their names; an Ant-based test script is an example of such a script. You must explicitly install this value uri’s handler; read the Examples section to see how this is done.

Parameters

The general form of the uri is: $defaultsproperty:default-name where default-name is the symbolic name of the property that is shared by all AntX-based tools. The symbolic name is usually much shorter that the name of the associated property and more importantly, it is fixed so you can use it in your scripts. The standard (AntX only) set of names are listed below; see each AntX-based tool’s documentation for additional default names.

  • assertions: the disable|enable AntX’s assertions flag.
  • passwordfile: the location of default password file.
  • haltiferror: the disable|enable fail-quick flag.
  • haltiferror.feature: the disable|enable fail-quick flag for a particular feature.
  • noiselevel: the default feedback level if unspecified.
  • shortlocations: the disable|enable shortened location strings flag.
  • prefix: the prefix string used by the $default: value uri.
  • fixtureexcludes: the disable|enable AntX’s fixture exclusions flag.
  • delaydelete: the disable|enable AntX’s delayed deletion flag.

Examples

1) The following snippet declares the default scheme name for the defaults property name uri handler: $defaultsproperty:. This is usually done by an “init” target or at the project’s top level.

    <manageuris action="install">
        <parameter name="defaultsproperty"
            value="com.idaremedia.antx.valueuri.info.DefaultsPropertyNameURIHandler"/>
    </manageuris>

2) The following snippet sets the default value of the AntX haltIfError setting. This value will be inherited by any attribute that uses the $default:haltiferror function. Note that this script works if its used with a plain AntX installation (where property name is “jware.antx.defaults.haltiferror.flag”) or in another AntX-based tool’s environment like AntUnit (where property name is “antunit.defaults.haltiferror.flag”).

    <copyproperty name="${$defaultsproperty:haltiferror}"
        value="yes" scope="system"/>
    ...
    <macrodef name="mkseekritfiles">
        <attribute name="haltiferror" default="${$default:haltiferror}"/>
        ...

Related Topics

SourceForge.net Logo
Copyright ©2005-2006 iDare Media, Inc. All rights reserved.
 
JWare/AntXtras uses software developed by and on behalf of the Apache Software Foundation, http://www.apache.org/.
All other product names mentioned on this website are trademarks of their respective owners; refer to full legalese statement.