{"id":19299909,"url":"https://github.com/cloudogu/nexus-claim","last_synced_at":"2025-04-22T10:30:58.948Z","repository":{"id":72236224,"uuid":"96768897","full_name":"cloudogu/nexus-claim","owner":"cloudogu","description":"Define nexus repository structure as code","archived":false,"fork":false,"pushed_at":"2024-09-23T10:03:49.000Z","size":241,"stargazers_count":7,"open_issues_count":4,"forks_count":0,"subscribers_count":13,"default_branch":"develop","last_synced_at":"2024-09-23T11:05:47.782Z","etag":null,"topics":["cloudogu","declarative","nexus","nexus-claim","sonatype","sonatype-nexus"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudogu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2017-07-10T11:15:34.000Z","updated_at":"2024-09-18T13:12:01.000Z","dependencies_parsed_at":"2023-02-25T17:30:54.382Z","dependency_job_id":null,"html_url":"https://github.com/cloudogu/nexus-claim","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudogu%2Fnexus-claim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudogu%2Fnexus-claim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudogu%2Fnexus-claim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudogu%2Fnexus-claim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudogu","download_url":"https://codeload.github.com/cloudogu/nexus-claim/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223893055,"owners_count":17220834,"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":["cloudogu","declarative","nexus","nexus-claim","sonatype","sonatype-nexus"],"created_at":"2024-11-09T23:13:08.023Z","updated_at":"2024-11-09T23:13:08.759Z","avatar_url":"https://github.com/cloudogu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Claim\n\nDefine your [Sonatype Nexus](http://www.sonatype.org/nexus/) repository structure as code. This script defaults to interact with a nexus server running on [localhost](http://localhost:8081).\n\n## Syntax of nexus-claim on nexus 3\n\n```bash\n$ nexus-claim plan -i input.hcl -o output.json\n$ nexus-claim apply -i output.json\n```\n\nIf in case of doubt, issue `nexus-claim --help` to get going.\n\n### Global Options\n\n```\n--server value, -s value    Url to the nexus server (default: \"http://localhost:8081\") [$NEXUS_SERVER]\n--username value, -u value  Username of a nexus admin user (default: \"admin\") [$NEXUS_USER]\n--password value, -p value  Password of the nexus user (default: \"admin123\") [$NEXUS_PASSWORD]\n--nexus2                    use this flag to use nexus-claim with nexus 2 [$NEXUS_V2]\n--help, -h                  show help\n--version, -v               print the version\n```\n\n## Testing with nexus 3\n\n1. Have a decent version of Golang installed\n1. Install Golang dependencies with `go mod vendor \u0026\u0026 go mod tidy`\n1. Build the software in the `target/` directory\n   - `make clean \u0026\u0026 make`\n1. Start up a local nexus\n   - `docker run -d -p 8081:8081 --name nexus sonatype/nexus3`\n   - Access docker container and extract admin password `docker exec -it nexus sh` than `cat /nexus-data/admin.password`\n1. Plan a custom repository `.hcl` file\n   - `target/nexus-claim --password \"\u003cpassword\u003e\" plan -i resources/nexus3/nexus_custom_example.hcl -o targetState.json`\n   - this reads existing repositories from the nexus, changes from the given `.hcl` file will make up the target state as JSON\n   - the target state is supposed to be created within the nexus-claim application\n1. Apply target state `.json` file to nexus\n   1. an auto-generated `.groovy` file responsible for interacting with the nexus API in terms of creating will be uploaded in the nexus.\n   1. the `.groovy file` responsible for creation will be called with the target `.json` being the argument\n1. The repository changes are being written. Check the nexus frontend for changes.\n\n## Things to consider for .hcl of nexus 3\n\n- on maven2-hosted- and maven2-proxy-repository there must be a maven sector in addition(with versionPolicy and writePolicy)\n- Note the autogenerated `.groovy` files are only an interaction layer and should not contain larger application logic \n\n## Configuration Examples\n \n### nexus 3\n\nExamples can be found in the [nexus 3 resources directory](resources/nexus3/nexus_custom.hcl). Also available in the same directory are resulting target `.json` files for reference.\n\n### nexus 2\n\nExamples can be found in the [nexus 2 resources directory](resources/nexus2/nexus-initial-example.hcl)\n\n---\n\n## What is the Cloudogu EcoSystem?\nThe Cloudogu EcoSystem is an open platform, which lets you choose how and where your team creates great software. Each service or tool is delivered as a Dogu, a Docker container. Each Dogu can easily be integrated in your environment just by pulling it from our registry.\n\nWe have a growing number of ready-to-use Dogus, e.g. SCM-Manager, Jenkins, Nexus Repository, SonarQube, Redmine and many more. Every Dogu can be tailored to your specific needs. Take advantage of a central authentication service, a dynamic navigation, that lets you easily switch between the web UIs and a smart configuration magic, which automatically detects and responds to dependencies between Dogus.\n\nThe Cloudogu EcoSystem is open source and it runs either on-premises or in the cloud. The Cloudogu EcoSystem is developed by Cloudogu GmbH under [AGPL-3.0-only](https://spdx.org/licenses/AGPL-3.0-only.html).\n\n## License\nCopyright © 2020 - present Cloudogu GmbH\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\nYou should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.\nSee [LICENSE](LICENSE) for details.\n\n\n---\nMADE WITH :heart:\u0026nbsp;FOR DEV ADDICTS. [Legal notice / Imprint](https://cloudogu.com/en/imprint/?mtm_campaign=ecosystem\u0026mtm_kwd=imprint\u0026mtm_source=github\u0026mtm_medium=link)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudogu%2Fnexus-claim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudogu%2Fnexus-claim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudogu%2Fnexus-claim/lists"}