9.3.1 Using the Ant Task to Change Data Source
To use the built-in Ant task to automatically change the data source definition, follow the steps below:
1. Make sure Ant-related JAR files and sree.jar (or analogs visual.jar, bisuite.jar) are included on the classpath.
2. Create an Ant task definition in build.xml as follows:
<taskdef name="dsm" classname="inetsoft.uql.util.dsm.DataSourceModifier"/>
3. Within an Ant target, include the <dsm> tag as follows:
<dsm restore="true" dsfile="datasource.xml">
</dsm>
where:
'restore' is set to true to restore data source
file after deployment
'dsfile' specifies the data source file's absolute
path
Thus, use the dsm task to modify the datasource.xml and use the WAR or JAR task to create a webapp. If restore=true, the datasource.xml file will be restored back to its original state after the build is finished.
4. Depending on the type of database, within the <dsm> tag, define one of the attributes listed under Available DSM Tags.
5. Run the Ant task.
| << 9.3 Modifying Data Source Definition During Deployment | © 1996-2013 InetSoft Technology Corporation (v11.4) | 9.3.2 Available DSM Tags >> |