InetSoft Documentation: Report ANT Task Parameters

InetSoft's reporting software permits users to run ANT task parameters that facilitate the completion of predefined tasks. View the information below to learn more about the Style Intelligence solution.

You can perform incremental import and export of assets programmatically via a custom ANT task. This requires ANT 1.6 or later, and JDK 1.6 or later.

The task can run in two modes:
• Remote import/export to and from a live server deployment via RMI.
• Local import/export to and from a local file system (Sree Home).

The task uses two classes, ImportAssetTask and ExportAssetTask, and requires the following parameters:

• classname – API class name, based on the desired operation:
inetsoft.sree.adm.ant.ExportAssetsTask
inetsoft.sree.adm.ant.ImportAssetsTask

• file – the absolute file path to which assets should be exported, or from which assets should be imported.
• replace – Import flag to overwrite existing assets with the same name.

Remote Import/Export Only

The following parameters pertain to RMI-based asset deployment.

• host – the machine or IP address of the RMI server.
• port – the RMI port of the RMI Connector Server.
• username/password – User/Password of the RMI Connector Server.

Local Import/Export Only

The following parameters pertain to local asset deployment.

• sreehome – the absolute path to the sree home folder.

The assets to be included or excluded in the import/export are specified using specific patterns within the <include> and <exclude> tags.

Pattern – /scope/asset type/folder/subfolder/asset name

view demo icon
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.

For example,

Global Scope – /global/worksheet/Sales/YTD Sales
User Scope – /user/{user name}/viewsheet/Lead Analysis
Asset Wild Card – /global/viewsheet/Mgmt Dashboard/Sales/*
Folder Wild Card – /global/report/Mgmt Dashboard/**/*

For example, if you want to include all viewsheets from the 'Sales' folder except the 'YTD Sales' viewsheet.

<include name="/global/viewsheet/Sales/*"/>
<exclude name="/global/viewsheet/Sales/YTD Sales"/>

Sample 'build.xml' file for Remote Import/Export:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="AdminTask" basedir="." default="all">
<property name="testDir" location=""/>

<target name="ExportAssetRemote" description="Export From">
<taskdef name="expassets" classname="inetsoft.sree.adm.ant.ExportAssetsTask"/>
<exportassets host="192.168.5.89" port="1098" username="{RMI Server user}" password="{password}" file="\exports\xyz1.jar">
<include name="/global/viewsheet/Dashboards/*"/>
<exclude name="/global/viewsheet/Dashboards/Projection"/>
</exportassets>
</target>

<target name="ImportAssetRemote" description="Import To">
<taskdef name="importassets" classname="inetsoft.sree.adm.ant.ImportAssetsTask"/>
<importassets host="192.168.5.89" port="1098" username="{RMI Server user}" password="{password}" file="\imports\xyz2.jar" replace="false">
</importassets>
</target>
</project>

Sample 'build.xml' for file for local Import/Export:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="AdminTask" basedir="." default="all">
<property name="testDir" location=""/>
<property name="sreeHome" location="C:\StyleIntelligence\server\webapps\sree\WEB-INF\classes"/>

<target name="ExportAssetLocal" description="Export From">
<taskdef name="exportassets" classname="inetsoft.sree.adm.ant.ExportAssetsTask"/>
<exportassets username="{EM User}" password="{password}" sreehome="" file="\exports\abc1.jar">
<include name="/global/viewsheet/**/*"/>
</exportassets>
</target>

<target name="ImportAssetLocal" description="Import To">
<taskdef name="importassets" classname="inetsoft.sree.adm.ant.ImportAssetsTask"/>
<importassets username="{EM User}" password="{password}" sreehome="" file="\imports\abc2.jar" replace="false">
</importassets>
</target>
</project>

To execute the Ant task, follow the steps below:

1. Make sure the product jar files are on the classpath.
2. Change to the directory containing the build.xml file.
3. Enter the following command:
ant {target name}
e.g., :\>ant ExportAssetLocal