{"action":"opened","issue":{"url":"https://api.github.com/repos/terasolunaorg/terasoluna-gfw/issues/373","labels_url":"https://api.github.com/repos/terasolunaorg/terasoluna-gfw/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/terasolunaorg/terasoluna-gfw/issues/373/comments","events_url":"https://api.github.com/repos/terasolunaorg/terasoluna-gfw/issues/373/events","html_url":"https://github.com/terasolunaorg/terasoluna-gfw/issues/373","id":111234096,"number":373,"title":"Add script file to execute all build","user":{"login":"kazuki43zoo","id":5616270,"avatar_url":"https://avatars.githubusercontent.com/u/5616270?v=3","gravatar_id":"","url":"https://api.github.com/users/kazuki43zoo","html_url":"https://github.com/kazuki43zoo","followers_url":"https://api.github.com/users/kazuki43zoo/followers","following_url":"https://api.github.com/users/kazuki43zoo/following{/other_user}","gists_url":"https://api.github.com/users/kazuki43zoo/gists{/gist_id}","starred_url":"https://api.github.com/users/kazuki43zoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazuki43zoo/subscriptions","organizations_url":"https://api.github.com/users/kazuki43zoo/orgs","repos_url":"https://api.github.com/users/kazuki43zoo/repos","events_url":"https://api.github.com/users/kazuki43zoo/events{/privacy}","received_events_url":"https://api.github.com/users/kazuki43zoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T17:54:27Z","updated_at":"2015-10-13T17:54:27Z","closed_at":null,"body":"## Description\r\nAdd script file to execute maven build for all sub projects (as a convenient script).\r\nFor example, this script use at following situations.\r\n\r\n* Perform tests when contributing on local machine\r\n* Perform tests on Travis-CI\r\n* Install latest snapshot artifacts of `terasoluna-gfw` in `terasoluna-gfw-functionaltest` (or `terasoluna-tourreservation`) on Travis-CI.\r\n\r\n## Possible Solutions\r\nAdd script file(e.g. `build-all.sh`) as follow:\r\n\r\n```bash\r\n#!/usr/bin/env bash\r\n\r\nARTIFACT_ID_PREFIX=\"terasoluna-gfw-\"\r\nTARGETS=\"parent common jodatime web security-core security-web jpa mybatis3 mybatis2 recommended-dependencies recommended-web-dependencies\"\r\nDEFAULT_GOALS=\"clean install\"\r\n\r\ncommandArgs=${DEFAULT_GOALS}\r\nif test $# -ne 0 ; then\r\n    commandArgs=$@\r\nfi\r\n\r\necho \"[DEBUG] Command arguments : \\\"${commandArgs}\\\"\"\r\n\r\necho \"[INFO] Start a build.\"\r\n\r\nfor target in ${TARGETS}; do\r\n    artifactId=${ARTIFACT_ID_PREFIX}${target}\r\n    if test -f ${artifactId}/pom.xml ; then\r\n        mvn -U -f ${artifactId}/pom.xml ${commandArgs}\r\n        buildResult=$?\r\n        if test ${buildResult} -ne 0 ; then\r\n            echo \"[ERROR] Failed a build.\"\r\n            exit ${buildResult}\r\n        fi\r\n    fi\r\ndone\r\n\r\necho \"[INFO] Finish a build.\"\r\n```\r\n\r\n### On Local machine\r\n\r\n```bash\r\n$ ./build-all.sh\r\n```\r\n\r\n### On Travis-CI\r\n```yml\r\ninstall: ./build-all.sh\r\n```\r\n\r\nHow do think ?\r\nI submit at later.\r\n\r\n## Fix Version/s\r\n- [ ] 5.1.0\r\n- [ ] 5.0.2\r\n- [ ] 1.0.4 \r\n\r\n## Issue Links\r\nN/A"}}