Skip to content
Aion4j Maven Plugin for AVM based smart contract on Aion
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper maven wrapper Dec 14, 2018
src Avoid running specific commands multiple times in multi module projec… May 13, 2019
.gitignore maven wrapper Dec 14, 2018
LICENSE Create LICENSE Dec 20, 2018 Update May 15, 2019
mvnw mvnw added Dec 14, 2018
mvnw.cmd mvnw added Dec 14, 2018
pom.xml [maven-release-plugin] prepare for next development iteration May 21, 2019
release_ver Update release_ver Apr 5, 2019

Current release version: 0.6.4

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.
  9. aion4j:postpack - Post process the jar after build. Example: Abi Compile to process @Callable annotation. Default phase "package"

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.