...
- Create a Maven project.
- Copy the content in the
pom.xml
file of the Git sample to thepom.xml
file of your project. - Change the values of the
<groupId>
and<artifactId>
properties in thepom.xml
file as preferred. Create a Java class in your project which implements the
MLInputAdapter
interface, by adding the content in theCustomMLInputAdapter.java
file.Note You need to create a Java class in your project which implements the
MLOutputAdapter
interface for custom output adapter extensions.- Override the
read(String path)
Java method with your custom adapter implementation. - Build the bundle by executing the following command:
mvn clean install
- Copy the built bundle to the
<ML_HOME>/repository/components/dropins/
directory. Add a new property element with a preferred name to the <
ML_HOME>/repository/conf/machine-learner.xml
file corresponding to your new adapter as shown in the example below.Note The property name for input/output adapters must end with the "
.in
" and ".out
" suffixes accordingly.Code Block language xml <Property name="custom.in" value="org.wso2.carbon.ml.custom.adapter.input.CustomMLInputAdapter"/>