OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Web3J Maven Plugin

Web3J Maven Plugin is a Java build plugin that generates Java classes from Solidity smart-contract files during Maven source generation. Its configuration can select Solidity or ABI inputs, set package and output paths, choose Java, ABI or BIN outputs, and filter contracts.

Independent OpenViST project profile, based on linked sources.

Web3J Maven Plugin — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Java Maven project needs generated contract classes from Solidity sources as part of its source-generation workflow.

Who it is for

  • Java developers building Maven projects that use smart contracts
  • Teams that want contract wrapper generation as part of a Maven build

Documented uses

  • Generate Java classes from Solidity contract files.
  • Choose package names and generated-file destinations.
  • Select Java, ABI and/or BIN outputs and filter contracts.
Before you choose

Requirements & limits

The project is published as a public GitHub repository and identifies its license as Apache-2.0.

  • The documented Maven goal is generate-sources.
  • Default Solidity inputs are read from src/main/resources and default Java output goes to src/main/java.
  • Output formats can include Java, ABI and BIN; outputDirectory settings take precedence over sourceDestination.
  • The plugin generates bindings; the README points to separate web3j documentation for deploying and interacting with contracts.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Generate Java classes from Solidity sources in Maven

Configure the plugin in a Java Maven project and invoke its documented source-generation goal.

Before you start

  • A standard Java Maven project
  • Solidity contract files ending in .sol
  • The web3j Maven plugin added to the project's pom.xml

Steps

  1. Add the plugin under the Maven build's plugins, using groupId org.web3j and artifactId web3j-maven-plugin.

  2. Place Solidity files in src/main/resources, or configure the source files and locations you want the plugin to use.

  3. Optionally set the generated package, output formats, output directories, and contract include or exclude filters in the plugin configuration.

  4. Run mvn web3j:generate-sources.

Expected outcome

The plugin generates Java classes from the selected contract files; its default Java output location is src/main/java.

Guide limitations

  • The documented base configuration generates Java classes by default; ABI and BIN output must be selected through outputFormat.
  • The README describes generation, while deployment and contract interaction are covered in separate web3j documentation.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
LFDT-web3j/web3j-maven-plugin · Official homepage title · retained in its source language