Package REST services
- Last Updated: August 20, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can write a PaarGeneration task to package REST services to
.PAAR files. These .PAAR files can be deployed to a PAS for OpenEdge instance or
exported.
Task-level properties and elements:
| Name | Description |
|---|---|
srcdir |
Specifies the location of the project for which
.PAAR files are to be
generated. |
dlc |
Specifies the location of your OpenEdge installation. |
verbose |
(Optional) Enables the verbose mode. The valid
values are true, false, on, off, yes, and no. Note: By default, the value is set to false. |
services |
(Optional) Specifies the names of the services
available in the project. Note: If there are
multiple services, separate the names with a comma. If you do
not specify a service, .PAAR
files are generated for all the REST services in the project.
|
destdir |
(Optional) Specifies the destination directory
where the .PAAR files are
generated. |
Here is a sample build.xml file for packaging a REST service:
<?xml version="1.0" encoding="UTF-8"?>
<project name="ABLWebApp" default="main" basedir=".">
<property name="dlc.dir" value="$DLC"/>
<property name="dlc.java.dir" value="${dlc.dir}/java" />
<property name="app.name" value="ExportWebApp1" />
<property name="src.dir" value="$srcdir/${app.name}" />
<property name="dest.dir" value="$destdir/ant/paars" />
<!-- Target for defining 'taskdef' -->
<target name="taskdef">
<echo>Task Definitions</echo>
<taskdef resource="com/progress/openedge/pdt/ant/ablwebapp/ablwebapps.properties">
<classpath>
<pathelement location="${dlc.java.dir}/ant-ablwebapp.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/ablwebapp.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/ablwebapp-dependencies.jar" />
<!-- CodeModel Dependencies -->
<pathelement location="${dlc.java.dir}/ant-libs/codemodel-dependencies.jar" />
<!-- AST and its Dependencies -->
<pathelement location="${dlc.java.dir}/ant-libs/ast.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/ast-dependencies.jar" />
<!-- Additional deps -->
<pathelement location="${dlc.java.dir}/ant-libs/commons-lang3-3.11.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/slf4j-api.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/velocity-engine-core-2.3.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/1padapters-restExpose.jar" />
<pathelement location="${dlc.java.dir}/1padapters-idl.jar" />
<pathelement location="${dlc.java.dir}/1padapters-util.jar" />
<pathelement location="${dlc.java.dir}/ext/jettison-1.5.4.jar" />
<pathelement location="${dlc.java.dir}/ext/commons-logging-1.2.jar" />
<pathelement location="${dlc.java.dir}/ext/xmlschema-core-2.2.1.jar" />
</classpath>
</taskdef>
</target>
<!-- Main task -->
<target name="main" depends="taskdef">
<PaarGeneration srcdir="${src.dir}" dlc="${dlc.dir}" verbose="false"
destdir="${dest.dir}\${app.name}" />
</target>
</project>