This sample explains how to create a task that can be scheduled to run on WSO2 Governance Registry in few easy steps. Once successfully deployed this sample will print Hello World once every 10 seconds on the Command Prompt of the WSO2 Governance Registry. We will be reusing the code of the Handler Sample in this example. This sample requires Apache Maven. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux See Installation Prerequisites for more information on downloading this.
Instructions
1. Navigate to GREG_HOME/
samples/handler/src
to find the source code of the Handler Sample.
2. Add the following dependency to your POM file:
Info | ||
---|---|---|
| ||
Project Object Model (POM) is an XML representation of a Maven project held in a file named pom.xml. You should find POM file by the name pom.xml inside |
...
Code Block |
---|
mvn clean install |
Info | title | Note
---|
The command |
A successful run of Apache Maven will generate a report similar to the following:
...