Skip to content
Aion4j Maven Plugin for AVM based smart contract on Aion
Branch: master
Clone or download
Latest commit cb51965 Mar 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Delete aion classes. These classes have been moved to avm-helper repo Mar 18, 2019
release_ver Update release_ver Mar 22, 2019

Current release version: 0.4.9

Aion4j maven plugin provides build and deployment support for AVM based smart contracts.

Following maven goals has been implemented in this plugin :

  1. aion4j:clean - Default phase for this goal is "clean". To clean storage folder in case of embedded AVM deployment.
  2. aion4j:deploy - Deploy the contract / dapp jar to an embedded AVM. This goal needs to invoked explicitely from the command line.
  3. aion4j:call - Call contract method
  4. aion4j:contract-txn
  5. aion4j:init - Default phase for this goal is "initialize". It initializes the project with required AVM dependencies. Currently it copies all required avm jars to a lib folder under project's folder. You can also manually create this lib folder or point to an existing avm lib folder through the plugin's configuration parameter.
  6. aion4j:prepack - Default phase "prepare-package". Copy org-aion-avm-userlib.jar's classes to target folder for packaging with dapp's jar.
  7. aion4j:class-verifier - To verify JCL whiltelist classes in the contract
  8. aion4j:deploy - Extend the deploy goal for remote deployment.

For all the supported goals, check this page.

Quick Start Guide

User Guide


Java 10


$> git clone
  1. Install avm.jar to local .m2 repo for compilation
$> ./mvnw initialize
  1. Compile the plugin
$> ./mvnw clean install
  1. Run integration tests
$>  ./mvnw integration-test -DskipITs=false

How to configure this plugin in a dapp maven project

  1. Define avm lib directory property in "<properties>" section of pom.xml
  1. Add aion4j plugin to "<plugins>" section of pom.xml

"mode" can be local or remote.

  1. Add avm compile time dependencies to "<dependencies>" section.

Note: The above jars will be copies to "avm.lib.dir" using maven initialize (or through aion4j:init goal) if not there.

How to use in a dapp maven project

  1. Copy required avm dependencies.
$>mvn initialize
  1. Build the project
$>mvn clean package
  1. To deploy to an embedded AVM
$>mvn aion4j:deploy
You can’t perform that action at this time.