Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Groovy sources</h1><p>The sources of the Groovy project are hosted on Github: <a href="https://github.com/groovy/groovy-core" rel="nofollow">https://github.com/groovy/groovy-core</a> </p><p>Additionally, the sources are mirrored on Codehaus' own Git infrastructure as well: <a href="http://git.codehaus.org/gitweb.cgi?p=groovy-git.git" rel="nofollow">http://git.codehaus.org/gitweb.cgi?p=groovy-git.git<br /></a>You can learn about the repository details on the Xircles Codehaus admin interface: <a href="http://xircles.codehaus.org/projects/groovy/repo/git/repo" rel="nofollow">http://xircles.codehaus.org/projects/groovy/repo/git/repo</a></p><p><a href="http://xircles.codehaus.org/projects/groovy/repo/git/repo" rel="nofollow" />If you're interested in contributing, you can send us GitHub pull requests, or submit patches through JIRA. Please see our <a class="confluence-link" href="/display/GROOVY/Contributing" data-linked-resource-id="2739" data-linked-resource-type="page" data-linked-resource-default-alias="Contributing" data-base-url="http://docs.codehaus.org">contribution page</a> for more.</p><p>You can also get the sources for each releases in the form of a zip archive. Please head to our <a class="confluence-link" href="/display/GROOVY/Download" data-linked-resource-id="2742" data-linked-resource-type="page" data-linked-resource-default-alias="Download" data-base-url="http://docs.codehaus.org">download section</a> to download those source packages.</p><h1>Checkout the code</h1><p>First of all, you'll need to have Git installed on your machine, whether through the support of your IDE, or as a command-line tool.</p><p>If you want to checkout the source code of Groovy, there are three different URLs you can use. From the command-line, you can use the command:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>// anonymous access git clone git://github.com/groovy/groovy-core.git // read/write access git clone https://username@github.com/groovy/groovy-core.git git clone git@github.com:groovy/groovy-core.git</pre></td></tr></table><p><br />You can checkout different branches, in particular:</p><ul><li><code>master</code> is the latest Groovy branch, for the upcoming major version</li><li><code>GROOVY_1_8_X</code> is the branch of the curret Groovy 1.8.x versions (current stable version)</li><li><code>GROOVY_1_7_X</code> is the branch for the previous official version of Groovy 1.7.x</li></ul><p>For fetching a branch the first time, simply use:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git fetch origin </pre></td></tr></table><p>To checkout a particular branch:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git checkout master git checkout GROOVY_1_8_X git checkout GROOVY_1_7_X </pre></td></tr></table><table class="wysiwyg-macro" data-macro-name="info" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p><strong>Developers</strong>: Make sure your SSH information is up-to-date on Github or on Codehaus Xircles and that your SSH key is available to your command-line client or IDE integration.<br /> Please also make sure that you configured your email and name properly, by issueing the following commands:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git config --global user.name "Firstname Lastname" git config --global user.email "your_email@youremail.com" </pre></td></tr></table></td></tr></table><h1>Committing your changes (developers)</h1><p>Use the commit command to commit your changes locally:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git commit -m "Your commit message" </pre></td></tr></table><h1>Picking commits from another branch</h1><p>Say you have committed your changes on <code>master</code> and want to merge a particular comming on <code>GROOVY_1_8_X</code>, you can procede as follows:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git checkout master git commit -m "Fixed GROOVY-1234" // this would return a12bc3... as commit number git checkout GROOVY_1_8_X git cherry-pick a12bc3 </pre></td></tr></table><h1>Staying up-to-date</h1><p>To see what's the status of your source tree, you can call:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git status </pre></td></tr></table><p>And if you want to see all the latest commits that you have locally, you can do:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git log </pre></td></tr></table><p>To retrieve the changes that have been pushed to the server, you can do:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git pull </pre></td></tr></table><p>Of more explicitely:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git pull origin master </pre></td></tr></table><h1>Pushing your changes upstream</h1><p>The various commits you've made are done locally, now is the time to share them with the world by pushing your changes to your Github clone, or to a publicly available Git repository:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git push git push origin master </pre></td></tr></table><p>If you're a Groovy despot, you can also push your changes to Codehaus for manual synchronization purpose. But for that, first, you'll have to have configured an additional remote with:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git remote add codehaus ssh://git@git.codehaus.org/groovy-git.git </pre></td></tr></table><p>Then you can push the changes back to GitHub as well:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git push codehaus master </pre></td></tr></table><h2>Pushing a local branch to the remote repository</h2><p>To push a local branch to the Codehaus Git repository or on the GitHub mirror, you can do the following:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>git push origin myLocalBranch git push codehaus myLocalBranch git push myRemoteLocation myLocalBranch</pre></td></tr></table><h1>Merging pull requests from GitHub</h1><p>Contributors might bring their contributions in the form of "pull requests" on our GitHub mirror.<br /> Groovy despots can merge the pull requests on GitHub through the web interface by following this proposed workflow:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>// create a new branch to test the pull request git checkout -b test_foopatch_onto_1_8 // now you are on branch test_foopatch_onto_1_8 // let's add the git branch of the contributor as a remote git remote add someperson git://github.com/groovy/somepersonsrepo.git // fetch the particular commits git fetch someperson the_branch_with_the_changes // merge it in our test branch git merge FETCH_HEAD // test the changes gradle test or gradle test // if all tests pass, then we can safely use the web based merge UI of Github </pre></td></tr></table><h1>Additional links</h1><p>If you want to learn more about Git, there are many available resources online, such as:</p><ul><li>the <a href="http://help.github.com/git-cheat-sheets/">GitHub cheatsheet</a></li><li>the <a href="http://progit.org/">Pro Git book</a></li></ul>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced