{"id":19838958,"url":"https://github.com/objectionary/hone-maven-plugin","last_synced_at":"2026-02-11T12:29:03.902Z","repository":{"id":254126641,"uuid":"840332960","full_name":"objectionary/hone-maven-plugin","owner":"objectionary","description":"Maven plugin that applies a number of optimizations to your Bytecode, using EOLANG and 𝜑-calculus, trying to make it work faster","archived":false,"fork":false,"pushed_at":"2024-11-05T08:18:09.000Z","size":1097,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T08:27:33.711Z","etag":null,"topics":["bytecode-manipulation","code-optimization","eolang","java","maven-plugin"],"latest_commit_sha":null,"homepage":"https://www.objectionary.com/hone-maven-plugin/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/objectionary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-09T13:20:46.000Z","updated_at":"2024-11-05T07:49:21.000Z","dependencies_parsed_at":"2024-08-21T15:59:22.190Z","dependency_job_id":"c05d2f50-5324-4526-a584-e483b8ed3a0a","html_url":"https://github.com/objectionary/hone-maven-plugin","commit_stats":null,"previous_names":["objectionary/hone-maven-plugin"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fhone-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fhone-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fhone-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectionary%2Fhone-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectionary","download_url":"https://codeload.github.com/objectionary/hone-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224270870,"owners_count":17283870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytecode-manipulation","code-optimization","eolang","java","maven-plugin"],"created_at":"2024-11-12T12:19:43.509Z","updated_at":"2026-02-11T12:29:03.896Z","avatar_url":"https://github.com/objectionary.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bytecode Optimizing Maven Plugin\n\n[![mvn](https://github.com/objectionary/hone-maven-plugin/actions/workflows/mvn.yml/badge.svg)](https://github.com/objectionary/hone-maven-plugin/actions/workflows/mvn.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/org.eolang/hone-maven-plugin.svg)](https://maven-badges.herokuapp.com/maven-central/org.eolang/hone-maven-plugin)\n[![Javadoc](https://www.javadoc.io/badge/org.eolang/hone-maven-plugin.svg)](https://www.javadoc.io/doc/org.eolang/hone-maven-plugin)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.txt)\n[![Hits-of-Code](https://hitsofcode.com/github/objectionary/hone-maven-plugin?branch=master\u0026label=Hits-of-Code)](https://hitsofcode.com/github/objectionary/hone-maven-plugin/view?branch=master\u0026label=Hits-of-Code)\n![Lines of code](https://sloc.xyz/github/objectionary/hone-maven-plugin)\n[![codecov](https://codecov.io/gh/objectionary/hone-maven-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/hone-maven-plugin)\n\nThis [Maven] plugin _may_ optimize your [Bytecode][bytecode] after compilation,\n  to make it work faster.\nJust add this to your `pom.xml` file (you must have [Docker] installed too):\n\n```xml\n\u003cproject\u003e\n  [..]\n  \u003cbuild\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003eorg.eolang\u003c/groupId\u003e\n        \u003cartifactId\u003ehone-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e0.21.0\u003c/version\u003e\n        \u003cexecutions\u003e\n          \u003cexecution\u003e\n            \u003cgoals\u003e\n              \u003cgoal\u003ebuild\u003c/goal\u003e\n              \u003cgoal\u003eoptimize\u003c/goal\u003e\n              \u003cgoal\u003ermi\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n              \u003crules\u003estreams/*\u003c/rules\u003e\n            \u003c/configuration\u003e\n          \u003c/execution\u003e\n        \u003c/executions\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n\u003c/project\u003e\n```\n\nThe plugin will do exactly the following:\n\n1. Take Bytecode `.class` files from the `target/classes/` directory and copy\nall of them to the `target/classes-before-hone/` directory (as a backup).\n1. Using [jeo-maven-plugin],\ntransform `.class` files to\n`.xmir` [format][XMIR],\nwhich is [EO] in XML, and place them into\nthe `target/hone/jeo-disassemble/` directory.\n1. Using [phino],\nconvert `.xmir` files to `.phi` files\nwith [𝜑-calculus] expressions,\nand place them into the `target/hone/phi/` directory.\n1. Using [phino],\napply a number of optimizations to 𝜑-calculus expressions in the `.phi` files\nand place new `.phi` files into\nthe `target/hone/phi-optimized/` directory.\n1. Using [phino],\nconvert `.phi` files back to `.xmir` files and\nplace them into the `target/hone/unphi/` directory.\n1. Using [jeo-maven-plugin],\ntransform `.xmir` files back to Bytecode and place `.class` files into\nthe `target/classes/` directory.\n\nThe effect of the plugin should be performance-positive (your code should\nwork faster) along with no functionality degradation (your code should work\nexactly the same as it worked before optimizations). If any of these\nis not true, [submit a ticket], we will try to fix.\n\nTo make it work faster, you may install [phino] on your machine beforehand.\n\n## How to Use in Gradle\n\nYou can use this plugin with [Gradle] too, but it requires\nsome additional steps. You need to add the following to your `build.gradle` file:\n\n```groovy\ntask hone(type: Exec, dependsOn: compileJava) {\n    commandLine 'mvn',\n      \"-Dhone.target=${buildDir}\",\n      \"-Dhone.classes=${buildDir.toPath().relativize(sourceSets.main.output.classesDirs.singleFile.toPath())}\",\n      '-Dhone.rules=streams/*',\n      'org.eolang:hone-maven-plugin:0.0.0:build',\n      'org.eolang:hone-maven-plugin:0.0.0:optimize'\n}\ncompileJava.finalizedBy hone\nclasses.dependsOn hone\n```\n\nSee how it works in [this example](src/test/gradle).\n\n## Benchmark\n\nHere is the result of the latest processing of a large Java class\nfrom [JNA](https://github.com/java-native-access/jna):\n\n\u003c!-- benchmark_begin --\u003e\n```text\n\n\n```\n\nThe results were calculated in [this GHA job][benchmark-gha]\non 2025-12-17 at 13:53,\non Linux with 4 CPUs.\n\u003c!-- benchmark_end --\u003e\n\n## How to Contribute\n\nFork repository, make changes, then send us a [pull request][guidelines].\nWe will review your changes and apply them to the `master` branch shortly,\nprovided they don't violate our quality standards. To avoid frustration,\nbefore sending us your pull request please run full Maven build:\n\n```bash\nmvn clean install -Pqulice\n```\n\nYou will need [Maven 3.3+](https://maven.apache.org), Java 11+,\nand [Docker](https://docs.docker.com/engine/install/) installed.\n\nThe versions of [EO] and\n[JEO](https://github.com/objectionary/jeo-maven-plugin),\nthat we use, are defined in the `pom.xml` file.\n\n[EO]: https://github.com/objectionary/eo\n[benchmark-gha]: https://github.com/objectionary/hone-maven-plugin/actions/runs/20305168836\n[bytecode]: https://en.wikipedia.org/wiki/Java_bytecode\n[guidelines]: https://www.yegor256.com/2014/04/15/github-guidelines.html\n[Maven]: https://maven.apache.org/\n[Docker]: https://docs.docker.com/engine/install/\n[submit a ticket]: https://github.com/objectionary/hone-maven-plugin/issues\n[Gradle]: https://gradle.org/\n[phino]: https://github.com/objectionary/phino\n[jeo-maven-plugin]: https://github.com/objectionary/jeo-maven-plugin\n[𝜑-calculus]: https://arxiv.org/abs/2111.13384\n[XMIR]: https://news.eolang.org/2022-11-25-xmir-guide.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fhone-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectionary%2Fhone-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectionary%2Fhone-maven-plugin/lists"}