Skip to main content

AMF project configuration

To run AMF in your application, you'll need add AMF to your dependencies and then add the AMF intialiization method to your application code.

Download AMF artifacts#

You can download the necessary AMF artifacts from:

Add AMF to your dependencies#

The following example shows how to add AMF to your project using Gradle, Maven, or NPM.

// add mulesoft repository
repositories {
maven {
url 'https://repository-master.mulesoft.org/nexus/content/repositories/releases'
}
}
dependencies {
compile 'com.github.amlorg:amf-client_2.12:x.y.z'
}

NOTE: you may use the -SNAPSHOT versions of the artifacts at your own risk since those snapshot versions may contain breaking changes.

Add the AMF initialization method to your application code#

The following example shows how to add the AMF initialization method (AMF.init()) in your application code:

import amf.client.AMF;
class App {
public static void main(String[] args){
AMF.init().thenApply(() -> {
// ... your code
});
}
}

Learn more about using the AMF initialization method, AMF.init().

Last updated on by Isaac Eldridge