{"id":22165348,"url":"https://github.com/firstdarkdev/jarmanager","last_synced_at":"2025-03-24T16:13:42.727Z","repository":{"id":205596858,"uuid":"714621679","full_name":"firstdarkdev/jarmanager","owner":"firstdarkdev","description":"A Java Library for Packing/Unpacking and relocating Jar Files","archived":false,"fork":false,"pushed_at":"2023-11-09T19:55:53.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T21:50:34.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/firstdarkdev.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":"2023-11-05T12:19:35.000Z","updated_at":"2024-06-02T11:32:14.000Z","dependencies_parsed_at":"2023-11-08T06:51:04.331Z","dependency_job_id":"0db2c773-6922-408f-8ca5-c782d97c59e2","html_url":"https://github.com/firstdarkdev/jarmanager","commit_stats":null,"previous_names":["firstdarkdev/jarmanager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fjarmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fjarmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fjarmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdarkdev%2Fjarmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstdarkdev","download_url":"https://codeload.github.com/firstdarkdev/jarmanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245304873,"owners_count":20593626,"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":[],"created_at":"2024-12-02T05:14:40.129Z","updated_at":"2025-03-24T16:13:42.697Z","avatar_url":"https://github.com/firstdarkdev.png","language":"Java","readme":"## JarManager\n\nJarManager is a java library that allows you un-pack jar files to a directory, pack directories to a jar and relocate packages inside a jar using [jar-relocator](https://github.com/lucko/jar-relocator).\n\nThe library is simple to use and doesn't require much configuration.\n\n***\n\n### Installation\n\nFirstly, add our Maven to your `build.gradle` file.\n\n```groovy\nrepositories {\n    mavenCentral()\n    \n    // Your other repos might be here\n    \n    maven {\n        url \"https://maven.firstdarkdev.xyz/releases\"\n    }\n}\n```\n\nNext, add the library to your `build.gradle` file.\n\n![](https://maven.firstdarkdev.xyz/api/badge/latest/releases/com/hypherionmc/jarmanager?color=40c14a\u0026name=jarmanager)\n\nView the latest version on our [Maven](https://maven.firstdarkdev.xyz/#/releases/com/hypherionmc/jarmanager) or use the version in the badge above\n\n```groovy\ndependencies {\n    // Existing dependencies\n    implementation \"com.hypherionmc:jarmanager:1.0.0\"\n}\n```\n\n***\n\n### Using the library\n\nOnce you have the library added to your project, using it is really simple.\n\n#### Unpacking a Jar file\n\n```java\npublic void unpackJar() throws IOException {\n        File testDirectory = new File(\"testdir\");\n        File outputDirectory = new File(testDirectory, \"output\");\n\n        if (!outputDirectory.exists())\n        outputDirectory.mkdirs();\n\n        // Create a JarManager instance\n        JarManager manager = JarManager.getInstance();\n\n        // Unpack the Jar\n        manager.unpackJar(new File(testDirectory, \"input.jar\"), outputDirectory);\n        }\n```\n\n#### Repacking a Jar file\n\n```java\npublic void repackJar() throws IOException {\n        File testDirectory = new File(\"testdir\");\n        File inputDirectory = new File(testDirectory, \"output\");\n\n        // Create a JarManager instance\n        JarManager manager = JarManager.getInstance();\n\n        // Pack the Jar\n        manager.packJar(inputDirectory, new File(testDirectory, \"output.jar\"));\n    }\n```\n\n#### Relocating Packages\n\n```java\npublic void remapJar() throws IOException {\n        File testDirectory = new File(\"testdir\");\n        File inputFile = new File(testDirectory, \"input.jar\");\n\n        // Create a JarManager instance\n        JarManager manager = JarManager.getInstance();\n\n        // Remap the Jar\n        HashMap\u003cString, String\u003e rl = new HashMap\u003c\u003e();\n        rl.put(\"com.gitlab.cdagaming\", \"test.com.gitlab.cdagaming\");\n        manager.remapJar(inputFile, new File(testDirectory, \"remapped.jar\"), rl);\n    }\n```\n\n***\n\n### Licenses\n\nJarManager is licensed under the MIT License.\n\nJarManager includes the following embedded libraries:\n\n* [jar-relocator](https://github.com/firstdarkdev/jar-relocator) A fork of the original with additional features - Licensed under [Apache-2.0 License](https://github.com/lucko/jar-relocator/blob/master/LICENSE.txt)\n* [OW2 ASM](https://gitlab.ow2.org/asm/asm) - Licensed under [BSD 3-Clause License](https://gitlab.ow2.org/asm/asm/-/blob/master/LICENSE.txt?ref_type=heads)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdarkdev%2Fjarmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstdarkdev%2Fjarmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdarkdev%2Fjarmanager/lists"}