{"id":20509295,"url":"https://github.com/raydac/mvn-golang-example","last_synced_at":"2025-04-13T22:22:16.558Z","repository":{"id":57597253,"uuid":"54801063","full_name":"raydac/mvn-golang-example","owner":"raydac","description":"Example application \"Hello World\" with the mvn-golang-wrapper plugin","archived":false,"fork":false,"pushed_at":"2022-03-27T08:10:28.000Z","size":756,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T12:46:22.498Z","etag":null,"topics":["example","golang","maven-archetype"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raydac.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}},"created_at":"2016-03-26T21:47:50.000Z","updated_at":"2023-05-27T16:19:53.000Z","dependencies_parsed_at":"2022-08-24T21:41:27.862Z","dependency_job_id":null,"html_url":"https://github.com/raydac/mvn-golang-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmvn-golang-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmvn-golang-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmvn-golang-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raydac%2Fmvn-golang-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raydac","download_url":"https://codeload.github.com/raydac/mvn-golang-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248789770,"owners_count":21161891,"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":["example","golang","maven-archetype"],"created_at":"2024-11-15T20:23:50.474Z","updated_at":"2025-04-13T22:22:16.502Z","avatar_url":"https://github.com/raydac.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Example how to build a GoLang application with Maven and [the mvn-golang-wrapper plugin](https://github.com/raydac/mvn-golang).   \nJust clone the project and build with `mvn package`\n\n# What is Maven?\nMaven is very popular tool in Java world allows to build projects and the main power of maven in its central repository which allows to load dependencies without tricks.   \nIf you have not maven installed on your computer, you can visit its home page and [read instructions how to install](https://maven.apache.org). Also the project contains `mvnw` wrapper which can download maven automatically.\n\n# Build and start\nTo get compiled example Golang application you should make listed steps:\n- (optional step) [download and install JDK](https://bell-sw.com/pages/downloads/#/java-11-lts)\n- just clone the repository with `git clone https://github.com/raydac/mvn-golang-example.git`\n- go to the cloned project folder\n- build the project with `mvn` command if you have installed [maven](https://maven.apache.org/index.html) or with maven wrapper `mvnw` which will download maven automatically\n- go to the generated `bin` folder and execute result file named `binResult`\n\n# Screencast\n![Screencast](assets/go-mvn-example-screencast.gif)\n\n# Create from archetype\nIt is possible to create \"Hello World\" project just from maven archetype\n```\nmvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DarchetypeVersion=2.3.9 -DgroupId=com.go.test -DartifactId=gohello -Dversion=1.0-SNAPSHOT\n```\nif you want to develop multi-module project sharing some sources, you can use muti-module archetype\n```\nmvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello-multi -DarchetypeVersion=2.3.9 -DgroupId=com.go.test -DartifactId=gohello-multi -Dversion=1.0-SNAPSHOT\n```\n\n\n# What to do if I want to use pre-installed Golang SDK?\nIn the case just define `\u003cgoRoot\u003e` in plug-in configuration\n```\n\u003cgoRoot\u003esome/folder/where/go\u003c/goRoot\u003e\n````\nand plug-in will be using already installed distributive   \n\n# I want to export already presented environment variables $GOROOT and $GOPATH\nBy defaut the plug-in using only parameters defined in its configuration, if you want to enable import of environment parameters $GOROOT, $GOOS, $GOARCH and $GOROOT_BOOTSTRAP (if they defined), then just add flag `\u003cuseEnvVars\u003e`into plug-in configuration\n```\n\u003cuseEnvVars\u003etrue\u003c/useEnvVars\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraydac%2Fmvn-golang-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraydac%2Fmvn-golang-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraydac%2Fmvn-golang-example/lists"}