{"id":25841284,"url":"https://github.com/dbeaudoinfortin/mavenaarunpackplugin","last_synced_at":"2026-04-12T07:33:34.845Z","repository":{"id":279873934,"uuid":"939739420","full_name":"dbeaudoinfortin/MavenAARUnpackPlugin","owner":"dbeaudoinfortin","description":"Use Android Archive Libraries files directly in your Java Maven project!","archived":false,"fork":false,"pushed_at":"2025-02-28T06:00:28.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T08:08:34.591Z","etag":null,"topics":["aar","android","android-library","java","maven","maven-plugin"],"latest_commit_sha":null,"homepage":"","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/dbeaudoinfortin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-27T03:00:55.000Z","updated_at":"2025-02-28T06:00:31.000Z","dependencies_parsed_at":"2025-02-28T08:08:46.411Z","dependency_job_id":"83c68369-ed39-4b41-8d39-cf561bce367f","html_url":"https://github.com/dbeaudoinfortin/MavenAARUnpackPlugin","commit_stats":null,"previous_names":["dbeaudoinfortin/mavenaarunpackplugin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeaudoinfortin%2FMavenAARUnpackPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeaudoinfortin%2FMavenAARUnpackPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeaudoinfortin%2FMavenAARUnpackPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeaudoinfortin%2FMavenAARUnpackPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbeaudoinfortin","download_url":"https://codeload.github.com/dbeaudoinfortin/MavenAARUnpackPlugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241319561,"owners_count":19943554,"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":["aar","android","android-library","java","maven","maven-plugin"],"created_at":"2025-03-01T05:23:09.643Z","updated_at":"2025-10-11T21:01:38.801Z","avatar_url":"https://github.com/dbeaudoinfortin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven AAR Unpack Plugin \u003cimg src=\"https://github.com/user-attachments/assets/eea7abc2-47ec-44ac-8d8a-c88cbb56af4f\" height=\"35\"/\u003e\n\nA Maven plugin for unpacking Android Archive Library (AAR) files. Makes your life easier when your Maven Java project needs to compile against Android system libraries but you can't or don't want to install the Android SDK locally.\n\n## How to use\n\nAdd the following to the `plugins` section of your `pom.xml`:\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003eio.github.dbeaudoinfortin\u003c/groupId\u003e\n  \u003cartifactId\u003emaven-aar-unpack-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.3\u003c/version\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cid\u003eaar-unpack\u003c/id\u003e\n      \u003cphase\u003eprocess-sources\u003c/phase\u003e\n      \u003cgoals\u003e\u003cgoal\u003eaar-unpack\u003c/goal\u003e\u003c/goals\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e    \n\u003c/plugin\u003e\n```\n\nThen declare the Android Archive Library (AAR) dependencies as type `aar` in the `dependencies` section of your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eandroidx.graphics\u003c/groupId\u003e\n  \u003cartifactId\u003egraphics-core\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.2\u003c/version\u003e\n  \u003cscope\u003eprovided\u003c/scope\u003e\n  \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nIf your AAR comes from the Google Maven repository then you might need to declare it in the `repositories` section of your `pom.xml`:\n\n```xml\n\u003crepository\u003e\n  \u003cid\u003egoogle\u003c/id\u003e\n  \u003curl\u003ehttps://maven.google.com\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n## How it works\n\nThis plugin executes in the `process-sources` lifecycle phase, prior to the compilation phase. It scans the Maven project for dependencies that are declared as type `aar` and resolves them. The resolved `.aar` files are each extracted to individual sub-directories in the `/target` directory. Each project dependency is then modified to be system scoped with a system path that references the `classes.jar` file extracted from the `.aar` file. Finally, all dependencies are forcefully re-resolved prior to compilation, adding them to the `classpath` of the Maven compiler plugin.\n\n## Configuration Options\n\nAs an alternative to declaring AARs as project dependencies, they can be explicitly declared under the configuration property `aars`, in the Maven dependency coordinate format `\u003cgroupId\u003e:\u003cartifactId\u003e[:\u003cextension\u003e[:\u003cclassifier\u003e]]:\u003cversion\u003e`. For example:\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003eio.github.dbeaudoinfortin\u003c/groupId\u003e\n  \u003cartifactId\u003emaven-aar-unpack-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.3\u003c/version\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cid\u003eaar-unpack\u003c/id\u003e\n      \u003cphase\u003eprocess-sources\u003c/phase\u003e\n      \u003cconfiguration\u003e\n        \u003caars\u003e\n          \u003caar\u003eandroidx.graphics:graphics-core:1.0.2\u003c/aar\u003e\n          \u003caar\u003eandroidx.graphics:graphics-shapes-android:1.0.1\u003c/aar\u003e\n        \u003c/aars\u003e\n      \u003c/configuration\u003e\n      \u003cgoals\u003e\n        \u003cgoal\u003eaar-unpack\u003c/goal\u003e\n      \u003c/goals\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e\n\u003c/plugin\u003e\n```\nWhen explicitly declaring AARs, project dependencies will not be scanned. Declaring AARs using both methods may cause compilation issues.\n\n## Eclipse Support\n\nIf you use the Eclipse IDE, you'll want to use my M2E connector for this project. Without it your project will show build errors. You can manually download it from the releases section of my [M2EMavenAARPlugin](https://github.com/dbeaudoinfortin/M2EMavenAARPlugin/) but you may find it easier to [install it from a site](https://github.com/dbeaudoinfortin/M2EMavenAARPlugin/blob/main/README.md#how-to-install) in Eclipse. \n\n## Requirements\n\n- Requires Java 8 or later.\n\n## Legal Stuff\n\nCopyright (c) 2025 David Fortin\n\nThis software is provided by David Fortin under the MIT License, meaning you are free to use it however you want, as long as you include the original copyright notice (above) and license notice in any copy you make. You just can't hold me liable in case something goes wrong. License details can be read [here](https://github.com/dbeaudoinfortin/MavenAARUnpackPlugin?tab=MIT-1-ov-file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeaudoinfortin%2Fmavenaarunpackplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbeaudoinfortin%2Fmavenaarunpackplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeaudoinfortin%2Fmavenaarunpackplugin/lists"}